]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
stage 1 of wrecking ball (duck!)
authorAnthony Minessale <anthony.minessale@gmail.com>
Wed, 13 Jun 2007 20:40:06 +0000 (20:40 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Wed, 13 Jun 2007 20:40:06 +0000 (20:40 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5347 d0543943-73ff-0310-b7d9-9358b9ac24b2

45 files changed:
src/include/switch_apr.h
src/include/switch_core.h
src/include/switch_loadable_module.h
src/include/switch_module_interfaces.h
src/include/switch_types.h
src/mod/applications/mod_commands/mod_commands.c
src/mod/applications/mod_conference/mod_conference.c
src/mod/applications/mod_dptools/mod_dptools.c
src/mod/applications/mod_enum/mod_enum.c
src/mod/applications/mod_esf/mod_esf.c
src/mod/applications/mod_ivrtest/mod_ivrtest.c
src/mod/applications/mod_rss/mod_rss.c
src/mod/applications/mod_soundtouch/mod_soundtouch.cpp
src/mod/asr_tts/mod_cepstral/mod_cepstral.c
src/mod/codecs/mod_amr/mod_amr.c
src/mod/codecs/mod_g711/mod_g711.c
src/mod/codecs/mod_g722/mod_g722.c
src/mod/codecs/mod_g723_1/mod_g723_1.c
src/mod/codecs/mod_g726/mod_g726.c
src/mod/codecs/mod_g729/mod_g729.c
src/mod/codecs/mod_gsm/mod_gsm.c
src/mod/codecs/mod_h26x/mod_h26x.c
src/mod/codecs/mod_ilbc/mod_ilbc.c
src/mod/codecs/mod_l16/mod_l16.c
src/mod/codecs/mod_lpc10/mod_lpc10.c
src/mod/codecs/mod_speex/mod_speex.c
src/mod/dialplans/mod_dialplan_directory/mod_dialplan_directory.c
src/mod/dialplans/mod_dialplan_xml/mod_dialplan_xml.c
src/mod/directories/mod_ldap/mod_ldap.c
src/mod/endpoints/mod_alsa/mod_alsa.c
src/mod/endpoints/mod_dingaling/mod_dingaling.c
src/mod/endpoints/mod_iax/mod_iax.c
src/mod/endpoints/mod_portaudio/mod_portaudio.c
src/mod/endpoints/mod_sofia/mod_sofia.c
src/mod/endpoints/mod_sofia/mod_sofia.h
src/mod/endpoints/mod_wanpipe/mod_wanpipe.c
src/mod/endpoints/mod_woomera/mod_woomera.c
src/mod/event_handlers/mod_event_socket/mod_event_socket.c
src/mod/languages/mod_perl/mod_perl.c
src/mod/languages/mod_python/mod_python.c
src/mod/languages/mod_spidermonkey/mod_spidermonkey.c
src/mod/say/mod_say_en/mod_say_en.c
src/mod/timers/mod_softtimer/mod_softtimer.c
src/mod/xml_int/mod_xml_cdr/mod_xml_cdr.c
src/switch_loadable_module.c

index 0e020812bbf7ef746910f16f9c0d4aa5614bfbb8..2c8aa703cd6feef07c6cb25df55eaae2d6fa04e6 100644 (file)
@@ -55,7 +55,7 @@ SWITCH_BEGIN_EXTERN_C
  * @{
  */
 /** The fundamental pool type */
-       typedef struct apr_pool_t switch_memory_pool_t;
+/* see switch types.h  typedef struct apr_pool_t switch_memory_pool_t;*/
 
 
 /**
index fa08685b89e03d0320467913f04a37207ff224b4..a958bc4c48def36c828b7b07b594a18e708ef500 100644 (file)
@@ -1461,6 +1461,10 @@ SWITCH_DECLARE(void) switch_core_set_globals(void);
   \return TRUE or FALSE
 */
 SWITCH_DECLARE(uint8_t) switch_core_session_compare(switch_core_session_t *a, switch_core_session_t *b);
+
+
+SWITCH_DECLARE(switch_loadable_module_interface_t *) switch_loadable_module_create_module_interface(switch_memory_pool_t *pool, const char *name);
+SWITCH_DECLARE(void *) switch_loadable_module_create_interface(switch_loadable_module_interface_t *mod, switch_module_interface_name_t iname);
 ///\}
 
 /*!
index 86ea7d3f5f5ad20e68eff07fc2a4556fe1ecd648..c2b0f67118a56aaad478387e86ffade53d0a7645 100644 (file)
@@ -54,31 +54,32 @@ SWITCH_BEGIN_EXTERN_C
        /*! the name of the module */
        const char *module_name;
        /*! the table of endpoints the module has implmented */
-       const switch_endpoint_interface_t *endpoint_interface;
+       switch_endpoint_interface_t *endpoint_interface;
        /*! the table of timers the module has implmented */
-       const switch_timer_interface_t *timer_interface;
+       switch_timer_interface_t *timer_interface;
        /*! the table of dialplans the module has implmented */
-       const switch_dialplan_interface_t *dialplan_interface;
+       switch_dialplan_interface_t *dialplan_interface;
        /*! the table of codecs the module has implmented */
-       const switch_codec_interface_t *codec_interface;
+       switch_codec_interface_t *codec_interface;
        /*! the table of applications the module has implmented */
-       const switch_application_interface_t *application_interface;
+       switch_application_interface_t *application_interface;
        /*! the table of api functions the module has implmented */
-       const switch_api_interface_t *api_interface;
+       switch_api_interface_t *api_interface;
        /*! the table of file formats the module has implmented */
-       const switch_file_interface_t *file_interface;
+       switch_file_interface_t *file_interface;
        /*! the table of speech interfaces the module has implmented */
-       const switch_speech_interface_t *speech_interface;
+       switch_speech_interface_t *speech_interface;
        /*! the table of directory interfaces the module has implmented */
-       const switch_directory_interface_t *directory_interface;
+       switch_directory_interface_t *directory_interface;
        /*! the table of chat interfaces the module has implmented */
-       const switch_chat_interface_t *chat_interface;
+       switch_chat_interface_t *chat_interface;
        /*! the table of say interfaces the module has implmented */
-       const switch_say_interface_t *say_interface;
+       switch_say_interface_t *say_interface;
        /*! the table of asr interfaces the module has implmented */
-       const switch_asr_interface_t *asr_interface;
+       switch_asr_interface_t *asr_interface;
        /*! the table of management interfaces the module has implmented */
-       const switch_management_interface_t *management_interface;
+       switch_management_interface_t *management_interface;
+       switch_memory_pool_t *pool;
 };
 
 /*!
index a8967536e9973a3a04375312870def401a73964e..10b91dff3c5ccf5f423057776d5d2a1f23cbd719 100644 (file)
 SWITCH_BEGIN_EXTERN_C
 /*! \brief A table of functions to execute at various states 
 */
-       struct switch_state_handler_table {
+
+typedef enum {
+       SWITCH_SHN_ON_INIT,
+       SWITCH_SHN_ON_RING,
+       SWITCH_SHN_ON_EXECUTE,
+       SWITCH_SHN_ON_HANGUP,
+       SWITCH_SHN_ON_LOOPBACK,
+       SWITCH_SHN_ON_TRANSMIT,
+       SWITCH_SHN_ON_HOLD,
+       SWITCH_SHN_ON_HIBERNATE
+} switch_state_handler_name_t;
+
+struct switch_state_handler_table {
        /*! executed when the state changes to init */
        switch_state_handler_t on_init;
        /*! executed when the state changes to ring */
@@ -61,6 +73,7 @@ SWITCH_BEGIN_EXTERN_C
        switch_state_handler_t on_hold;
        /*! executed when the state changes to hibernate */
        switch_state_handler_t on_hibernate;
+       void *padding[10];
 };
 
 struct switch_stream_handle {
@@ -77,32 +90,62 @@ struct switch_stream_handle {
 struct switch_io_event_hooks;
 
 
+typedef switch_call_cause_t 
+(*switch_io_outgoing_channel_t)(switch_core_session_t *, switch_caller_profile_t *, switch_core_session_t **, switch_memory_pool_t **);
+typedef switch_status_t (*switch_io_read_frame_t) (switch_core_session_t *, switch_frame_t **, int, switch_io_flag_t, int);
+typedef switch_status_t (*switch_io_write_frame_t) (switch_core_session_t *, switch_frame_t *, int, switch_io_flag_t, int);
+typedef switch_status_t (*switch_io_kill_channel_t) (switch_core_session_t *, int);
+typedef switch_status_t (*switch_io_waitfor_read_t) (switch_core_session_t *, int, int);
+typedef switch_status_t (*switch_io_waitfor_write_t) (switch_core_session_t *, int, int);
+typedef switch_status_t (*switch_io_send_dtmf_t) (switch_core_session_t *, char *);
+typedef switch_status_t (*switch_io_receive_message_t) (switch_core_session_t *, switch_core_session_message_t *);
+typedef switch_status_t (*switch_io_receive_event_t) (switch_core_session_t *, switch_event_t *);
+typedef switch_status_t (*switch_io_state_change_t) (switch_core_session_t *);
+typedef        switch_status_t (*switch_io_read_video_frame_t) (switch_core_session_t *, switch_frame_t **, int, switch_io_flag_t, int);
+typedef switch_status_t (*switch_io_write_video_frame_t) (switch_core_session_t *, switch_frame_t *, int, switch_io_flag_t, int);
+
+typedef enum {
+       SWITCH_IO_OUTGOING_CHANNEL,
+       SWITCH_IO_READ_FRAME,
+       SWITCH_IO_WRITE_FRAME,
+       SWITCH_IO_KILL_CHANNEL,
+       SWITCH_IO_WAITFOR_READ,
+       SWITCH_IO_WAITFOR_WRITE,
+       SWITCH_IO_SEND_DTMF,
+       SWITCH_IO_RECEIVE_MESSAGE,
+       SWITCH_IO_RECEIVE_EVENT,
+       SWITCH_IO_STATE_CHANGE,
+       SWITCH_IO_READ_VIDEO_FRAME,
+       SWITCH_IO_WRITE_VIDEO_FRAME
+} switch_io_routine_name_t;
+
 /*! \brief A table of i/o routines that an endpoint interface can implement */
 struct switch_io_routines {
        /*! creates an outgoing session from given session, caller profile */
-       switch_call_cause_t (*outgoing_channel) (switch_core_session_t *, switch_caller_profile_t *, switch_core_session_t **, switch_memory_pool_t **);
+       switch_io_outgoing_channel_t outgoing_channel;
        /*! read a frame from a session */
-       switch_status_t (*read_frame) (switch_core_session_t *, switch_frame_t **, int, switch_io_flag_t, int);
+       switch_io_read_frame_t read_frame;
        /*! write a frame to a session */
-       switch_status_t (*write_frame) (switch_core_session_t *, switch_frame_t *, int, switch_io_flag_t, int);
+       switch_io_write_frame_t write_frame;
        /*! send a kill signal to the session's channel */
-       switch_status_t (*kill_channel) (switch_core_session_t *, int);
+       switch_io_kill_channel_t kill_channel;
        /*! wait for the session's channel to be ready to read audio */
-       switch_status_t (*waitfor_read) (switch_core_session_t *, int, int);
+       switch_io_waitfor_read_t waitfor_read;
        /*! wait for the session's channel to be ready to write audio */
-       switch_status_t (*waitfor_write) (switch_core_session_t *, int, int);
+       switch_io_waitfor_write_t waitfor_write;
        /*! send a string of DTMF digits to a session's channel */
-       switch_status_t (*send_dtmf) (switch_core_session_t *, char *);
+       switch_io_send_dtmf_t send_dtmf;
        /*! receive a message from another session */
-       switch_status_t (*receive_message) (switch_core_session_t *, switch_core_session_message_t *);
+       switch_io_receive_message_t receive_message;
        /*! queue a message for another session */
-       switch_status_t (*receive_event) (switch_core_session_t *, switch_event_t *);
+       switch_io_receive_event_t receive_event;
        /*! change a sessions channel state */
-       switch_status_t (*state_change) (switch_core_session_t *);
+       switch_io_state_change_t state_change;
        /*! read a video frame from a session */
-       switch_status_t (*read_video_frame) (switch_core_session_t *, switch_frame_t **, int, switch_io_flag_t, int);
+       switch_io_read_video_frame_t read_video_frame;
        /*! write a video frame to a session */
-       switch_status_t (*write_video_frame) (switch_core_session_t *, switch_frame_t *, int, switch_io_flag_t, int);
+       switch_io_write_video_frame_t write_video_frame;
+       void *padding[10];
 };
 
 /*! \brief Abstraction of an module endpoint interface
@@ -116,16 +159,16 @@ struct switch_endpoint_interface {
        const char *interface_name;
 
        /*! channel abstraction methods */
-       const switch_io_routines_t *io_routines;
+       switch_io_routines_t *io_routines;
 
        /*! state machine methods */
-       const switch_state_handler_table_t *state_handler;
+       switch_state_handler_table_t *state_handler;
 
        /*! private information */
        void *private_info;
 
        /* to facilitate linking */
-       const struct switch_endpoint_interface *next;
+       struct switch_endpoint_interface *next;
 };
 
 /*! \brief Abstract handler to a timer module */
@@ -146,6 +189,14 @@ struct switch_timer {
        void *private_info;
 };
 
+typedef enum {
+       SWITCH_TIMER_FUNC_TIMER_INIT,
+       SWITCH_TIMER_FUNC_TIMER_NEXT,
+       SWITCH_TIMER_FUNC_TIMER_STEP,
+       SWITCH_TIMER_FUNC_TIMER_CHECK,
+       SWITCH_TIMER_FUNC_TIMER_DESTROY
+} switch_timer_func_name_t;
+
 /*! \brief A table of functions that a timer module implements */
 struct switch_timer_interface {
        /*! the name of the interface */
@@ -160,7 +211,7 @@ struct switch_timer_interface {
        switch_status_t (*timer_check) (switch_timer_t *);
        /*! function to deallocate the timer */
        switch_status_t (*timer_destroy) (switch_timer_t *);
-       const struct switch_timer_interface *next;
+       struct switch_timer_interface *next;
 };
 
 /*! \brief Abstract interface to a dialplan module */
@@ -169,7 +220,7 @@ struct switch_dialplan_interface {
        const char *interface_name;
        /*! the function to read an extension and set a channels dialpan */
        switch_dialplan_hunt_function_t hunt_function;
-       const struct switch_dialplan_interface *next;
+       struct switch_dialplan_interface *next;
 };
 
 /*! \brief Abstract interface to a file format module */
@@ -192,7 +243,7 @@ struct switch_file_interface {
        switch_status_t (*file_get_string) (switch_file_handle_t *fh, switch_audio_col_t col, const char **string);
        /*! list of supported file extensions */
        char **extens;
-       const struct switch_file_interface *next;
+       struct switch_file_interface *next;
 };
 
 /*! an abstract representation of a file handle (some parameters based on compat with libsndfile) */
@@ -254,7 +305,7 @@ struct switch_asr_interface {
        switch_status_t (*asr_check_results) (switch_asr_handle_t *ah, switch_asr_flag_t *flags);
        /*! function to read results from the ASR */
        switch_status_t (*asr_get_results) (switch_asr_handle_t *ah, char **xmlstr, switch_asr_flag_t *flags);
-       const struct switch_asr_interface *next;
+       struct switch_asr_interface *next;
 };
 
 /*! an abstract representation of an asr speech interface. */
@@ -293,7 +344,7 @@ struct switch_speech_interface {
        void (*speech_numeric_param_tts) (switch_speech_handle_t *sh, char *param, int val);
        void (*speech_float_param_tts) (switch_speech_handle_t *sh, char *param, double val);
 
-       const struct switch_speech_interface *next;
+       struct switch_speech_interface *next;
 };
 
 
@@ -322,7 +373,7 @@ struct switch_say_interface {
        const char *interface_name;
        /*! function to pass down to the module */
        switch_say_callback_t say_function;
-       const struct switch_say_interface *next;
+       struct switch_say_interface *next;
 };
 
 /*! \brief Abstract interface to a chat module */
@@ -331,7 +382,7 @@ struct switch_chat_interface {
        const char *interface_name;
        /*! function to open the directory interface */
        switch_status_t (*chat_send) (char *proto, char *from, char *to, char *subject, char *body, char *hint);
-       const struct switch_chat_interface *next;
+       struct switch_chat_interface *next;
 };
 
 /*! \brief Abstract interface to a management module */
@@ -340,7 +391,7 @@ struct switch_management_interface {
        const char *relative_oid;
        /*! function to open the directory interface */
        switch_status_t (*management_function) (char *relative_oid, switch_management_action_t action, char *data, switch_size_t datalen);
-       const struct switch_management_interface *next;
+       struct switch_management_interface *next;
 };
 
 /*! \brief Abstract interface to a directory module */
@@ -358,7 +409,7 @@ struct switch_directory_interface {
        /*! function to advance to the next name/value pair in the current record */
        switch_status_t (*directory_next_pair) (switch_directory_handle_t *dh, char **var, char **val);
 
-       const struct switch_directory_interface *next;
+       struct switch_directory_interface *next;
 };
 
 /*! an abstract representation of a directory interface. */
@@ -476,7 +527,7 @@ struct switch_codec_implementation {
                                                           uint32_t encoded_rate, void *decoded_data, uint32_t * decoded_data_len, uint32_t * decoded_rate, unsigned int *flag);
        /*! deinitalize a codec handle using this implementation */
        switch_status_t (*destroy) (switch_codec_t *);
-       const struct switch_codec_implementation *next;
+       struct switch_codec_implementation *next;
 };
 
 /*! \brief Top level module interface to implement a series of codec implementations */
@@ -484,8 +535,8 @@ struct switch_codec_interface {
        /*! the name of the interface */
        const char *interface_name;
        /*! a list of codec implementations related to the codec */
-       const switch_codec_implementation_t *implementations;
-       const struct switch_codec_interface *next;
+       switch_codec_implementation_t *implementations;
+       struct switch_codec_interface *next;
 };
 
 /*! \brief A module interface to implement an application */
@@ -502,7 +553,7 @@ struct switch_application_interface {
        const char *syntax;
        /*! flags to control behaviour */
        uint32_t flags;
-       const struct switch_application_interface *next;
+       struct switch_application_interface *next;
 };
 
 /*! \brief A module interface to implement an api function */
@@ -515,7 +566,7 @@ struct switch_api_interface {
        switch_api_function_t function;
        /*! an example of the api syntax */
        const char *syntax;
-       const struct switch_api_interface *next;
+       struct switch_api_interface *next;
 };
 
 SWITCH_END_EXTERN_C
index 51608465ef75c2b8823354c33ca44b6bfd788f2a..129c5da7c1d832a5868df0320b765c573c3ee4f2 100644 (file)
@@ -124,6 +124,22 @@ SWITCH_BEGIN_EXTERN_C
        typedef uint8_t switch_byte_t;
 
 
+typedef enum {
+       SWITCH_ENDPOINT_INTERFACE,
+       SWITCH_TIMER_INTERFACE,
+       SWITCH_DIALPLAN_INTERFACE,
+       SWITCH_CODEC_INTERFACE,
+       SWITCH_APPLICATION_INTERFACE,
+       SWITCH_API_INTERFACE,
+       SWITCH_FILE_INTERFACE,
+       SWITCH_SPEECH_INTERFACE,
+       SWITCH_DIRECTORY_INTERFACE,
+       SWITCH_CHAT_INTERFACE,
+       SWITCH_SAY_INTERFACE,
+       SWITCH_ASR_INTERFACE,
+       SWITCH_MANAGEMENT_INTERFACE
+} switch_module_interface_name_t;
+
 typedef enum {
        SUF_NONE = 0,
        SUF_THREAD_RUNNING = (1 << 0),
@@ -971,6 +987,7 @@ typedef enum {
        SCSC_CHECK_RUNNING
 } switch_session_ctl_t;
 
+typedef struct apr_pool_t switch_memory_pool_t;
 typedef uint16_t switch_port_t;
 typedef uint8_t switch_payload_t;
 typedef struct switch_app_log switch_app_log_t;
@@ -1053,7 +1070,7 @@ typedef switch_xml_t(*switch_xml_search_function_t) (const char *section,
 
 
 #define SWITCH_API_VERSION 1
-#define SWITCH_MODULE_LOAD_ARGS (const switch_loadable_module_interface_t **module_interface, char *filename)
+#define SWITCH_MODULE_LOAD_ARGS (switch_loadable_module_interface_t **module_interface, switch_memory_pool_t *pool)
 #define SWITCH_MODULE_RUNTIME_ARGS (void)
 #define SWITCH_MODULE_SHUTDOWN_ARGS (void)
 typedef switch_status_t (*switch_module_load_t) SWITCH_MODULE_LOAD_ARGS ;
index 4019fcbba9fadd0d53e3ed05784f6e208e8beeae..2773fb71bea01040964ee46dfd1c2b818310c629 100644 (file)
@@ -1319,7 +1319,7 @@ static switch_api_interface_t originate_api_interface = {
        /*.next */ &kill_api_interface
 };
 
-static const switch_loadable_module_interface_t commands_module_interface = {
+static switch_loadable_module_interface_t commands_module_interface = {
        /*.module_name */ modname,
        /*.endpoint_interface */ NULL,
        /*.timer_interface */ NULL,
index 22140e20dfab53c4a55bdbc700a9084539ecc5c8..2da7501a614b8a48bdb6a57ed1582aa2774f1bd1 100644 (file)
@@ -3549,7 +3549,7 @@ static switch_status_t audio_bridge_on_ring(switch_core_session_t *session)
        return SWITCH_STATUS_FALSE;
 }
 
-static const switch_state_handler_table_t audio_bridge_peer_state_handlers = {
+static switch_state_handler_table_t audio_bridge_peer_state_handlers = {
        /*.on_init */ NULL,
        /*.on_ring */ audio_bridge_on_ring,
        /*.on_execute */ NULL,
@@ -4321,7 +4321,7 @@ static void launch_conference_record_thread(conference_obj_t * conference, char
        switch_thread_create(&thread, thd_attr, conference_record_thread_run, rec, rec->pool);
 }
 
-static const switch_application_interface_t conference_autocall_application_interface = {
+static switch_application_interface_t conference_autocall_application_interface = {
        /*.interface_name */ "conference_set_auto_outcall",
        /*.application_function */ conference_auto_function,
        NULL, NULL, NULL,
@@ -4329,7 +4329,7 @@ static const switch_application_interface_t conference_autocall_application_inte
        /*.next */
 };
 
-static const switch_application_interface_t conference_application_interface = {
+static switch_application_interface_t conference_application_interface = {
        /*.interface_name */ global_app_name,
        /*.application_function */ conference_function,
        NULL, NULL, NULL,
@@ -4414,7 +4414,7 @@ static switch_status_t chat_send(char *proto, char *from, char *to, char *subjec
        return SWITCH_STATUS_SUCCESS;
 }
 
-static const switch_chat_interface_t conference_chat_interface = {
+static switch_chat_interface_t conference_chat_interface = {
        /*.name */ CONF_CHAT_PROTO,
        /*.chat_send */ chat_send,
 
index f8f9ed2775914f2cacad9d55b9bf84e1b78926ba..80941fd42b8fe1a11fba5241e61c30f32ecc2420 100644 (file)
@@ -37,8 +37,8 @@
 SWITCH_MODULE_LOAD_FUNCTION(mod_dptools_load);
 SWITCH_MODULE_DEFINITION(mod_dptools, mod_dptools_load, NULL, NULL);
 
-static const switch_application_interface_t detect_speech_application_interface;
-static const switch_application_interface_t exe_application_interface;
+static switch_application_interface_t detect_speech_application_interface;
+static switch_application_interface_t exe_application_interface;
 
 static void detect_speech_function(switch_core_session_t *session, char *data)
 {
@@ -943,7 +943,7 @@ static void audio_bridge_function(switch_core_session_t *session, char *data)
        }
 }
 
-static const switch_api_interface_t strepoch_api_interface = {
+static switch_api_interface_t strepoch_api_interface = {
        /*.interface_name */ "strepoch",
        /*.desc */ "Convert a date string into epoch time",
        /*.function */ strepoch_api_function,
@@ -951,7 +951,7 @@ static const switch_api_interface_t strepoch_api_interface = {
        /*.next */ NULL
 };
 
-static const switch_api_interface_t chat_api_interface = {
+static switch_api_interface_t chat_api_interface = {
        /*.interface_name */ "chat",
        /*.desc */ "chat",
        /*.function */ chat_api_function,
@@ -959,7 +959,7 @@ static const switch_api_interface_t chat_api_interface = {
        /*.next */ &strepoch_api_interface
 };
 
-static const switch_api_interface_t dptools_api_interface = {
+static switch_api_interface_t dptools_api_interface = {
        /*.interface_name */ "strftime",
        /*.desc */ "strftime",
        /*.function */ strftime_api_function,
@@ -967,7 +967,7 @@ static const switch_api_interface_t dptools_api_interface = {
        /*.next */ &chat_api_interface
 };
 
-static const switch_api_interface_t presence_api_interface = {
+static switch_api_interface_t presence_api_interface = {
        /*.interface_name */ "presence",
        /*.desc */ "presence",
        /*.function */ presence_api_function,
@@ -976,7 +976,7 @@ static const switch_api_interface_t presence_api_interface = {
 };
 
 
-static const switch_application_interface_t bridge_application_interface = {
+static switch_application_interface_t bridge_application_interface = {
        /*.interface_name */ "bridge",
        /*.application_function */ audio_bridge_function,
        /* long_desc */ "Bridge the audio between two sessions",
@@ -985,7 +985,7 @@ static const switch_application_interface_t bridge_application_interface = {
        /* flags */ SAF_SUPPORT_NOMEDIA
 };
 
-static const switch_application_interface_t speak_application_interface = {
+static switch_application_interface_t speak_application_interface = {
        /*.interface_name */ "speak",
        /*.application_function */ speak_function,
        /* long_desc */ "Speak text to a channel via the tts interface",
@@ -995,7 +995,7 @@ static const switch_application_interface_t speak_application_interface = {
        &bridge_application_interface
 };
 
-static const switch_application_interface_t record_application_interface = {
+static switch_application_interface_t record_application_interface = {
        /*.interface_name */ "record",
        /*.application_function */ record_function,
        /* long_desc */ "Record a file from the channels input",
@@ -1006,7 +1006,7 @@ static const switch_application_interface_t record_application_interface = {
 };
 
 
-static const switch_application_interface_t record_session_application_interface = {
+static switch_application_interface_t record_session_application_interface = {
        /*.interface_name */ "record_session",
        /*.application_function */ record_session_function,
        /* long_desc */ "Starts a background recording of the entire session",
@@ -1017,7 +1017,7 @@ static const switch_application_interface_t record_session_application_interface
 };
 
 
-static const switch_application_interface_t stop_record_session_application_interface = {
+static switch_application_interface_t stop_record_session_application_interface = {
        /*.interface_name */ "stop_record_session",
        /*.application_function */ stop_record_session_function,
        /* long_desc */ "Stops a background recording of the entire session",
@@ -1027,7 +1027,7 @@ static const switch_application_interface_t stop_record_session_application_inte
        &record_session_application_interface
 };
 
-static const switch_application_interface_t playback_application_interface = {
+static switch_application_interface_t playback_application_interface = {
        /*.interface_name */ "playback",
        /*.application_function */ playback_function,
        /* long_desc */ "Playback a file to the channel",
@@ -1036,7 +1036,7 @@ static const switch_application_interface_t playback_application_interface = {
        /* flags */ SAF_NONE,
        /*.next */ &stop_record_session_application_interface
 };
-static const switch_application_interface_t park_application_interface = {
+static switch_application_interface_t park_application_interface = {
        /*.interface_name */ "park",
        /*.application_function */ park_function,
        /* long_desc */ NULL,
@@ -1046,7 +1046,7 @@ static const switch_application_interface_t park_application_interface = {
        /*.next */ &playback_application_interface
 };
 
-static const switch_application_interface_t echo_application_interface = {
+static switch_application_interface_t echo_application_interface = {
        /*.interface_name */ "echo",
        /*.application_function */ echo_function,
        /* long_desc */ "Perform an echo test against the calling channel",
@@ -1056,7 +1056,7 @@ static const switch_application_interface_t echo_application_interface = {
        /*.next */ &park_application_interface
 };
 
-static const switch_application_interface_t fax_detect_application_interface = {
+static switch_application_interface_t fax_detect_application_interface = {
        /*.interface_name */ "fax_detect",
        /*.application_function */ fax_detect_session_function,
        /* long_desc */ "Detect fax send tone",
@@ -1066,7 +1066,7 @@ static const switch_application_interface_t fax_detect_application_interface = {
        /*.next */ &echo_application_interface
 };
 
-static const switch_application_interface_t stop_fax_detect_application_interface = {
+static switch_application_interface_t stop_fax_detect_application_interface = {
        /*.interface_name */ "stop_fax_detect",
        /*.application_function */ stop_fax_detect_session_function,
        /* long_desc */ "Stop detecting fax send tones",
@@ -1076,7 +1076,7 @@ static const switch_application_interface_t stop_fax_detect_application_interfac
        /* next */ &fax_detect_application_interface
 };
 
-static const switch_application_interface_t dtmf_application_interface = {
+static switch_application_interface_t dtmf_application_interface = {
        /*.interface_name */ "start_dtmf",
        /*.application_function */ dtm_session_function,
        /* long_desc */ "Detect inband dtmf on the session",
@@ -1086,7 +1086,7 @@ static const switch_application_interface_t dtmf_application_interface = {
        /* next */ &stop_fax_detect_application_interface
 };
 
-static const switch_application_interface_t stop_dtmf_application_interface = {
+static switch_application_interface_t stop_dtmf_application_interface = {
        /*.interface_name */ "stop_dtmf",
        /*.application_function */ stop_dtmf_session_function,
        /* long_desc */ "Stop detecting inband dtmf.",
@@ -1096,7 +1096,7 @@ static const switch_application_interface_t stop_dtmf_application_interface = {
        &dtmf_application_interface
 };
 
-static const switch_application_interface_t exe_application_interface = {
+static switch_application_interface_t exe_application_interface = {
        /*.interface_name */ "execute_extension",
        /*.application_function */ exe_function,
        /*.long_desc */ "Execute an extension",
@@ -1106,7 +1106,7 @@ static const switch_application_interface_t exe_application_interface = {
        /*.next */ &stop_dtmf_application_interface
 };
 
-static const switch_application_interface_t sched_transfer_application_interface = {
+static switch_application_interface_t sched_transfer_application_interface = {
        /*.interface_name */ "sched_transfer",
        /*.application_function */ sched_transfer_function,
        /*.long_desc */ "Schedule a transfer in the future",
@@ -1116,7 +1116,7 @@ static const switch_application_interface_t sched_transfer_application_interface
        /*.next */ &exe_application_interface
 };
 
-static const switch_application_interface_t sched_broadcast_application_interface = {
+static switch_application_interface_t sched_broadcast_application_interface = {
        /*.interface_name */ "sched_broadcast",
        /*.application_function */ sched_broadcast_function,
        /*.long_desc */ "Schedule a broadcast in the future",
@@ -1126,7 +1126,7 @@ static const switch_application_interface_t sched_broadcast_application_interfac
        /*.next */ &sched_transfer_application_interface
 };
 
-static const switch_application_interface_t sched_hangup_application_interface = {
+static switch_application_interface_t sched_hangup_application_interface = {
        /*.interface_name */ "sched_hangup",
        /*.application_function */ sched_hangup_function,
        /*.long_desc */ "Schedule a hangup in the future",
@@ -1137,7 +1137,7 @@ static const switch_application_interface_t sched_hangup_application_interface =
 };
 
 
-static const switch_application_interface_t queuedtmf_application_interface = {
+static switch_application_interface_t queuedtmf_application_interface = {
        /*.interface_name */ "queue_dtmf",
        /*.application_function */ queue_dtmf_function,
        /* long_desc */ "Queue dtmf to be sent from a session",
@@ -1147,7 +1147,7 @@ static const switch_application_interface_t queuedtmf_application_interface = {
        /*.next */ &sched_hangup_application_interface
 };
 
-static const switch_application_interface_t reject_application_interface = {
+static switch_application_interface_t reject_application_interface = {
        /*.interface_name */ "reject",
        /*.application_function */ reject_function,
        /* long_desc */ "Send a reject message to a session.",
@@ -1157,7 +1157,7 @@ static const switch_application_interface_t reject_application_interface = {
        /*.next */ &queuedtmf_application_interface
 };
 
-static const switch_application_interface_t redirect_application_interface = {
+static switch_application_interface_t redirect_application_interface = {
        /*.interface_name */ "redirect",
        /*.application_function */ redirect_function,
        /* long_desc */ "Send a redirect message to a session.",
@@ -1167,7 +1167,7 @@ static const switch_application_interface_t redirect_application_interface = {
        /*.next */ &reject_application_interface
 };
 
-static const switch_application_interface_t ivr_application_interface = {
+static switch_application_interface_t ivr_application_interface = {
        /*.interface_name */ "ivr",
        /*.application_function */ ivr_application_function,
        /* long_desc */ "Run an ivr menu.",
@@ -1177,7 +1177,7 @@ static const switch_application_interface_t ivr_application_interface = {
        /*.next */ &redirect_application_interface
 };
 
-static const switch_application_interface_t detect_speech_application_interface = {
+static switch_application_interface_t detect_speech_application_interface = {
        /*.interface_name */ "detect_speech",
        /*.application_function */ detect_speech_function,
        /* long_desc */ "Detect speech on a channel.",
@@ -1187,7 +1187,7 @@ static const switch_application_interface_t detect_speech_application_interface
        /*.next */ &ivr_application_interface
 };
 
-static const switch_application_interface_t ring_ready_application_interface = {
+static switch_application_interface_t ring_ready_application_interface = {
        /*.interface_name */ "ring_ready",
        /*.application_function */ ring_ready_function,
        /* long_desc */ "Indicate Ring_Ready on a channel.",
@@ -1197,7 +1197,7 @@ static const switch_application_interface_t ring_ready_application_interface = {
        /*.next */ &detect_speech_application_interface
 };
 
-static const switch_application_interface_t unset_application_interface = {
+static switch_application_interface_t unset_application_interface = {
        /*.interface_name */ "unset",
        /*.application_function */ unset_function,
        /* long_desc */ "Unset a channel varaible for the channel calling the application.",
@@ -1207,7 +1207,7 @@ static const switch_application_interface_t unset_application_interface = {
        /*.next */ &ring_ready_application_interface
 };
 
-static const switch_application_interface_t set_application_interface = {
+static switch_application_interface_t set_application_interface = {
        /*.interface_name */ "set",
        /*.application_function */ set_function,
        /* long_desc */ "Set a channel varaible for the channel calling the application.",
@@ -1217,7 +1217,7 @@ static const switch_application_interface_t set_application_interface = {
        /*.next */ &unset_application_interface
 };
 
-static const switch_application_interface_t export_application_interface = {
+static switch_application_interface_t export_application_interface = {
        /*.interface_name */ "export",
        /*.application_function */ export_function,
        /* long_desc */ "Set and export a channel varaible for the channel calling the application.",
@@ -1227,7 +1227,7 @@ static const switch_application_interface_t export_application_interface = {
        /*.next */ &set_application_interface
 };
 
-static const switch_application_interface_t info_application_interface = {
+static switch_application_interface_t info_application_interface = {
        /*.interface_name */ "info",
        /*.application_function */ info_function,
        /* long_desc */ "Display Call Info",
@@ -1237,7 +1237,7 @@ static const switch_application_interface_t info_application_interface = {
        /*.next */ &export_application_interface
 };
 
-static const switch_application_interface_t log_application_interface = {
+static switch_application_interface_t log_application_interface = {
        /*.interface_name */ "log",
        /*.application_function */ log_function,
        /* long_desc */ "Logs a channel varaible for the channel calling the application.",
@@ -1248,7 +1248,7 @@ static const switch_application_interface_t log_application_interface = {
 };
 
 
-static const switch_application_interface_t hangup_application_interface = {
+static switch_application_interface_t hangup_application_interface = {
        /*.interface_name */ "hangup",
        /*.application_function */ hangup_function,
        /* long_desc */ "Hangup the call for a channel.",
@@ -1258,7 +1258,7 @@ static const switch_application_interface_t hangup_application_interface = {
        /*.next */ &log_application_interface
 };
 
-static const switch_application_interface_t answer_application_interface = {
+static switch_application_interface_t answer_application_interface = {
        /*.interface_name */ "answer",
        /*.application_function */ answer_function,
        /* long_desc */ "Answer the call for a channel.",
@@ -1268,7 +1268,7 @@ static const switch_application_interface_t answer_application_interface = {
        /*.next */ &hangup_application_interface
 };
 
-static const switch_application_interface_t pre_answer_application_interface = {
+static switch_application_interface_t pre_answer_application_interface = {
        /*.interface_name */ "pre_answer",
        /*.application_function */ pre_answer_function,
        /* long_desc */ "Pre-Answer the call for a channel.",
@@ -1278,7 +1278,7 @@ static const switch_application_interface_t pre_answer_application_interface = {
        /*.next */ &answer_application_interface
 };
 
-static const switch_application_interface_t eval_application_interface = {
+static switch_application_interface_t eval_application_interface = {
        /*.interface_name */ "eval",
        /*.application_function */ eval_function,
        /* long_desc */ "Do Nothing",
@@ -1288,7 +1288,7 @@ static const switch_application_interface_t eval_application_interface = {
        /*.next */ &pre_answer_application_interface
 };
 
-static const switch_application_interface_t phrase_application_interface = {
+static switch_application_interface_t phrase_application_interface = {
        /*.interface_name */ "phrase",
        /*.application_function */ phrase_function,
        /* long_desc */ "Say a Phrase",
@@ -1298,7 +1298,7 @@ static const switch_application_interface_t phrase_application_interface = {
        /*.next */ &eval_application_interface
 };
 
-static const switch_application_interface_t strftime_application_interface = {
+static switch_application_interface_t strftime_application_interface = {
        /*.interface_name */ "strftime",
        /*.application_function */ strftime_function,
        /* long_desc */ NULL,
@@ -1308,7 +1308,7 @@ static const switch_application_interface_t strftime_application_interface = {
        /*.next */ &phrase_application_interface
 };
 
-static const switch_application_interface_t sleep_application_interface = {
+static switch_application_interface_t sleep_application_interface = {
        /*.interface_name */ "sleep",
        /*.application_function */ sleep_function,
        /* long_desc */
@@ -1319,7 +1319,7 @@ static const switch_application_interface_t sleep_application_interface = {
        /* next */ &strftime_application_interface
 };
 
-static const switch_application_interface_t transfer_application_interface = {
+static switch_application_interface_t transfer_application_interface = {
        /*.interface_name */ "transfer",
        /*.application_function */ transfer_function,
        /* long_desc */ "Immediatly transfer the calling channel to a new extension",
@@ -1329,7 +1329,7 @@ static const switch_application_interface_t transfer_application_interface = {
        /* next */ &sleep_application_interface
 };
 
-static const switch_application_interface_t privacy_application_interface = {
+static switch_application_interface_t privacy_application_interface = {
        /*.interface_name */ "privacy",
        /*.application_function */ privacy_function,
        /* long_desc */ "Set caller privacy on calls.",
@@ -1339,7 +1339,7 @@ static const switch_application_interface_t privacy_application_interface = {
        /*.next */ &transfer_application_interface
 };
 
-static const switch_loadable_module_interface_t dptools_module_interface = {
+static switch_loadable_module_interface_t dptools_module_interface = {
        /*.module_name = */ modname,
        /*.endpoint_interface = */ NULL,
        /*.timer_interface = */ NULL,
index 25c0f054da108e5435473daeb38af37aafe3f882..afd29058cf9be4d490e4a4df2b720ac2fa6d6d8d 100644 (file)
@@ -685,13 +685,13 @@ SWITCH_STANDARD_API(enum_function)
 }
 
 
-static const switch_dialplan_interface_t enum_dialplan_interface = {
+static switch_dialplan_interface_t enum_dialplan_interface = {
        /*.interface_name = */ "enum",
        /*.hunt_function = */ enum_dialplan_hunt
                /*.next = NULL */
 };
 
-static const switch_application_interface_t enum_application_interface = {
+static switch_application_interface_t enum_application_interface = {
        /*.interface_name */ "enum",
        /*.application_function */ enum_app_function,
        /* long_desc */ "Perform an ENUM lookup",
index ac64b8d179e7c66441b4611802e785f108c7ede2..336ad0899de1c5d753b5c41d7bd221dfc8f30335 100644 (file)
@@ -228,7 +228,7 @@ static void bcast_function(switch_core_session_t *session, char *data)
 }
 
 
-static const switch_application_interface_t bcast_application_interface = {
+static switch_application_interface_t bcast_application_interface = {
        /*.interface_name */ "esf_ls_page_group",
        /*.application_function */ bcast_function,
        NULL, NULL, NULL,
@@ -236,7 +236,7 @@ static const switch_application_interface_t bcast_application_interface = {
        /*.next */ NULL
 };
 
-static const switch_loadable_module_interface_t mod_ivrtest_module_interface = {
+static switch_loadable_module_interface_t mod_ivrtest_module_interface = {
        /*.module_name = */ modname,
        /*.endpoint_interface = */ NULL,
        /*.timer_interface = */ NULL,
index f5c0c4e15e59a489138d5a8da9ab03074620802b..128d9cc01875e69191b24fae53ee38a9db82d50a 100644 (file)
@@ -423,7 +423,7 @@ static switch_status_t my_on_hangup(switch_core_session_t *session)
 
 }
 
-static const switch_state_handler_table_t state_handlers = {
+static switch_state_handler_table_t state_handlers = {
        /*.on_init */ NULL,
        /*.on_ring */ NULL,
        /*.on_execute */ NULL,
@@ -434,7 +434,7 @@ static const switch_state_handler_table_t state_handlers = {
 
 
 
-static const switch_application_interface_t bug_application_interface = {
+static switch_application_interface_t bug_application_interface = {
        /*.interface_name */ "bugtest",
        /*.application_function */ bugtest_function,
        NULL, NULL, NULL,
@@ -442,7 +442,7 @@ static const switch_application_interface_t bug_application_interface = {
        /*.next */ NULL
 };
 
-static const switch_application_interface_t ivr_application_interface = {
+static switch_application_interface_t ivr_application_interface = {
        /*.interface_name */ "ivrmenu",
        /*.application_function */ ivr_application_function,
        NULL, NULL, NULL,
@@ -450,7 +450,7 @@ static const switch_application_interface_t ivr_application_interface = {
        /*.next */ &bug_application_interface
 };
 
-static const switch_application_interface_t xml_application_interface = {
+static switch_application_interface_t xml_application_interface = {
        /*.interface_name */ "xml",
        /*.application_function */ xml_function,
        NULL, NULL, NULL,
@@ -458,7 +458,7 @@ static const switch_application_interface_t xml_application_interface = {
        /*.next */ &ivr_application_interface
 };
 
-static const switch_application_interface_t disast_application_interface = {
+static switch_application_interface_t disast_application_interface = {
        /*.interface_name */ "disast",
        /*.application_function */ disast_function,
        NULL, NULL, NULL,
@@ -466,7 +466,7 @@ static const switch_application_interface_t disast_application_interface = {
        /*.next */ &xml_application_interface
 };
 
-static const switch_application_interface_t tts_application_interface = {
+static switch_application_interface_t tts_application_interface = {
        /*.interface_name */ "tts",
        /*.application_function */ tts_function,
        NULL, NULL, NULL,
@@ -474,7 +474,7 @@ static const switch_application_interface_t tts_application_interface = {
        /*.next */ &disast_application_interface
 };
 
-static const switch_application_interface_t dirtest_application_interface = {
+static switch_application_interface_t dirtest_application_interface = {
        /*.interface_name */ "dirtest",
        /*.application_function */ dirtest_function,
        NULL, NULL, NULL,
@@ -482,7 +482,7 @@ static const switch_application_interface_t dirtest_application_interface = {
        /*.next */ &tts_application_interface
 };
 
-static const switch_application_interface_t ivrtest_application_interface = {
+static switch_application_interface_t ivrtest_application_interface = {
        /*.interface_name */ "ivrtest",
        /*.application_function */ ivrtest_function,
        NULL, NULL, NULL,
@@ -490,7 +490,7 @@ static const switch_application_interface_t ivrtest_application_interface = {
        /*.next */ &dirtest_application_interface
 };
 
-static const switch_application_interface_t asrtest_application_interface = {
+static switch_application_interface_t asrtest_application_interface = {
        /*.interface_name */ "asrtest",
        /*.application_function */ asrtest_function,
        NULL, NULL, NULL,
@@ -498,7 +498,7 @@ static const switch_application_interface_t asrtest_application_interface = {
        /*.next */ &ivrtest_application_interface
 };
 
-static const switch_loadable_module_interface_t ivrtest_module_interface = {
+static switch_loadable_module_interface_t ivrtest_module_interface = {
        /*.module_name = */ modname,
        /*.endpoint_interface = */ NULL,
        /*.timer_interface = */ NULL,
index c694f08bd6d0924aecc2b2f7747bdf0207712813..693d3d99c3f76d9ef3e16b8eb17121b2de1af690 100644 (file)
@@ -613,7 +613,7 @@ static void rss_function(switch_core_session_t *session, char *data)
        switch_core_session_reset(session);
 }
 
-static const switch_application_interface_t rss_application_interface = {
+static switch_application_interface_t rss_application_interface = {
        /*.interface_name */ "rss",
        /*.application_function */ rss_function,
        NULL, NULL, NULL,
index ee5890db69a997c8e284d206c716c9db2afe28e7..62816f274ec0ef795eda4b89bb238f4073f1cb4d 100644 (file)
@@ -306,7 +306,7 @@ static void soundtouch_start_function(switch_core_session_t *session, char *data
        switch_channel_set_private(channel, "_soundtouch_", bug);
     
 }
-static const switch_application_interface_t soundtouch_application_interface = {
+static switch_application_interface_t soundtouch_application_interface = {
        /*.interface_name */ "soundtouch",
        /*.application_function */ soundtouch_start_function,
        /* long_desc */ "Alter the audio stream",
index 8931cd1f762aa9a3fcfc8b6c2d5e53d539af3e0c..abc40429e797018f425f0047d136f913924cee2a 100644 (file)
@@ -402,7 +402,7 @@ static void cepstral_float_param_tts(switch_speech_handle_t *sh, char *param, do
 
 }
 
-static const switch_speech_interface_t cepstral_speech_interface = {
+static switch_speech_interface_t cepstral_speech_interface = {
        /*.interface_name */ "cepstral",
        /*.speech_open */ cepstral_speech_open,
        /*.speech_close */ cepstral_speech_close,
@@ -414,7 +414,7 @@ static const switch_speech_interface_t cepstral_speech_interface = {
        /*.speech_numeric_param_tts */ cepstral_float_param_tts
 };
 
-static const switch_loadable_module_interface_t cepstral_module_interface = {
+static switch_loadable_module_interface_t cepstral_module_interface = {
        /*.module_name */ modname,
        /*.endpoint_interface */ NULL,
        /*.timer_interface */ NULL,
index 29150541892db67b7ea2b3566570fe4fac115953..eda68e17578d731ad747fbf2459c942dd035b197 100644 (file)
@@ -290,7 +290,7 @@ static switch_status_t switch_amr_decode(switch_codec_t *codec,
 
 /* Registration */
 
-static const switch_codec_implementation_t amr_implementation = {
+static switch_codec_implementation_t amr_implementation = {
        /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
        /*.ianacode */ 96,
        /*.iananame */ "AMR",
@@ -310,7 +310,7 @@ static const switch_codec_implementation_t amr_implementation = {
        /*.destroy */ switch_amr_destroy,
 };
 
-static const switch_codec_interface_t amr_codec_interface = {
+static switch_codec_interface_t amr_codec_interface = {
        /*.interface_name */ "GSM-AMR",
        /*.implementations */ &amr_implementation,
 };
index 4fc632f80d58b5755c27eccce703aaebbb0291e0..496a94226dfb964deb65247a7c1ec1985ec14865 100644 (file)
@@ -182,7 +182,7 @@ static switch_status_t switch_g711a_destroy(switch_codec_t *codec)
 /* Registration */
 
 
-static const switch_codec_implementation_t g711u_8k_120ms_implementation = {
+static switch_codec_implementation_t g711u_8k_120ms_implementation = {
        /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
        /*.ianacode */ 0,
        /*.iananame */ "PCMU",
@@ -202,7 +202,7 @@ static const switch_codec_implementation_t g711u_8k_120ms_implementation = {
        /*.destroy */ switch_g711u_destroy
 };
 
-static const switch_codec_implementation_t g711u_8k_60ms_implementation = {
+static switch_codec_implementation_t g711u_8k_60ms_implementation = {
        /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
        /*.ianacode */ 0,
        /*.iananame */ "PCMU",
@@ -223,7 +223,7 @@ static const switch_codec_implementation_t g711u_8k_60ms_implementation = {
        /*.next */ &g711u_8k_120ms_implementation
 };
 
-static const switch_codec_implementation_t g711u_8k_30ms_implementation = {
+static switch_codec_implementation_t g711u_8k_30ms_implementation = {
        /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
        /*.ianacode */ 0,
        /*.iananame */ "PCMU",
@@ -244,7 +244,7 @@ static const switch_codec_implementation_t g711u_8k_30ms_implementation = {
        /*.next */ &g711u_8k_60ms_implementation
 };
 
-static const switch_codec_implementation_t g711u_8k_20ms_implementation = {
+static switch_codec_implementation_t g711u_8k_20ms_implementation = {
        /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
        /*.ianacode */ 0,
        /*.iananame */ "PCMU",
@@ -265,7 +265,7 @@ static const switch_codec_implementation_t g711u_8k_20ms_implementation = {
        /*.next */ &g711u_8k_30ms_implementation
 };
 
-static const switch_codec_implementation_t g711u_8k_10ms_implementation = {
+static switch_codec_implementation_t g711u_8k_10ms_implementation = {
        /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
        /*.ianacode */ 0,
        /*.iananame */ "PCMU",
@@ -288,7 +288,7 @@ static const switch_codec_implementation_t g711u_8k_10ms_implementation = {
 
 
 
-static const switch_codec_implementation_t g711a_8k_120ms_implementation = {
+static switch_codec_implementation_t g711a_8k_120ms_implementation = {
        /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
        /*.ianacode */ 8,
        /*.iananame */ "PCMA",
@@ -308,7 +308,7 @@ static const switch_codec_implementation_t g711a_8k_120ms_implementation = {
        /*.destroy */ switch_g711a_destroy
 };
 
-static const switch_codec_implementation_t g711a_8k_60ms_implementation = {
+static switch_codec_implementation_t g711a_8k_60ms_implementation = {
        /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
        /*.ianacode */ 8,
        /*.iananame */ "PCMA",
@@ -329,7 +329,7 @@ static const switch_codec_implementation_t g711a_8k_60ms_implementation = {
        /*.next */ &g711a_8k_120ms_implementation
 };
 
-static const switch_codec_implementation_t g711a_8k_30ms_implementation = {
+static switch_codec_implementation_t g711a_8k_30ms_implementation = {
        /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
        /*.ianacode */ 8,
        /*.iananame */ "PCMA",
@@ -350,7 +350,7 @@ static const switch_codec_implementation_t g711a_8k_30ms_implementation = {
        /*.next */ &g711a_8k_60ms_implementation
 };
 
-static const switch_codec_implementation_t g711a_8k_20ms_implementation = {
+static switch_codec_implementation_t g711a_8k_20ms_implementation = {
        /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
        /*.ianacode */ 8,
        /*.iananame */ "PCMA",
@@ -371,7 +371,7 @@ static const switch_codec_implementation_t g711a_8k_20ms_implementation = {
        /*.next */ &g711a_8k_30ms_implementation
 };
 
-static const switch_codec_implementation_t g711a_8k_10ms_implementation = {
+static switch_codec_implementation_t g711a_8k_10ms_implementation = {
        /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
        /*.ianacode */ 8,
        /*.iananame */ "PCMA",
@@ -394,12 +394,12 @@ static const switch_codec_implementation_t g711a_8k_10ms_implementation = {
 
 
 
-static const switch_codec_interface_t g711a_codec_interface = {
+static switch_codec_interface_t g711a_codec_interface = {
        /*.interface_name */ "g711 alaw",
        /*.implementations */ &g711a_8k_10ms_implementation
 };
 
-static const switch_codec_interface_t g711u_codec_interface = {
+static switch_codec_interface_t g711u_codec_interface = {
        /*.interface_name */ "g711 ulaw",
        /*.implementations */ &g711u_8k_10ms_implementation,
        /*.next */ &g711a_codec_interface
index e7228890898b0d20a93642b5bcd4a8b0104f9d8c..dbb345ddec306300bd9a90fefae3aa2334193a8f 100644 (file)
@@ -118,7 +118,7 @@ static switch_status_t switch_g722_destroy(switch_codec_t *codec)
 
 /* Registration */
 
-static const switch_codec_implementation_t g722_8k_implementation = {
+static switch_codec_implementation_t g722_8k_implementation = {
        /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
        /*.ianacode */ 109,
        /*.iananame */ "G722_8",
@@ -138,7 +138,7 @@ static const switch_codec_implementation_t g722_8k_implementation = {
        /*.destroy */ switch_g722_destroy,
 };
 
-static const switch_codec_implementation_t g722_16k_implementation = {
+static switch_codec_implementation_t g722_16k_implementation = {
        /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
        /*.ianacode */ 9,
        /*.iananame */ "G722",
@@ -159,7 +159,7 @@ static const switch_codec_implementation_t g722_16k_implementation = {
        /*.next */ &g722_8k_implementation
 };
 
-static const switch_codec_interface_t g722_codec_interface = {
+static switch_codec_interface_t g722_codec_interface = {
        /*.interface_name */ "g722",
        /*.implementations */ &g722_16k_implementation
 };
index 7b4710d650478cef8a6f88ed38b08c1f71d13894..5ee5233a5e73f1c8996e661ca3be1b687c08bdfc 100644 (file)
@@ -169,7 +169,7 @@ static switch_status_t switch_g723_decode(switch_codec_t *codec,
 
 /* Registration */
 
-static const switch_codec_implementation_t g723_1_implementation = {
+static switch_codec_implementation_t g723_1_implementation = {
        /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
        /*.ianacode */ 4,
        /*.iananame */ "G723",
@@ -189,7 +189,7 @@ static const switch_codec_implementation_t g723_1_implementation = {
        /*.destroy */ switch_g723_destroy,
 };
 
-static const switch_codec_interface_t g723_1_codec_interface = {
+static switch_codec_interface_t g723_1_codec_interface = {
        /*.interface_name */ "g723.1 6.3k",
        /*.implementations */ &g723_1_implementation,
 };
index 6525ca14de2ae482e8eaf7e2c7ccc1c5f1c6a51e..6a14fbbf259bc18199b35d13aaf0b5d377cfced0 100644 (file)
@@ -204,7 +204,7 @@ static switch_status_t switch_g726_decode(switch_codec_t *codec,
 
 /* Registration */
 
-static const switch_codec_implementation_t g726_16k_implementation = {
+static switch_codec_implementation_t g726_16k_implementation = {
        /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
        /*.ianacode */ 127,
        /*.iananame */ "G726-16",
@@ -225,7 +225,7 @@ static const switch_codec_implementation_t g726_16k_implementation = {
 };
 
 
-static const switch_codec_implementation_t g726_24k_implementation = {
+static switch_codec_implementation_t g726_24k_implementation = {
        /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
        /*.ianacode */ 126,
        /*.iananame */ "G726-24",
@@ -245,7 +245,7 @@ static const switch_codec_implementation_t g726_24k_implementation = {
        /*.destroy */ switch_g726_destroy,
 };
 
-static const switch_codec_implementation_t g726_32k_implementation = {
+static switch_codec_implementation_t g726_32k_implementation = {
        /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
        /*.ianacode */ 2,
        /*.iananame */ "G726-32",
@@ -265,7 +265,7 @@ static const switch_codec_implementation_t g726_32k_implementation = {
        /*.destroy */ switch_g726_destroy,
 };
 
-static const switch_codec_implementation_t g726_40k_implementation = {
+static switch_codec_implementation_t g726_40k_implementation = {
        /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
        /*.ianacode */ 125,
        /*.iananame */ "G726-40",
@@ -287,7 +287,7 @@ static const switch_codec_implementation_t g726_40k_implementation = {
 
 
 
-static const switch_codec_implementation_t aal2_g726_16k_implementation = {
+static switch_codec_implementation_t aal2_g726_16k_implementation = {
        /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
        /*.ianacode */ 124,
        /*.iananame */ "AAL2-G726-16",
@@ -308,7 +308,7 @@ static const switch_codec_implementation_t aal2_g726_16k_implementation = {
 };
 
 
-static const switch_codec_implementation_t aal2_g726_24k_implementation = {
+static switch_codec_implementation_t aal2_g726_24k_implementation = {
        /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
        /*.ianacode */ 123,
        /*.iananame */ "AAL2-G726-24",
@@ -328,7 +328,7 @@ static const switch_codec_implementation_t aal2_g726_24k_implementation = {
        /*.destroy */ switch_g726_destroy,
 };
 
-static const switch_codec_implementation_t aal2_g726_32k_implementation = {
+static switch_codec_implementation_t aal2_g726_32k_implementation = {
        /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
        /*.ianacode */ 2,
        /*.iananame */ "AAL2-G726-32",
@@ -348,7 +348,7 @@ static const switch_codec_implementation_t aal2_g726_32k_implementation = {
        /*.destroy */ switch_g726_destroy,
 };
 
-static const switch_codec_implementation_t aal2_g726_40k_implementation = {
+static switch_codec_implementation_t aal2_g726_40k_implementation = {
        /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
        /*.ianacode */ 122,
        /*.iananame */ "AAL2-G726-40",
index c4d07b6ccd5266c7ec10990ff525053205a63965..80ceecc74560c31b92ac4e83f3d1ec7d3a5e50f9 100644 (file)
@@ -212,7 +212,7 @@ static switch_status_t switch_g729_decode(switch_codec_t *codec,
 
 /* Registration */
 
-static const switch_codec_implementation_t g729_40ms_8k_implementation = {
+static switch_codec_implementation_t g729_40ms_8k_implementation = {
        /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
        /*.ianacode */ 18,
        /*.iananame */ "G729",
@@ -232,7 +232,7 @@ static const switch_codec_implementation_t g729_40ms_8k_implementation = {
        /*.destroy */ switch_g729_destroy,
 };
 
-static const switch_codec_implementation_t g729_30ms_8k_implementation = {
+static switch_codec_implementation_t g729_30ms_8k_implementation = {
        /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
        /*.ianacode */ 18,
        /*.iananame */ "G729",
@@ -253,7 +253,7 @@ static const switch_codec_implementation_t g729_30ms_8k_implementation = {
        &g729_40ms_8k_implementation
 };
 
-static const switch_codec_implementation_t g729_10ms_8k_implementation = {
+static switch_codec_implementation_t g729_10ms_8k_implementation = {
        /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
        /*.ianacode */ 18,
        /*.iananame */ "G729",
@@ -274,7 +274,7 @@ static const switch_codec_implementation_t g729_10ms_8k_implementation = {
        &g729_30ms_8k_implementation
 };
 
-static const switch_codec_implementation_t g729_8k_implementation = {
+static switch_codec_implementation_t g729_8k_implementation = {
        /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
        /*.ianacode */ 18,
        /*.iananame */ "G729",
@@ -295,7 +295,7 @@ static const switch_codec_implementation_t g729_8k_implementation = {
        &g729_10ms_8k_implementation
 };
 
-static const switch_codec_interface_t g729_codec_interface = {
+static switch_codec_interface_t g729_codec_interface = {
        /*.interface_name */ "g729",
        /*.implementations */ &g729_8k_implementation,
        /*.next */ NULL
index 0dbb545b863e529c46dd3eaa2daf86c3b322eef1..dc55c43fc5f56885b7a01f00b1f6bb9ce093b050 100644 (file)
@@ -134,7 +134,7 @@ static switch_status_t switch_gsm_decode(switch_codec_t *codec, switch_codec_t *
 
 
 /* Registration */
-static const switch_codec_implementation_t gsm_8k_implementation = {
+static switch_codec_implementation_t gsm_8k_implementation = {
        /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
        /*.ianacode */ 3,
        /*.iananame */ "GSM",
@@ -153,7 +153,7 @@ static const switch_codec_implementation_t gsm_8k_implementation = {
        /*.decode */ switch_gsm_decode,
        /*.destroy */ switch_gsm_destroy,
 };
-static const switch_codec_interface_t gsm_codec_interface = {
+static switch_codec_interface_t gsm_codec_interface = {
        /*.interface_name */ "gsm",
        /*.implementations */ &gsm_8k_implementation,
 };
index c12e0db818afbaa52b5fe98090fcf28741a0dc07..468f003ec7b456410536ee4929816026f6a3f01a 100644 (file)
@@ -75,7 +75,7 @@ static switch_status_t switch_h26x_destroy(switch_codec_t *codec)
        return SWITCH_STATUS_SUCCESS;
 }
 
-static const switch_codec_implementation_t h264_90000_implementation = {
+static switch_codec_implementation_t h264_90000_implementation = {
        /*.codec_type */ SWITCH_CODEC_TYPE_VIDEO,
        /*.ianacode */ 99,
        /*.iananame */ "H264",
@@ -96,7 +96,7 @@ static const switch_codec_implementation_t h264_90000_implementation = {
        /*.next = */
 };
 
-static const switch_codec_implementation_t h263_90000_implementation = {
+static switch_codec_implementation_t h263_90000_implementation = {
        /*.codec_type */ SWITCH_CODEC_TYPE_VIDEO,
        /*.ianacode */ 34,
        /*.iananame */ "H263",
@@ -117,7 +117,7 @@ static const switch_codec_implementation_t h263_90000_implementation = {
        /*.next = */&h264_90000_implementation
 };
 
-static const switch_codec_interface_t h26x_codec_interface = {
+static switch_codec_interface_t h26x_codec_interface = {
        /*.interface_name */ "h26x video (passthru)",
        /*.implementations */ &h263_90000_implementation
 };
index a1a6cbde0a11b75b36a8aa36c5aad250cb8a4b82..d7dbf211224328461960c8a2639e7c0cd2dcf804 100644 (file)
@@ -182,7 +182,7 @@ static switch_status_t switch_ilbc_decode(switch_codec_t *codec,
 
 /* Registration */
 
-static const switch_codec_implementation_t ilbc_8k_30ms_implementation = {
+static switch_codec_implementation_t ilbc_8k_30ms_implementation = {
        /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
        /*.ianacode */ 97,
        /*.iananame */ "iLBC",
@@ -202,7 +202,7 @@ static const switch_codec_implementation_t ilbc_8k_30ms_implementation = {
        /*.destroy */ switch_ilbc_destroy
 };
 
-static const switch_codec_implementation_t ilbc_8k_20ms_implementation = {
+static switch_codec_implementation_t ilbc_8k_20ms_implementation = {
        /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
        /*.ianacode */ 97,
        /*.iananame */ "iLBC",
@@ -225,7 +225,7 @@ static const switch_codec_implementation_t ilbc_8k_20ms_implementation = {
 
 
 
-static const switch_codec_implementation_t ilbc_102_8k_30ms_implementation = {
+static switch_codec_implementation_t ilbc_102_8k_30ms_implementation = {
        /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
        /*.ianacode */ 102,
        /*.iananame */ "iLBC",
@@ -245,7 +245,7 @@ static const switch_codec_implementation_t ilbc_102_8k_30ms_implementation = {
        /*.destroy */ switch_ilbc_destroy
 };
 
-static const switch_codec_implementation_t ilbc_102_8k_20ms_implementation = {
+static switch_codec_implementation_t ilbc_102_8k_20ms_implementation = {
        /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
        /*.ianacode */ 102,
        /*.iananame */ "iLBC102",
@@ -267,7 +267,7 @@ static const switch_codec_implementation_t ilbc_102_8k_20ms_implementation = {
 };
 
 
-static const switch_codec_implementation_t ilbc_8k_20ms_nonext_implementation = {
+static switch_codec_implementation_t ilbc_8k_20ms_nonext_implementation = {
        /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
        /*.ianacode */ 97,
        /*.iananame */ "iLBC20ms",
@@ -288,18 +288,18 @@ static const switch_codec_implementation_t ilbc_8k_20ms_nonext_implementation =
 };
 
 
-static const switch_codec_interface_t ilbc_20ms_codec_interface = {
+static switch_codec_interface_t ilbc_20ms_codec_interface = {
        /*.interface_name */ "ilbc",
        /*.implementations */ &ilbc_8k_20ms_nonext_implementation
 };
 
-static const switch_codec_interface_t ilbc_102_codec_interface = {
+static switch_codec_interface_t ilbc_102_codec_interface = {
        /*.interface_name */ "ilbc",
        /*.implementations */ &ilbc_102_8k_20ms_implementation,
        /*.next */ &ilbc_20ms_codec_interface
 };
 
-static const switch_codec_interface_t ilbc_codec_interface = {
+static switch_codec_interface_t ilbc_codec_interface = {
        /*.interface_name */ "ilbc",
        /*.implementations */ &ilbc_8k_20ms_implementation,
        /*.next */ &ilbc_102_codec_interface
index 92b5e2fde117d6a3ba715d9950d83fb947b8ba55..ff16c9b469b691d0ee93cf8ed269f747b4acf31e 100644 (file)
@@ -86,7 +86,7 @@ static switch_status_t switch_raw_destroy(switch_codec_t *codec)
        return SWITCH_STATUS_SUCCESS;
 }
 
-static const switch_codec_implementation_t raw_32k_60ms_implementation = {
+static switch_codec_implementation_t raw_32k_60ms_implementation = {
        /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
        /*.ianacode */ 119,
        /*.iananame */ "L16",
@@ -107,7 +107,7 @@ static const switch_codec_implementation_t raw_32k_60ms_implementation = {
                /*.next = */
 };
 
-static const switch_codec_implementation_t raw_32k_30ms_implementation = {
+static switch_codec_implementation_t raw_32k_30ms_implementation = {
        /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
        /*.ianacode */ 119,
        /*.iananame */ "L16",
@@ -128,7 +128,7 @@ static const switch_codec_implementation_t raw_32k_30ms_implementation = {
        /*.next = */ &raw_32k_60ms_implementation
 };
 
-static const switch_codec_implementation_t raw_32k_20ms_implementation = {
+static switch_codec_implementation_t raw_32k_20ms_implementation = {
        /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
        /*.ianacode */ 119,
        /*.iananame */ "L16",
@@ -149,7 +149,7 @@ static const switch_codec_implementation_t raw_32k_20ms_implementation = {
        /*.next = */ &raw_32k_30ms_implementation
 };
 
-static const switch_codec_implementation_t raw_32k_10ms_implementation = {
+static switch_codec_implementation_t raw_32k_10ms_implementation = {
        /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
        /*.ianacode */ 119,
        /*.iananame */ "L16",
@@ -170,7 +170,7 @@ static const switch_codec_implementation_t raw_32k_10ms_implementation = {
        /*.next = */ &raw_32k_20ms_implementation
 };
 
-static const switch_codec_implementation_t raw_22k_20ms_implementation = {
+static switch_codec_implementation_t raw_22k_20ms_implementation = {
        /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
        /*.ianacode */ 118,
        /*.iananame */ "L16",
@@ -191,7 +191,7 @@ static const switch_codec_implementation_t raw_22k_20ms_implementation = {
        /*.next = */ &raw_32k_10ms_implementation
 };
 
-static const switch_codec_implementation_t raw_16k_120ms_implementation = {
+static switch_codec_implementation_t raw_16k_120ms_implementation = {
        /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
        /*.ianacode */ 117,
        /*.iananame */ "L16",
@@ -212,7 +212,7 @@ static const switch_codec_implementation_t raw_16k_120ms_implementation = {
        /*.next */ &raw_22k_20ms_implementation
 };
 
-static const switch_codec_implementation_t raw_16k_60ms_implementation = {
+static switch_codec_implementation_t raw_16k_60ms_implementation = {
        /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
        /*.ianacode */ 117,
        /*.iananame */ "L16",
@@ -233,7 +233,7 @@ static const switch_codec_implementation_t raw_16k_60ms_implementation = {
        /*.next */ &raw_16k_120ms_implementation
 };
 
-static const switch_codec_implementation_t raw_16k_30ms_implementation = {
+static switch_codec_implementation_t raw_16k_30ms_implementation = {
        /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
        /*.ianacode */ 117,
        /*.iananame */ "L16",
@@ -254,7 +254,7 @@ static const switch_codec_implementation_t raw_16k_30ms_implementation = {
        /*.next */ &raw_16k_60ms_implementation
 };
 
-static const switch_codec_implementation_t raw_16k_20ms_implementation = {
+static switch_codec_implementation_t raw_16k_20ms_implementation = {
        /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
        /*.ianacode */ 117,
        /*.iananame */ "L16",
@@ -275,7 +275,7 @@ static const switch_codec_implementation_t raw_16k_20ms_implementation = {
        /*.next = */ &raw_16k_30ms_implementation
 };
 
-static const switch_codec_implementation_t raw_16k_10ms_implementation = {
+static switch_codec_implementation_t raw_16k_10ms_implementation = {
        /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
        /*.ianacode */ 117,
        /*.iananame */ "L16",
@@ -299,7 +299,7 @@ static const switch_codec_implementation_t raw_16k_10ms_implementation = {
 ///////////////////////////////
 
 
-static const switch_codec_implementation_t raw_8k_120ms_implementation = {
+static switch_codec_implementation_t raw_8k_120ms_implementation = {
        /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
        /*.ianacode */ 10,
        /*.iananame */ "L16",
@@ -321,7 +321,7 @@ static const switch_codec_implementation_t raw_8k_120ms_implementation = {
 };
 
 
-static const switch_codec_implementation_t raw_8k_60ms_implementation = {
+static switch_codec_implementation_t raw_8k_60ms_implementation = {
        /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
        /*.ianacode */ 10,
        /*.iananame */ "L16",
@@ -342,7 +342,7 @@ static const switch_codec_implementation_t raw_8k_60ms_implementation = {
        /*.next */ &raw_8k_120ms_implementation
 };
 
-static const switch_codec_implementation_t raw_8k_30ms_implementation = {
+static switch_codec_implementation_t raw_8k_30ms_implementation = {
        /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
        /*.ianacode */ 10,
        /*.iananame */ "L16",
@@ -362,7 +362,7 @@ static const switch_codec_implementation_t raw_8k_30ms_implementation = {
        /*.destroy */ switch_raw_destroy,
        /*.next */ &raw_8k_60ms_implementation
 };
-static const switch_codec_implementation_t raw_8k_20ms_implementation = {
+static switch_codec_implementation_t raw_8k_20ms_implementation = {
        /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
        /*.ianacode */ 10,
        /*.iananame */ "L16",
@@ -385,7 +385,7 @@ static const switch_codec_implementation_t raw_8k_20ms_implementation = {
 
 
 
-static const switch_codec_implementation_t raw_8k_10ms_implementation = {
+static switch_codec_implementation_t raw_8k_10ms_implementation = {
        /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
        /*.ianacode */ 10,
        /*.iananame */ "L16",
@@ -407,7 +407,7 @@ static const switch_codec_implementation_t raw_8k_10ms_implementation = {
 };
 
 
-static const switch_codec_interface_t raw_codec_interface = {
+static switch_codec_interface_t raw_codec_interface = {
        /*.interface_name */ "raw signed linear (16 bit)",
        /*.implementations */ &raw_8k_10ms_implementation
 };
index e059e242af8019c799c42756d1a953e2b8aaacbe..21f845194320fb0a038d51716399f2814683504c 100644 (file)
@@ -156,7 +156,7 @@ static switch_status_t switch_lpc10_decode(switch_codec_t *codec,
 
 /* Registration */
 
-static const switch_codec_implementation_t lpc10_implementation = {
+static switch_codec_implementation_t lpc10_implementation = {
        /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
        /*.ianacode */ 7,
        /*.iananame */ "LPC",
index 60db8f56048ca8cc17964c01959b2d1bda76af04..d29858c836a77f89d76be52ce68d2c5809cb973b 100644 (file)
@@ -36,7 +36,7 @@
 SWITCH_MODULE_LOAD_FUNCTION(mod_speex_load);
 SWITCH_MODULE_DEFINITION(mod_speex, mod_speex_load, NULL, NULL);
 
-static const switch_codec_settings_t default_codec_settings = {
+static switch_codec_settings_t default_codec_settings = {
        /*.quality */ 5,
        /*.complexity */ 5,
        /*.enhancement */ 1,
@@ -262,7 +262,7 @@ static switch_status_t switch_speex_destroy(switch_codec_t *codec)
 }
 
 /* Registration */
-static const switch_codec_implementation_t speex_32k_implementation = {
+static switch_codec_implementation_t speex_32k_implementation = {
        /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
        /*.ianacode */ 102,
        /*.iananame */ "speex",
@@ -282,7 +282,7 @@ static const switch_codec_implementation_t speex_32k_implementation = {
        /*.destroy */ switch_speex_destroy
 };
 
-static const switch_codec_implementation_t speex_16k_implementation = {
+static switch_codec_implementation_t speex_16k_implementation = {
        /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
        /*.ianacode */ 99,
        /*.iananame */ "speex",
@@ -304,7 +304,7 @@ static const switch_codec_implementation_t speex_16k_implementation = {
 };
 
 
-static const switch_codec_implementation_t speex_8k_60ms_implementation = {
+static switch_codec_implementation_t speex_8k_60ms_implementation = {
        /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
        /*.ianacode */ 98,
        /*.iananame */ "speex",
@@ -325,7 +325,7 @@ static const switch_codec_implementation_t speex_8k_60ms_implementation = {
        /*.next */ &speex_16k_implementation
 };
 
-static const switch_codec_implementation_t speex_8k_40ms_implementation = {
+static switch_codec_implementation_t speex_8k_40ms_implementation = {
        /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
        /*.ianacode */ 98,
        /*.iananame */ "speex",
@@ -348,7 +348,7 @@ static const switch_codec_implementation_t speex_8k_40ms_implementation = {
 };
 
 
-static const switch_codec_implementation_t speex_8k_30ms_implementation = {
+static switch_codec_implementation_t speex_8k_30ms_implementation = {
        /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
        /*.ianacode */ 98,
        /*.iananame */ "speex",
@@ -369,7 +369,7 @@ static const switch_codec_implementation_t speex_8k_30ms_implementation = {
        /*.next */ &speex_8k_40ms_implementation
 };
 
-static const switch_codec_implementation_t speex_8k_20ms_implementation = {
+static switch_codec_implementation_t speex_8k_20ms_implementation = {
        /*.codec_type */ SWITCH_CODEC_TYPE_AUDIO,
        /*.ianacode */ 98,
        /*.iananame */ "speex",
@@ -390,7 +390,7 @@ static const switch_codec_implementation_t speex_8k_20ms_implementation = {
        /*.next */ &speex_8k_30ms_implementation
 };
 
-static const switch_codec_interface_t speex_codec_interface = {
+static switch_codec_interface_t speex_codec_interface = {
        /*.interface_name */ "speex",
        /*.implementations */ &speex_8k_20ms_implementation
 };
index 03ea8054cc2462db669cb1988971bb9a9220c74d..9257ce49857036807c6885de75f38035da2ec421 100644 (file)
@@ -151,13 +151,13 @@ static switch_caller_extension_t *directory_dialplan_hunt(switch_core_session_t
 }
 
 
-static const switch_dialplan_interface_t directory_dialplan_interface = {
+static switch_dialplan_interface_t directory_dialplan_interface = {
        /*.interface_name = */ "directory",
        /*.hunt_function = */ directory_dialplan_hunt
                /*.next = NULL */
 };
 
-static const switch_loadable_module_interface_t directory_dialplan_module_interface = {
+static switch_loadable_module_interface_t directory_dialplan_module_interface = {
        /*.module_name = */ modname,
        /*.endpoint_interface = */ NULL,
        /*.timer_interface = */ NULL,
index 3683e051100abc681f9bca8f3bca4812631161c8..476647cba7783aadc81a8c0c948888da5c228618 100644 (file)
@@ -378,13 +378,13 @@ static switch_caller_extension_t *dialplan_hunt(switch_core_session_t *session,
 }
 
 
-static const switch_dialplan_interface_t dialplan_interface = {
+static switch_dialplan_interface_t dialplan_interface = {
        /*.interface_name = */ "XML",
        /*.hunt_function = */ dialplan_hunt
                /*.next = NULL */
 };
 
-static const switch_loadable_module_interface_t dialplan_module_interface = {
+static switch_loadable_module_interface_t dialplan_module_interface = {
        /*.module_name = */ modname,
        /*.endpoint_interface = */ NULL,
        /*.timer_interface = */ NULL,
index eb5f26e600534d1025e89fb8eb4c01544efe9c03..978de1d0e42e1997353a63c9ed871616445bf078 100644 (file)
@@ -198,7 +198,7 @@ static switch_status_t mod_ldap_next_pair(switch_directory_handle_t *dh, char **
 }
 
 
-static const switch_directory_interface_t ldap_directory_interface = {
+static switch_directory_interface_t ldap_directory_interface = {
        /*.interface_name */ "ldap",
        /*.directory_open */ mod_ldap_open,
        /*.directory_close */ mod_ldap_close,
index 7157fa69707820726b93f88547873c1749e9b68b..0c4d3948f9d324daabfce3b439068f971337b437 100644 (file)
@@ -735,7 +735,7 @@ static switch_api_interface_t channel_api_interface = {
        /*.next */
 };
 
-static const switch_state_handler_table_t channel_event_handlers = {
+static switch_state_handler_table_t channel_event_handlers = {
        /*.on_init */ channel_on_init,
        /*.on_ring */ channel_on_ring,
        /*.on_execute */ channel_on_execute,
@@ -744,7 +744,7 @@ static const switch_state_handler_table_t channel_event_handlers = {
        /*.on_transmit */ channel_on_transmit
 };
 
-static const switch_io_routines_t channel_io_routines = {
+static switch_io_routines_t channel_io_routines = {
        /*.outgoing_channel */ channel_outgoing_channel,
        /*.read_frame */ channel_read_frame,
        /*.write_frame */ channel_write_frame,
@@ -755,7 +755,7 @@ static const switch_io_routines_t channel_io_routines = {
        /*.receive_message */ channel_receive_message
 };
 
-static const switch_endpoint_interface_t channel_endpoint_interface = {
+static switch_endpoint_interface_t channel_endpoint_interface = {
        /*.interface_name */ "alsa",
        /*.io_routines */ &channel_io_routines,
        /*.event_handlers */ &channel_event_handlers,
@@ -763,7 +763,7 @@ static const switch_endpoint_interface_t channel_endpoint_interface = {
        /*.next */ NULL
 };
 
-static const switch_loadable_module_interface_t channel_module_interface = {
+static switch_loadable_module_interface_t channel_module_interface = {
        /*.module_name */ modname,
        /*.endpoint_interface */ &channel_endpoint_interface,
        /*.timer_interface */ NULL,
index 588440dec8ed0909c29f205e41974aa09bc8edd7..6f1848e94524556957c08ce50a9ce9678036b685 100644 (file)
@@ -1569,7 +1569,7 @@ static switch_status_t channel_receive_event(switch_core_session_t *session, swi
        return SWITCH_STATUS_SUCCESS;
 }
 
-static const switch_state_handler_table_t channel_event_handlers = {
+static switch_state_handler_table_t channel_event_handlers = {
        /*.on_init */ channel_on_init,
        /*.on_ring */ channel_on_ring,
        /*.on_execute */ channel_on_execute,
@@ -1578,7 +1578,7 @@ static const switch_state_handler_table_t channel_event_handlers = {
        /*.on_transmit */ channel_on_transmit
 };
 
-static const switch_io_routines_t channel_io_routines = {
+static switch_io_routines_t channel_io_routines = {
        /*.outgoing_channel */ channel_outgoing_channel,
        /*.read_frame */ channel_read_frame,
        /*.write_frame */ channel_write_frame,
@@ -1590,7 +1590,7 @@ static const switch_io_routines_t channel_io_routines = {
        /*.receive_event */ channel_receive_event
 };
 
-static const switch_endpoint_interface_t channel_endpoint_interface = {
+static switch_endpoint_interface_t channel_endpoint_interface = {
        /*.interface_name */ "dingaling",
        /*.io_routines */ &channel_io_routines,
        /*.event_handlers */ &channel_event_handlers,
@@ -1631,12 +1631,12 @@ static switch_api_interface_t login_api_interface = {
        /*.next */ &logout_api_interface
 };
 
-static const switch_chat_interface_t channel_chat_interface = {
+static switch_chat_interface_t channel_chat_interface = {
        /*.name */ MDL_CHAT_PROTO,
        /*.chat_send */ chat_send,
 };
 
-static const switch_loadable_module_interface_t channel_module_interface = {
+static switch_loadable_module_interface_t channel_module_interface = {
        /*.module_name */ modname,
        /*.endpoint_interface */ &channel_endpoint_interface,
        /*.timer_interface */ NULL,
index 567e64398c61d9f6f206533badbb07cad3cc5326..fb5c257f8d587b41512a90b0dc03ae13579bd97a 100644 (file)
@@ -43,6 +43,7 @@ SWITCH_MODULE_DEFINITION(mod_iax, mod_iax_load, mod_iax_shutdown, mod_iax_runtim
 #include <sys/timeb.h>
 #endif
 
+static switch_endpoint_interface_t *channel_endpoint_interface;
 static switch_memory_pool_t *module_pool = NULL;
 static int running = 1;
 
@@ -773,44 +774,6 @@ static switch_status_t channel_receive_message(switch_core_session_t *session, s
        return SWITCH_STATUS_SUCCESS;
 }
 
-static const switch_state_handler_table_t channel_event_handlers = {
-       /*.on_init */ channel_on_init,
-       /*.on_ring */ channel_on_ring,
-       /*.on_execute */ channel_on_execute,
-       /*.on_hangup */ channel_on_hangup,
-       /*.on_loopback */ channel_on_loopback,
-       /*.on_transmit */ channel_on_transmit
-};
-
-static const switch_io_routines_t channel_io_routines = {
-       /*.outgoing_channel */ channel_outgoing_channel,
-       /*.read_frame */ channel_read_frame,
-       /*.write_frame */ channel_write_frame,
-       /*.kill_channel */ channel_kill_channel,
-       /*.waitfor_read */ channel_waitfor_read,
-       /*.waitfor_write */ channel_waitfor_write,
-       /*.send_dtmf */ channel_send_dtmf,
-       /*.receive_message*/ channel_receive_message
-};
-
-static const switch_endpoint_interface_t channel_endpoint_interface = {
-       /*.interface_name */ "iax",
-       /*.io_routines */ &channel_io_routines,
-       /*.event_handlers */ &channel_event_handlers,
-       /*.private */ NULL,
-       /*.next */ NULL
-};
-
-static const switch_loadable_module_interface_t channel_module_interface = {
-       /*.module_name */ modname,
-       /*.endpoint_interface */ &channel_endpoint_interface,
-       /*.timer_interface */ NULL,
-       /*.dialplan_interface */ NULL,
-       /*.codec_interface */ NULL,
-       /*.application_interface */ NULL
-};
-
-
 /* Make sure when you have 2 sessions in the same scope that you pass the appropriate one to the routines
 that allocate memory or you will have 1 channel with memory allocated from another channel's pool!
 */
@@ -818,7 +781,7 @@ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *sessi
                                                                                                        switch_caller_profile_t *outbound_profile,
                                                                                                        switch_core_session_t **new_session, switch_memory_pool_t **pool)
 {
-       if ((*new_session = switch_core_session_request(&channel_endpoint_interface, pool)) != 0) {
+       if ((*new_session = switch_core_session_request(channel_endpoint_interface, pool)) != 0) {
                private_t *tech_pvt;
                switch_channel_t *channel;
                switch_caller_profile_t *caller_profile;
@@ -877,17 +840,37 @@ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *sessi
        return SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER;
 
 }
+
+static switch_state_handler_table_t channel_state_handlers = {
+       /*.on_init */ channel_on_init,
+       /*.on_ring */ channel_on_ring,
+       /*.on_execute */ channel_on_execute,
+       /*.on_hangup */ channel_on_hangup,
+       /*.on_loopback */ channel_on_loopback,
+       /*.on_transmit */ channel_on_transmit
+};
+
+static switch_io_routines_t channel_io_routines = {
+       /*.outgoing_channel */ channel_outgoing_channel,
+       /*.read_frame */ channel_read_frame,
+       /*.write_frame */ channel_write_frame,
+       /*.kill_channel */ channel_kill_channel,
+       /*.waitfor_read */ channel_waitfor_read,
+       /*.waitfor_write */ channel_waitfor_write,
+       /*.send_dtmf */ channel_send_dtmf,
+       /*.receive_message*/ channel_receive_message
+};
+
 SWITCH_MODULE_LOAD_FUNCTION(mod_iax_load)
 {
 
-       if (switch_core_new_memory_pool(&module_pool) != SWITCH_STATUS_SUCCESS) {
-               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "OH OH no pool\n");
-               return SWITCH_STATUS_TERM;
-       }
-
+       module_pool = pool;
 
-       /* connect my internal structure to the blank pointer passed to me */
-       *module_interface = &channel_module_interface;
+       *module_interface = switch_loadable_module_create_module_interface(pool, modname);
+       channel_endpoint_interface = switch_loadable_module_create_interface(*module_interface, SWITCH_ENDPOINT_INTERFACE);
+       channel_endpoint_interface->interface_name = modname;
+       channel_endpoint_interface->io_routines = &channel_io_routines;
+       channel_endpoint_interface->state_handler = &channel_state_handlers;
 
        /* indicate that the module should continue to be loaded */
        return SWITCH_STATUS_SUCCESS;
@@ -1091,7 +1074,7 @@ SWITCH_MODULE_RUNTIME_FUNCTION(mod_iax_runtime)
                                        switch_core_session_t *session;
 
                                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_NOTICE, "New Inbound Channel %s!\n", iaxevent->ies.calling_name);
-                                       if ((session = switch_core_session_request(&channel_endpoint_interface, NULL)) != 0) {
+                                       if ((session = switch_core_session_request(channel_endpoint_interface, NULL)) != 0) {
                                                private_t *tech_pvt;
                                                switch_channel_t *channel;
 
index 8605cf8f8bfa537fdfddfbe1be31ebbcac002d09..8dd7e2e4faa03e156f5bf9ec7c377929a0ce656b 100644 (file)
@@ -782,7 +782,7 @@ static switch_api_interface_t channel_api_interface = {
        /*.next */ &channel_call_interface
 };
 
-static const switch_state_handler_table_t channel_event_handlers = {
+static switch_state_handler_table_t channel_event_handlers = {
        /*.on_init */ channel_on_init,
        /*.on_ring */ channel_on_ring,
        /*.on_execute */ channel_on_execute,
@@ -791,7 +791,7 @@ static const switch_state_handler_table_t channel_event_handlers = {
        /*.on_transmit */ channel_on_transmit
 };
 
-static const switch_io_routines_t channel_io_routines = {
+static switch_io_routines_t channel_io_routines = {
        /*.outgoing_channel */ channel_outgoing_channel,
        /*.read_frame */ channel_read_frame,
        /*.write_frame */ channel_write_frame,
@@ -802,7 +802,7 @@ static const switch_io_routines_t channel_io_routines = {
        /*.receive_message */ channel_receive_message
 };
 
-static const switch_endpoint_interface_t channel_endpoint_interface = {
+static switch_endpoint_interface_t channel_endpoint_interface = {
        /*.interface_name */ "portaudio",
        /*.io_routines */ &channel_io_routines,
        /*.event_handlers */ &channel_event_handlers,
@@ -810,7 +810,7 @@ static const switch_endpoint_interface_t channel_endpoint_interface = {
        /*.next */ NULL
 };
 
-static const switch_loadable_module_interface_t channel_module_interface = {
+static switch_loadable_module_interface_t channel_module_interface = {
        /*.module_name */ modname,
        /*.endpoint_interface */ &channel_endpoint_interface,
        /*.timer_interface */ NULL,
index a61cb17343e00ea755bf3dfb223c06fd0c8143bb..a4eab44c41b52ba95a62730b16c8b6da03ac24fa 100644 (file)
@@ -43,7 +43,7 @@ SWITCH_MODULE_SHUTDOWN_FUNCTION(mod_sofia_shutdown);
 SWITCH_MODULE_DEFINITION(mod_sofia, mod_sofia_load, mod_sofia_shutdown, NULL);
 
 struct mod_sofia_globals mod_sofia_globals;
-const switch_endpoint_interface_t sofia_endpoint_interface;
+switch_endpoint_interface_t sofia_endpoint_interface;
 static switch_frame_t silence_frame = { 0 };
 static char silence_data[13] = "";
 
@@ -465,7 +465,7 @@ static switch_status_t sofia_read_frame(switch_core_session_t *session, switch_f
 
        if (switch_test_flag(tech_pvt, TFLAG_IO)) {
                switch_status_t status;
-
+               
                if (!switch_test_flag(tech_pvt, TFLAG_RTP)) {
                        return SWITCH_STATUS_GENERR;
                }
@@ -1264,7 +1264,7 @@ SWITCH_STANDARD_API(sofia_function)
 
 }
 
-static const switch_io_routines_t sofia_io_routines = {
+static switch_io_routines_t sofia_io_routines = {
        /*.outgoing_channel */ sofia_outgoing_channel,
        /*.read_frame */ sofia_read_frame,
        /*.write_frame */ sofia_write_frame,
@@ -1279,7 +1279,7 @@ static const switch_io_routines_t sofia_io_routines = {
        /*.write_video_frame*/ sofia_write_video_frame
 };
 
-static const switch_state_handler_table_t sofia_event_handlers = {
+static switch_state_handler_table_t sofia_event_handlers = {
        /*.on_init */ sofia_on_init,
        /*.on_ring */ sofia_on_ring,
        /*.on_execute */ sofia_on_execute,
@@ -1288,7 +1288,7 @@ static const switch_state_handler_table_t sofia_event_handlers = {
        /*.on_transmit */ sofia_on_transmit
 };
 
-const switch_endpoint_interface_t sofia_endpoint_interface = {
+switch_endpoint_interface_t sofia_endpoint_interface = {
        /*.interface_name */ "sofia",
        /*.io_routines */ &sofia_io_routines,
        /*.event_handlers */ &sofia_event_handlers,
@@ -1296,7 +1296,7 @@ const switch_endpoint_interface_t sofia_endpoint_interface = {
        /*.next */ NULL
 };
 
-static const switch_chat_interface_t sofia_chat_interface = {
+static switch_chat_interface_t sofia_chat_interface = {
        /*.name */ SOFIA_CHAT_PROTO,
        /*.sofia_presence_chat_send */ sofia_presence_chat_send,
 
@@ -1307,7 +1307,7 @@ static switch_status_t sofia_manage(char *relative_oid, switch_management_action
        return SWITCH_STATUS_SUCCESS;
 }
 
-static const switch_management_interface_t sofia_management_interface = {
+static switch_management_interface_t sofia_management_interface = {
        /*.relative_oid */ "1",
        /*.management_function */ sofia_manage
 };
@@ -1320,7 +1320,7 @@ static switch_api_interface_t sofia_api_interface = {
        /*.next */ NULL
 };
 
-static const switch_loadable_module_interface_t sofia_module_interface = {
+static switch_loadable_module_interface_t sofia_module_interface = {
        /*.module_name */ modname,
        /*.endpoint_interface */ &sofia_endpoint_interface,
        /*.timer_interface */ NULL,
index bbb057de648b558b3f6390829df11caa2ec7479e..9d89e7f40bc95a21837376f7cce3b892efdc7f44 100644 (file)
@@ -465,7 +465,7 @@ switch_call_cause_t sofia_glue_sip_cause_to_freeswitch(int status);
 void sofia_glue_do_xfer_invite(switch_core_session_t *session);
 uint8_t sofia_reg_handle_register(nua_t *nua, sofia_profile_t *profile, nua_handle_t *nh, sip_t const *sip, 
                                                                  sofia_regtype_t regtype, char *key, uint32_t keylen, switch_event_t **v_event);
-extern const switch_endpoint_interface_t sofia_endpoint_interface;
+extern switch_endpoint_interface_t sofia_endpoint_interface;
 void sofia_presence_set_chat_hash(private_object_t *tech_pvt, sip_t const *sip);
 switch_status_t sofia_on_hangup(switch_core_session_t *session);
 char *sofia_glue_get_url_from_contact(char *buf, uint8_t to_dup);
index 9d6503b55d829e2c2e03c7730fdbd22d495670a8..5379201dc37b5cfdb862d5cd712543ddbe8a977f 100644 (file)
@@ -963,7 +963,7 @@ static switch_status_t wanpipe_kill_channel(switch_core_session_t *session, int
 }
 
 
-static const switch_io_routines_t wanpipe_io_routines = {
+static switch_io_routines_t wanpipe_io_routines = {
        /*.outgoing_channel */ wanpipe_outgoing_channel,
        /*.read_frame */ wanpipe_read_frame,
        /*.write_frame */ wanpipe_write_frame,
@@ -974,7 +974,7 @@ static const switch_io_routines_t wanpipe_io_routines = {
        /*.receive_message*/ wanpipe_receive_message
 };
 
-static const switch_state_handler_table_t wanpipe_state_handlers = {
+static switch_state_handler_table_t wanpipe_state_handlers = {
        /*.on_init */ wanpipe_on_init,
        /*.on_ring */ wanpipe_on_ring,
        /*.on_execute */ NULL,
@@ -983,7 +983,7 @@ static const switch_state_handler_table_t wanpipe_state_handlers = {
        /*.on_transmit */ wanpipe_on_transmit
 };
 
-static const switch_endpoint_interface_t wanpipe_endpoint_interface = {
+static switch_endpoint_interface_t wanpipe_endpoint_interface = {
        /*.interface_name */ "wanpipe",
        /*.io_routines */ &wanpipe_io_routines,
        /*.state_handlers */ &wanpipe_state_handlers,
@@ -991,7 +991,7 @@ static const switch_endpoint_interface_t wanpipe_endpoint_interface = {
        /*.next */ NULL
 };
 
-static const switch_loadable_module_interface_t wanpipe_module_interface = {
+static switch_loadable_module_interface_t wanpipe_module_interface = {
        /*.module_name */ modname,
        /*.endpoint_interface */ &wanpipe_endpoint_interface,
        /*.timer_interface */ NULL,
index 6b4076108062b2285c8a1d1f2967e9abb23e3a46..c4bc80f1b985c38f88dcd0b233190dffbcec69f0 100644 (file)
@@ -441,7 +441,7 @@ static switch_status_t woomera_write_frame(switch_core_session_t *session, switc
        return SWITCH_STATUS_GENERR;
 }
 
-static const switch_state_handler_table_t woomera_event_handlers = {
+static switch_state_handler_table_t woomera_event_handlers = {
        /*.on_init */ woomera_on_init,
        /*.on_ring */ woomera_on_ring,
        /*.on_execute */ woomera_on_execute,
@@ -450,7 +450,7 @@ static const switch_state_handler_table_t woomera_event_handlers = {
        /*.on_transmit */ woomera_on_transmit
 };
 
-static const switch_io_routines_t woomera_io_routines = {
+static switch_io_routines_t woomera_io_routines = {
        /*.outgoing_channel */ woomera_outgoing_channel,
        /*.read_frame */ woomera_read_frame,
        /*.write_frame */ woomera_write_frame,
@@ -459,7 +459,7 @@ static const switch_io_routines_t woomera_io_routines = {
        /*.waitfor_write */ woomera_waitfor_write
 };
 
-static const switch_endpoint_interface_t woomera_endpoint_interface = {
+static switch_endpoint_interface_t woomera_endpoint_interface = {
        /*.interface_name */ "woomera",
        /*.io_routines */ &woomera_io_routines,
        /*.event_handlers */ &woomera_event_handlers,
@@ -467,7 +467,7 @@ static const switch_endpoint_interface_t woomera_endpoint_interface = {
        /*.next */ NULL
 };
 
-static const switch_loadable_module_interface_t woomera_module_interface = {
+static switch_loadable_module_interface_t woomera_module_interface = {
        /*.module_name */ modname,
        /*.endpoint_interface */ &woomera_endpoint_interface,
        /*.timer_interface */ NULL,
index 7131d3f2931e18bfc773913c2f109be14c066543..d8d067f5b91a7f0a14a06ffe2de9dc79d82484e8 100644 (file)
@@ -251,7 +251,7 @@ static void socket_function(switch_core_session_t *session, char *data)
 }
 
 
-static const switch_application_interface_t socket_application_interface = {
+static switch_application_interface_t socket_application_interface = {
        /*.interface_name */ "socket",
        /*.application_function */ socket_function,
        /* long_desc */ "Connect to a socket",
index 34a5d0a9f8cdf5502ada2618b6e1deeff3aca7f4..ec8655c3feda32b5161fa4d31b90fa4e43be6db8 100644 (file)
@@ -79,7 +79,7 @@ static void perl_function(switch_core_session_t *session, char *data)
        destroy_perl(&my_perl);
 }
 
-static const switch_application_interface_t perl_application_interface = {
+static switch_application_interface_t perl_application_interface = {
        /*.interface_name */ "perl",
        /*.application_function */ perl_function,
        NULL, NULL, NULL,
index f8232328dc8c764af3b868725500a0511caa7abd..b5ed4d6e107de7d17095c0f7591adc19e6539d1a 100644 (file)
@@ -193,7 +193,7 @@ SWITCH_STANDARD_API(launch_python)
        return SWITCH_STATUS_SUCCESS;
 }
 
-static const switch_application_interface_t python_application_interface = {
+static switch_application_interface_t python_application_interface = {
        /*.interface_name */ "python",
        /*.application_function */ python_function,
        NULL, NULL, NULL,
index efc8abbfd1bb6b3cb961a188e04d0206a177d71b..7ca0808b760f43d63da1c8864c4a2145a27ee29d 100644 (file)
@@ -2984,7 +2984,7 @@ SWITCH_STANDARD_API(launch_async)
 }
 
 
-static const switch_application_interface_t ivrtest_application_interface = {
+static switch_application_interface_t ivrtest_application_interface = {
        /*.interface_name */ "javascript",
        /*.application_function */ js_dp_function,
        /* long_desc */ "Run a javascript ivr on a channel",
index 0a08fde3e33b4251b5ec981bb7f84ff11bd6a97a..48b126b92eca0928cdb6b5670c43249998cf5cee 100644 (file)
@@ -510,12 +510,12 @@ static switch_status_t en_say(switch_core_session_t *session, char *tosay, switc
        return SWITCH_STATUS_FALSE;
 }
 
-static const switch_say_interface_t es_say_interface = {
+static switch_say_interface_t es_say_interface = {
        /*.name */ "es",
        /*.say_function */ en_say,
 };
 
-static const switch_say_interface_t en_say_interface = {
+static switch_say_interface_t en_say_interface = {
        /*.name */ "en",
        /*.say_function */ en_say,
        /*.next */ &es_say_interface
index b26060685e987fcec654791d97870e05f7499830..8e98e119c74220d253329a5ec68267945845f45a 100644 (file)
@@ -186,7 +186,7 @@ static inline switch_status_t timer_destroy(switch_timer_t *timer)
        return SWITCH_STATUS_SUCCESS;
 }
 
-static const switch_timer_interface_t timer_interface = {
+static switch_timer_interface_t timer_interface = {
        /*.interface_name */ "soft",
        /*.timer_init */ timer_init,
        /*.timer_next */ timer_next,
@@ -195,7 +195,7 @@ static const switch_timer_interface_t timer_interface = {
        /*.timer_destroy */ timer_destroy
 };
 
-static const switch_loadable_module_interface_t softtimer_module_interface = {
+static switch_loadable_module_interface_t softtimer_module_interface = {
        /*.module_name */ modname,
        /*.endpoint_interface */ NULL,
        /*.timer_interface */ &timer_interface
index db25bff0783bf038468225d5ac1b4f509a19e598..53d7609c99d18b7e9ddf1a0252dd399bc8b28fb0 100644 (file)
@@ -82,7 +82,7 @@ static switch_status_t my_on_hangup(switch_core_session_t *session)
        return SWITCH_STATUS_SUCCESS;
 }
 
-static const switch_state_handler_table_t state_handlers = {
+static switch_state_handler_table_t state_handlers = {
        /*.on_init */ NULL,
        /*.on_ring */ NULL,
        /*.on_execute */ NULL,
@@ -92,7 +92,7 @@ static const switch_state_handler_table_t state_handlers = {
 };
 
 
-static const switch_loadable_module_interface_t xml_cdr_module_interface = {
+static switch_loadable_module_interface_t xml_cdr_module_interface = {
        /*.module_name = */ modname,
        /*.endpoint_interface = */ NULL,
        /*.timer_interface = */ NULL,
index 70d8fddb8e087ce742d99526c3788482d39bd4cb..148bea1d1c381434c408f77a450ef12d6daf4fce 100644 (file)
@@ -44,7 +44,7 @@ struct switch_loadable_module {
        char *key;
        char *filename;
        int perm;
-       const switch_loadable_module_interface_t *module_interface;
+       switch_loadable_module_interface_t *module_interface;
        void *lib;
        switch_module_load_t switch_module_load;
        switch_module_runtime_t switch_module_runtime;
@@ -650,7 +650,7 @@ static switch_status_t switch_loadable_module_load_file(char *path, char *filena
        switch_module_load_t load_func_ptr = NULL;
        int loading = 1;
        const char *err = NULL;
-       const switch_loadable_module_interface_t *module_interface = NULL;
+       switch_loadable_module_interface_t *module_interface = NULL;
        char derr[512] = "";
        switch_memory_pool_t *pool;
 
@@ -686,7 +686,7 @@ static switch_status_t switch_loadable_module_load_file(char *path, char *filena
                        break;
                }
 
-               status = load_func_ptr(&module_interface, filename);
+               status = load_func_ptr(&module_interface, pool);
 
                if (status != SWITCH_STATUS_SUCCESS && status != SWITCH_STATUS_NOUNLOAD) {
                        err = "Module load routine returned an error";
@@ -830,7 +830,7 @@ SWITCH_DECLARE(switch_status_t) switch_loadable_module_build_dynamic(char *filen
        switch_module_load_t load_func_ptr = NULL;
        int loading = 1;
        const char *err = NULL;
-       const switch_loadable_module_interface_t *module_interface = NULL;
+       switch_loadable_module_interface_t *module_interface = NULL;
        switch_memory_pool_t *pool;
 
        
@@ -855,7 +855,7 @@ SWITCH_DECLARE(switch_status_t) switch_loadable_module_build_dynamic(char *filen
                        break;
                }
 
-               status = load_func_ptr(&module_interface, filename);
+               status = load_func_ptr(&module_interface, pool);
 
                if (status != SWITCH_STATUS_SUCCESS && status != SWITCH_STATUS_NOUNLOAD) {
                        err = "Module load routine returned an error";
@@ -1197,7 +1197,7 @@ SWITCH_DECLARE(int) switch_loadable_module_get_codecs(switch_memory_pool_t *pool
                /* oh well we will use what we have */
                array[i++] = codec_interface->implementations;
 
-         found:
+       found:
 
                if (i > arraylen) {
                        break;
@@ -1282,7 +1282,7 @@ SWITCH_DECLARE(int) switch_loadable_module_get_codecs_sorted(const switch_codec_
                                }
                        }
 
-                 found:
+               found:
 
                        if (i > arraylen) {
                                break;
@@ -1333,6 +1333,84 @@ SWITCH_DECLARE(switch_status_t) switch_api_execute(const char *cmd, const char *
        return status;
 }
 
+
+SWITCH_DECLARE(switch_loadable_module_interface_t *) switch_loadable_module_create_module_interface(switch_memory_pool_t *pool, const char *name)
+{
+       switch_loadable_module_interface_t *mod;
+
+       mod = switch_core_alloc(pool, sizeof(switch_loadable_module_interface_t));
+       assert(mod != NULL);
+
+       mod->pool = pool;
+
+       mod->module_name = switch_core_strdup(mod->pool, name);
+       
+       return mod;
+}
+
+#define ALLOC_INTERFACE(_TYPE_)        do {                                                                    \
+               switch_##_TYPE_##_interface_t *i, *ptr;                                                 \
+               i = switch_core_alloc(mod->pool, sizeof(switch_##_TYPE_##_interface_t)); \
+               assert(i != NULL);                                                                                              \
+               for (ptr = mod->_TYPE_##_interface; ptr && ptr->next; ptr = ptr->next); \
+               if (ptr) {                                                                                                              \
+                       ptr->next = i;                                                                                          \
+               } else {                                                                                                                \
+                       mod->_TYPE_##_interface = i;                                                            \
+               }                                                                                                                               \
+                                                                                                                                               \
+               return i; } while(0)
+
+
+SWITCH_DECLARE(void *) switch_loadable_module_create_interface(switch_loadable_module_interface_t *mod, switch_module_interface_name_t iname)
+{
+
+       switch(iname) {
+       case SWITCH_ENDPOINT_INTERFACE:
+               ALLOC_INTERFACE(endpoint);
+
+       case SWITCH_TIMER_INTERFACE:
+               ALLOC_INTERFACE(timer);
+               
+       case SWITCH_DIALPLAN_INTERFACE:
+               ALLOC_INTERFACE(dialplan);
+               
+       case SWITCH_CODEC_INTERFACE:
+               ALLOC_INTERFACE(codec);
+               
+       case SWITCH_APPLICATION_INTERFACE:
+               ALLOC_INTERFACE(application);
+               
+       case SWITCH_API_INTERFACE:
+               ALLOC_INTERFACE(api);
+               
+       case SWITCH_FILE_INTERFACE:
+               ALLOC_INTERFACE(file);
+               
+       case SWITCH_SPEECH_INTERFACE:
+               ALLOC_INTERFACE(speech);
+               
+       case SWITCH_DIRECTORY_INTERFACE:
+               ALLOC_INTERFACE(directory);
+               
+       case SWITCH_CHAT_INTERFACE:
+               ALLOC_INTERFACE(chat);
+               
+       case SWITCH_SAY_INTERFACE:
+               ALLOC_INTERFACE(say);
+               
+       case SWITCH_ASR_INTERFACE:
+               ALLOC_INTERFACE(asr);
+               
+       case SWITCH_MANAGEMENT_INTERFACE:
+               ALLOC_INTERFACE(management);
+               
+       default:
+               switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Invalid Module Type!\n");
+               return NULL;
+       }
+}
+
 /* For Emacs:
  * Local Variables:
  * mode:c