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