[Freeswitch-svn] [commit] r5347 - in freeswitch/trunk/src: . include mod/applications/mod_commands mod/applications/mod_conference mod/applications/mod_dptools mod/applications/mod_enum mod/applications/mod_esf mod/applications/mod_ivrtest mod/applications/mod_rss mod/applications/mod_soundtouch mod/asr_tts/mod_cepstral mod/codecs/mod_amr mod/codecs/mod_g711 mod/codecs/mod_g722 mod/codecs/mod_g723_1 mod/codecs/mod_g726 mod/codecs/mod_g729 mod/codecs/mod_gsm mod/codecs/mod_h26x mod/codecs/mod_ilbc mod/codecs/mod_l16 mod/codecs/mod_lpc10 mod/codecs/mod_speex mod/dialplans/mod_dialplan_directory mod/dialplans/mod_dialplan_xml mod/directories/mod_ldap mod/endpoints/mod_alsa mod/endpoints/mod_dingaling mod/endpoints/mod_iax mod/endpoints/mod_portaudio mod/endpoints/mod_sofia mod/endpoints/mod_wanpipe mod/endpoints/mod_woomera mod/event_handlers/mod_event_socket mod/languages/mod_perl mod/languages/mod_python mod/languages/mod_spidermonkey mod/say/mod_say_en mod/timers/mod_softtimer mod/xml_int/mod_xml_cdr

Freeswitch SVN anthm at freeswitch.org
Wed Jun 13 16:40:06 EDT 2007


Author: anthm
Date: Wed Jun 13 16:40:06 2007
New Revision: 5347

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

Log:
stage 1 of wrecking ball (duck!)

Modified: freeswitch/trunk/src/include/switch_apr.h
==============================================================================
--- freeswitch/trunk/src/include/switch_apr.h	(original)
+++ freeswitch/trunk/src/include/switch_apr.h	Wed Jun 13 16:40:06 2007
@@ -55,7 +55,7 @@
  * @{
  */
 /** 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;*/
 
 
 /**

Modified: freeswitch/trunk/src/include/switch_core.h
==============================================================================
--- freeswitch/trunk/src/include/switch_core.h	(original)
+++ freeswitch/trunk/src/include/switch_core.h	Wed Jun 13 16:40:06 2007
@@ -1461,6 +1461,10 @@
   \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);
 ///\}
 
 /*!

Modified: freeswitch/trunk/src/include/switch_loadable_module.h
==============================================================================
--- freeswitch/trunk/src/include/switch_loadable_module.h	(original)
+++ freeswitch/trunk/src/include/switch_loadable_module.h	Wed Jun 13 16:40:06 2007
@@ -54,31 +54,32 @@
 	/*! 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;
 };
 
 /*!

Modified: freeswitch/trunk/src/include/switch_module_interfaces.h
==============================================================================
--- freeswitch/trunk/src/include/switch_module_interfaces.h	(original)
+++ freeswitch/trunk/src/include/switch_module_interfaces.h	Wed Jun 13 16:40:06 2007
@@ -44,7 +44,19 @@
 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_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_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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	/*! 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 @@
 							   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 @@
 	/*! 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 @@
 	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 @@
 	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

Modified: freeswitch/trunk/src/include/switch_types.h
==============================================================================
--- freeswitch/trunk/src/include/switch_types.h	(original)
+++ freeswitch/trunk/src/include/switch_types.h	Wed Jun 13 16:40:06 2007
@@ -125,6 +125,22 @@
 
 
 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),
 	SUF_READY = (1 << 1),
@@ -971,6 +987,7 @@
 	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 @@
 
 
 #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 ;

Modified: freeswitch/trunk/src/mod/applications/mod_commands/mod_commands.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_commands/mod_commands.c	(original)
+++ freeswitch/trunk/src/mod/applications/mod_commands/mod_commands.c	Wed Jun 13 16:40:06 2007
@@ -1319,7 +1319,7 @@
 	/*.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,

Modified: freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c	(original)
+++ freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c	Wed Jun 13 16:40:06 2007
@@ -3549,7 +3549,7 @@
 	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 @@
 	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 @@
 	/*.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 @@
 	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,
 

Modified: freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c	(original)
+++ freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c	Wed Jun 13 16:40:06 2007
@@ -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 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 @@
 	/*.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 @@
 	/*.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 @@
 	/*.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_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 @@
 	/* 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 @@
 	&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_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 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 @@
 	&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 @@
 	/* 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 @@
 	/*.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 @@
 	/*.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 @@
 	/*.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 @@
 	/* 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 @@
 	/* 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 @@
 	&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 @@
 	/*.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 @@
 	/*.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 @@
 	/*.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 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 @@
 	/*.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 @@
 	/*.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 @@
 	/*.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 @@
 	/*.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 @@
 	/*.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 @@
 	/*.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 @@
 	/*.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 @@
 	/*.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 @@
 	/*.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 @@
 	/*.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 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 @@
 	/*.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 @@
 	/*.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 @@
 	/*.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 @@
 	/*.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 @@
 	/*.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 @@
 	/*.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 @@
 	/* 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 @@
 	/* 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 @@
 	/*.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,

Modified: freeswitch/trunk/src/mod/applications/mod_enum/mod_enum.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_enum/mod_enum.c	(original)
+++ freeswitch/trunk/src/mod/applications/mod_enum/mod_enum.c	Wed Jun 13 16:40:06 2007
@@ -685,13 +685,13 @@
 }
 
 
-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",

Modified: freeswitch/trunk/src/mod/applications/mod_esf/mod_esf.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_esf/mod_esf.c	(original)
+++ freeswitch/trunk/src/mod/applications/mod_esf/mod_esf.c	Wed Jun 13 16:40:06 2007
@@ -228,7 +228,7 @@
 }
 
 
-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 @@
 	/*.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,

Modified: freeswitch/trunk/src/mod/applications/mod_ivrtest/mod_ivrtest.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_ivrtest/mod_ivrtest.c	(original)
+++ freeswitch/trunk/src/mod/applications/mod_ivrtest/mod_ivrtest.c	Wed Jun 13 16:40:06 2007
@@ -423,7 +423,7 @@
 
 }
 
-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_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 @@
 	/*.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 @@
 	/*.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 @@
 	/*.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 @@
 	/*.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 @@
 	/*.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 @@
 	/*.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 @@
 	/*.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 @@
 	/*.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,

Modified: freeswitch/trunk/src/mod/applications/mod_rss/mod_rss.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_rss/mod_rss.c	(original)
+++ freeswitch/trunk/src/mod/applications/mod_rss/mod_rss.c	Wed Jun 13 16:40:06 2007
@@ -613,7 +613,7 @@
 	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,

Modified: freeswitch/trunk/src/mod/applications/mod_soundtouch/mod_soundtouch.cpp
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_soundtouch/mod_soundtouch.cpp	(original)
+++ freeswitch/trunk/src/mod/applications/mod_soundtouch/mod_soundtouch.cpp	Wed Jun 13 16:40:06 2007
@@ -306,7 +306,7 @@
 	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",

Modified: freeswitch/trunk/src/mod/asr_tts/mod_cepstral/mod_cepstral.c
==============================================================================
--- freeswitch/trunk/src/mod/asr_tts/mod_cepstral/mod_cepstral.c	(original)
+++ freeswitch/trunk/src/mod/asr_tts/mod_cepstral/mod_cepstral.c	Wed Jun 13 16:40:06 2007
@@ -402,7 +402,7 @@
 
 }
 
-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 @@
 	/*.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,

Modified: freeswitch/trunk/src/mod/codecs/mod_amr/mod_amr.c
==============================================================================
--- freeswitch/trunk/src/mod/codecs/mod_amr/mod_amr.c	(original)
+++ freeswitch/trunk/src/mod/codecs/mod_amr/mod_amr.c	Wed Jun 13 16:40:06 2007
@@ -290,7 +290,7 @@
 
 /* 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 @@
 	/*.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,
 };

Modified: freeswitch/trunk/src/mod/codecs/mod_g711/mod_g711.c
==============================================================================
--- freeswitch/trunk/src/mod/codecs/mod_g711/mod_g711.c	(original)
+++ freeswitch/trunk/src/mod/codecs/mod_g711/mod_g711.c	Wed Jun 13 16:40:06 2007
@@ -182,7 +182,7 @@
 /* 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 @@
 	/*.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 @@
 	/*.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 @@
 	/*.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 @@
 	/*.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 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 @@
 	/*.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 @@
 	/*.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 @@
 	/*.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 @@
 	/*.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_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

Modified: freeswitch/trunk/src/mod/codecs/mod_g722/mod_g722.c
==============================================================================
--- freeswitch/trunk/src/mod/codecs/mod_g722/mod_g722.c	(original)
+++ freeswitch/trunk/src/mod/codecs/mod_g722/mod_g722.c	Wed Jun 13 16:40:06 2007
@@ -118,7 +118,7 @@
 
 /* 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 @@
 	/*.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 @@
 	/*.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
 };

Modified: freeswitch/trunk/src/mod/codecs/mod_g723_1/mod_g723_1.c
==============================================================================
--- freeswitch/trunk/src/mod/codecs/mod_g723_1/mod_g723_1.c	(original)
+++ freeswitch/trunk/src/mod/codecs/mod_g723_1/mod_g723_1.c	Wed Jun 13 16:40:06 2007
@@ -169,7 +169,7 @@
 
 /* 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 @@
 	/*.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,
 };

Modified: freeswitch/trunk/src/mod/codecs/mod_g726/mod_g726.c
==============================================================================
--- freeswitch/trunk/src/mod/codecs/mod_g726/mod_g726.c	(original)
+++ freeswitch/trunk/src/mod/codecs/mod_g726/mod_g726.c	Wed Jun 13 16:40:06 2007
@@ -204,7 +204,7 @@
 
 /* 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_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 @@
 	/*.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 @@
 	/*.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 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_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 @@
 	/*.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 @@
 	/*.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",

Modified: freeswitch/trunk/src/mod/codecs/mod_g729/mod_g729.c
==============================================================================
--- freeswitch/trunk/src/mod/codecs/mod_g729/mod_g729.c	(original)
+++ freeswitch/trunk/src/mod/codecs/mod_g729/mod_g729.c	Wed Jun 13 16:40:06 2007
@@ -212,7 +212,7 @@
 
 /* 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 @@
 	/*.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 @@
 	&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 @@
 	&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 @@
 	&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

Modified: freeswitch/trunk/src/mod/codecs/mod_gsm/mod_gsm.c
==============================================================================
--- freeswitch/trunk/src/mod/codecs/mod_gsm/mod_gsm.c	(original)
+++ freeswitch/trunk/src/mod/codecs/mod_gsm/mod_gsm.c	Wed Jun 13 16:40:06 2007
@@ -134,7 +134,7 @@
 
 
 /* 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 @@
 	/*.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,
 };

Modified: freeswitch/trunk/src/mod/codecs/mod_h26x/mod_h26x.c
==============================================================================
--- freeswitch/trunk/src/mod/codecs/mod_h26x/mod_h26x.c	(original)
+++ freeswitch/trunk/src/mod/codecs/mod_h26x/mod_h26x.c	Wed Jun 13 16:40:06 2007
@@ -75,7 +75,7 @@
 	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 @@
 	/*.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 @@
 	/*.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
 };

Modified: freeswitch/trunk/src/mod/codecs/mod_ilbc/mod_ilbc.c
==============================================================================
--- freeswitch/trunk/src/mod/codecs/mod_ilbc/mod_ilbc.c	(original)
+++ freeswitch/trunk/src/mod/codecs/mod_ilbc/mod_ilbc.c	Wed Jun 13 16:40:06 2007
@@ -182,7 +182,7 @@
 
 /* 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 @@
 	/*.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_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 @@
 	/*.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_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_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

Modified: freeswitch/trunk/src/mod/codecs/mod_l16/mod_l16.c
==============================================================================
--- freeswitch/trunk/src/mod/codecs/mod_l16/mod_l16.c	(original)
+++ freeswitch/trunk/src/mod/codecs/mod_l16/mod_l16.c	Wed Jun 13 16:40:06 2007
@@ -86,7 +86,7 @@
 	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 @@
 		/*.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 @@
 	/*.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 @@
 	/*.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 @@
 	/*.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 @@
 	/*.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 @@
 	/*.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 @@
 	/*.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 @@
 	/*.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 @@
 	/*.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_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_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 @@
 	/*.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 @@
 	/*.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_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_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
 };

Modified: freeswitch/trunk/src/mod/codecs/mod_lpc10/mod_lpc10.c
==============================================================================
--- freeswitch/trunk/src/mod/codecs/mod_lpc10/mod_lpc10.c	(original)
+++ freeswitch/trunk/src/mod/codecs/mod_lpc10/mod_lpc10.c	Wed Jun 13 16:40:06 2007
@@ -156,7 +156,7 @@
 
 /* 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",

Modified: freeswitch/trunk/src/mod/codecs/mod_speex/mod_speex.c
==============================================================================
--- freeswitch/trunk/src/mod/codecs/mod_speex/mod_speex.c	(original)
+++ freeswitch/trunk/src/mod/codecs/mod_speex/mod_speex.c	Wed Jun 13 16:40:06 2007
@@ -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 @@
 }
 
 /* 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 @@
 	/*.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_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 @@
 	/*.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_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 @@
 	/*.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 @@
 	/*.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
 };

Modified: freeswitch/trunk/src/mod/dialplans/mod_dialplan_directory/mod_dialplan_directory.c
==============================================================================
--- freeswitch/trunk/src/mod/dialplans/mod_dialplan_directory/mod_dialplan_directory.c	(original)
+++ freeswitch/trunk/src/mod/dialplans/mod_dialplan_directory/mod_dialplan_directory.c	Wed Jun 13 16:40:06 2007
@@ -151,13 +151,13 @@
 }
 
 
-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,

Modified: freeswitch/trunk/src/mod/dialplans/mod_dialplan_xml/mod_dialplan_xml.c
==============================================================================
--- freeswitch/trunk/src/mod/dialplans/mod_dialplan_xml/mod_dialplan_xml.c	(original)
+++ freeswitch/trunk/src/mod/dialplans/mod_dialplan_xml/mod_dialplan_xml.c	Wed Jun 13 16:40:06 2007
@@ -378,13 +378,13 @@
 }
 
 
-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,

Modified: freeswitch/trunk/src/mod/directories/mod_ldap/mod_ldap.c
==============================================================================
--- freeswitch/trunk/src/mod/directories/mod_ldap/mod_ldap.c	(original)
+++ freeswitch/trunk/src/mod/directories/mod_ldap/mod_ldap.c	Wed Jun 13 16:40:06 2007
@@ -198,7 +198,7 @@
 }
 
 
-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,

Modified: freeswitch/trunk/src/mod/endpoints/mod_alsa/mod_alsa.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_alsa/mod_alsa.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_alsa/mod_alsa.c	Wed Jun 13 16:40:06 2007
@@ -735,7 +735,7 @@
 	/*.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 @@
 	/*.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 @@
 	/*.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 @@
 	/*.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,

Modified: freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c	Wed Jun 13 16:40:06 2007
@@ -1569,7 +1569,7 @@
 	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 @@
 	/*.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 @@
 	/*.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 @@
 	/*.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,

Modified: freeswitch/trunk/src/mod/endpoints/mod_iax/mod_iax.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_iax/mod_iax.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_iax/mod_iax.c	Wed Jun 13 16:40:06 2007
@@ -43,6 +43,7 @@
 #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 @@
 	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 @@
 													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 @@
 	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_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;
 

Modified: freeswitch/trunk/src/mod/endpoints/mod_portaudio/mod_portaudio.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_portaudio/mod_portaudio.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_portaudio/mod_portaudio.c	Wed Jun 13 16:40:06 2007
@@ -782,7 +782,7 @@
 	/*.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 @@
 	/*.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 @@
 	/*.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 @@
 	/*.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,

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c	Wed Jun 13 16:40:06 2007
@@ -43,7 +43,7 @@
 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 @@
 
 	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 @@
 
 }
 
-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 @@
 	/*.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 @@
 	/*.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 @@
 	/*.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 @@
 	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 @@
 	/*.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,

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.h
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.h	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.h	Wed Jun 13 16:40:06 2007
@@ -465,7 +465,7 @@
 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);

Modified: freeswitch/trunk/src/mod/endpoints/mod_wanpipe/mod_wanpipe.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_wanpipe/mod_wanpipe.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_wanpipe/mod_wanpipe.c	Wed Jun 13 16:40:06 2007
@@ -963,7 +963,7 @@
 }
 
 
-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 @@
 	/*.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 @@
 	/*.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 @@
 	/*.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,

Modified: freeswitch/trunk/src/mod/endpoints/mod_woomera/mod_woomera.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_woomera/mod_woomera.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_woomera/mod_woomera.c	Wed Jun 13 16:40:06 2007
@@ -441,7 +441,7 @@
 	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 @@
 	/*.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 @@
 	/*.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 @@
 	/*.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,

Modified: freeswitch/trunk/src/mod/event_handlers/mod_event_socket/mod_event_socket.c
==============================================================================
--- freeswitch/trunk/src/mod/event_handlers/mod_event_socket/mod_event_socket.c	(original)
+++ freeswitch/trunk/src/mod/event_handlers/mod_event_socket/mod_event_socket.c	Wed Jun 13 16:40:06 2007
@@ -251,7 +251,7 @@
 }
 
 
-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",

Modified: freeswitch/trunk/src/mod/languages/mod_perl/mod_perl.c
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_perl/mod_perl.c	(original)
+++ freeswitch/trunk/src/mod/languages/mod_perl/mod_perl.c	Wed Jun 13 16:40:06 2007
@@ -79,7 +79,7 @@
 	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,

Modified: freeswitch/trunk/src/mod/languages/mod_python/mod_python.c
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_python/mod_python.c	(original)
+++ freeswitch/trunk/src/mod/languages/mod_python/mod_python.c	Wed Jun 13 16:40:06 2007
@@ -193,7 +193,7 @@
 	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,

Modified: freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c	(original)
+++ freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c	Wed Jun 13 16:40:06 2007
@@ -2984,7 +2984,7 @@
 }
 
 
-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",

Modified: freeswitch/trunk/src/mod/say/mod_say_en/mod_say_en.c
==============================================================================
--- freeswitch/trunk/src/mod/say/mod_say_en/mod_say_en.c	(original)
+++ freeswitch/trunk/src/mod/say/mod_say_en/mod_say_en.c	Wed Jun 13 16:40:06 2007
@@ -510,12 +510,12 @@
 	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

Modified: freeswitch/trunk/src/mod/timers/mod_softtimer/mod_softtimer.c
==============================================================================
--- freeswitch/trunk/src/mod/timers/mod_softtimer/mod_softtimer.c	(original)
+++ freeswitch/trunk/src/mod/timers/mod_softtimer/mod_softtimer.c	Wed Jun 13 16:40:06 2007
@@ -186,7 +186,7 @@
 	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 @@
 	/*.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

Modified: freeswitch/trunk/src/mod/xml_int/mod_xml_cdr/mod_xml_cdr.c
==============================================================================
--- freeswitch/trunk/src/mod/xml_int/mod_xml_cdr/mod_xml_cdr.c	(original)
+++ freeswitch/trunk/src/mod/xml_int/mod_xml_cdr/mod_xml_cdr.c	Wed Jun 13 16:40:06 2007
@@ -82,7 +82,7 @@
 	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_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,

Modified: freeswitch/trunk/src/switch_loadable_module.c
==============================================================================
--- freeswitch/trunk/src/switch_loadable_module.c	(original)
+++ freeswitch/trunk/src/switch_loadable_module.c	Wed Jun 13 16:40:06 2007
@@ -44,7 +44,7 @@
 	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 @@
 	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 @@
 			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_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 @@
 			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 @@
 		/* oh well we will use what we have */
 		array[i++] = codec_interface->implementations;
 
-	  found:
+	found:
 
 		if (i > arraylen) {
 			break;
@@ -1282,7 +1282,7 @@
 				}
 			}
 
-		  found:
+		found:
 
 			if (i > arraylen) {
 				break;
@@ -1333,6 +1333,84 @@
 	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



More information about the Freeswitch-svn mailing list