提交 3e3760a9 authored 作者: Michael Jerris's avatar Michael Jerris

add flags to the application interface for marking if apps support no media mode. FSCORE-7

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4400 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 5090abc9
...@@ -595,6 +595,8 @@ struct switch_application_interface { ...@@ -595,6 +595,8 @@ struct switch_application_interface {
const char *short_desc; const char *short_desc;
/*! an example of the application syntax */ /*! an example of the application syntax */
const char *syntax; const char *syntax;
/*! flags to control behaviour */
uint32_t flags;
const struct switch_application_interface *next; const struct switch_application_interface *next;
}; };
...@@ -606,7 +608,7 @@ struct switch_api_interface { ...@@ -606,7 +608,7 @@ struct switch_api_interface {
const char *desc; const char *desc;
/*! function the api call uses */ /*! function the api call uses */
switch_api_function_t function; switch_api_function_t function;
/*! an example of the application syntax */ /*! an example of the api syntax */
const char *syntax; const char *syntax;
const struct switch_api_interface *next; const struct switch_api_interface *next;
}; };
......
...@@ -531,6 +531,11 @@ typedef enum { ...@@ -531,6 +531,11 @@ typedef enum {
} switch_frame_flag_t; } switch_frame_flag_t;
typedef enum {
SAF_NONE = 0,
SAF_SUPPORT_NOMEDIA = (1 << 0)
} switch_application_flag_t;
/*! /*!
\enum switch_signal_t \enum switch_signal_t
\brief Signals to send to channels \brief Signals to send to channels
......
...@@ -118,6 +118,7 @@ static const switch_application_interface_t bridge_application_interface = { ...@@ -118,6 +118,7 @@ static const switch_application_interface_t bridge_application_interface = {
/* long_desc */ "Bridge the audio between two sessions", /* long_desc */ "Bridge the audio between two sessions",
/* short_desc */ "Bridge Audio", /* short_desc */ "Bridge Audio",
/* syntax */ "<channel_url>", /* syntax */ "<channel_url>",
/* flags */ SAF_SUPPORT_NOMEDIA
}; };
static const switch_loadable_module_interface_t mod_bridgecall_module_interface = { static const switch_loadable_module_interface_t mod_bridgecall_module_interface = {
......
...@@ -4088,6 +4088,7 @@ static const switch_application_interface_t conference_application_interface = { ...@@ -4088,6 +4088,7 @@ static const switch_application_interface_t conference_application_interface = {
/*.interface_name */ global_app_name, /*.interface_name */ global_app_name,
/*.application_function */ conference_function, /*.application_function */ conference_function,
NULL, NULL, NULL, NULL, NULL, NULL,
/* flags */ SAF_NONE,
/*.next*/ NULL /*.next*/ NULL
}; };
......
...@@ -547,6 +547,7 @@ static const switch_application_interface_t queuedtmf_application_interface = { ...@@ -547,6 +547,7 @@ static const switch_application_interface_t queuedtmf_application_interface = {
/* long_desc */ "Queue dtmf to be sent from a session", /* long_desc */ "Queue dtmf to be sent from a session",
/* short_desc */ "Queue dtmf to be sent", /* short_desc */ "Queue dtmf to be sent",
/* syntax */ "<dtmf_data>", /* syntax */ "<dtmf_data>",
/* flags */ SAF_SUPPORT_NOMEDIA,
/*.next */ NULL /*.next */ NULL
}; };
...@@ -556,6 +557,7 @@ static const switch_application_interface_t redirect_application_interface = { ...@@ -556,6 +557,7 @@ static const switch_application_interface_t redirect_application_interface = {
/* long_desc */ "Send a redirect message to a session.", /* long_desc */ "Send a redirect message to a session.",
/* short_desc */ "Send session redirect", /* short_desc */ "Send session redirect",
/* syntax */ "<redirect_data>", /* syntax */ "<redirect_data>",
/* flags */ SAF_SUPPORT_NOMEDIA,
/*.next */ &queuedtmf_application_interface /*.next */ &queuedtmf_application_interface
}; };
...@@ -565,6 +567,7 @@ static const switch_application_interface_t ivr_application_interface = { ...@@ -565,6 +567,7 @@ static const switch_application_interface_t ivr_application_interface = {
/* long_desc */ "Run an ivr menu.", /* long_desc */ "Run an ivr menu.",
/* short_desc */ "Run an ivr menu", /* short_desc */ "Run an ivr menu",
/* syntax */ "<menu_name>", /* syntax */ "<menu_name>",
/* flags */ SAF_NONE,
/*.next */ &redirect_application_interface /*.next */ &redirect_application_interface
}; };
...@@ -574,6 +577,7 @@ static const switch_application_interface_t detect_speech_application_interface ...@@ -574,6 +577,7 @@ static const switch_application_interface_t detect_speech_application_interface
/* long_desc */ "Detect speech on a channel.", /* long_desc */ "Detect speech on a channel.",
/* short_desc */ "Detect speech", /* short_desc */ "Detect speech",
/* syntax */ "<mod_name> <gram_name> <gram_path> [<addr>] OR grammar <gram_name> [<path>] OR pause OR resume", /* syntax */ "<mod_name> <gram_name> <gram_path> [<addr>] OR grammar <gram_name> [<path>] OR pause OR resume",
/* flags */ SAF_NONE,
/*.next */ &ivr_application_interface /*.next */ &ivr_application_interface
}; };
...@@ -583,6 +587,7 @@ static const switch_application_interface_t ring_ready_application_interface = { ...@@ -583,6 +587,7 @@ static const switch_application_interface_t ring_ready_application_interface = {
/* long_desc */ "Indicate Ring_Ready on a channel.", /* long_desc */ "Indicate Ring_Ready on a channel.",
/* short_desc */ "Indicate Ring_Ready", /* short_desc */ "Indicate Ring_Ready",
/* syntax */ "", /* syntax */ "",
/* flags */ SAF_SUPPORT_NOMEDIA,
/*.next */ &detect_speech_application_interface /*.next */ &detect_speech_application_interface
}; };
...@@ -592,6 +597,7 @@ static const switch_application_interface_t unset_application_interface = { ...@@ -592,6 +597,7 @@ static const switch_application_interface_t unset_application_interface = {
/* long_desc */ "Unset a channel varaible for the channel calling the application.", /* long_desc */ "Unset a channel varaible for the channel calling the application.",
/* short_desc */ "Unset a channel varaible", /* short_desc */ "Unset a channel varaible",
/* syntax */ "<varname>", /* syntax */ "<varname>",
/* flags */ SAF_SUPPORT_NOMEDIA,
/*.next */ &ring_ready_application_interface /*.next */ &ring_ready_application_interface
}; };
...@@ -601,6 +607,7 @@ static const switch_application_interface_t set_application_interface = { ...@@ -601,6 +607,7 @@ static const switch_application_interface_t set_application_interface = {
/* long_desc */ "Set a channel varaible for the channel calling the application.", /* long_desc */ "Set a channel varaible for the channel calling the application.",
/* short_desc */ "Set a channel varaible", /* short_desc */ "Set a channel varaible",
/* syntax */ "<varname>=<value>", /* syntax */ "<varname>=<value>",
/* flags */ SAF_SUPPORT_NOMEDIA,
/*.next */ &unset_application_interface /*.next */ &unset_application_interface
}; };
...@@ -610,6 +617,7 @@ static const switch_application_interface_t export_application_interface = { ...@@ -610,6 +617,7 @@ static const switch_application_interface_t export_application_interface = {
/* long_desc */ "Set and export a channel varaible for the channel calling the application.", /* long_desc */ "Set and export a channel varaible for the channel calling the application.",
/* short_desc */ "Export a channel varaible across a bridge", /* short_desc */ "Export a channel varaible across a bridge",
/* syntax */ "<varname>=<value>", /* syntax */ "<varname>=<value>",
/* flags */ SAF_SUPPORT_NOMEDIA,
/*.next */ &set_application_interface /*.next */ &set_application_interface
}; };
...@@ -619,6 +627,7 @@ static const switch_application_interface_t info_application_interface = { ...@@ -619,6 +627,7 @@ static const switch_application_interface_t info_application_interface = {
/* long_desc */ "Display Call Info", /* long_desc */ "Display Call Info",
/* short_desc */ "Display Call Info", /* short_desc */ "Display Call Info",
/* syntax */ "", /* syntax */ "",
/* flags */ SAF_SUPPORT_NOMEDIA,
/*.next */ &export_application_interface /*.next */ &export_application_interface
}; };
...@@ -628,6 +637,7 @@ static const switch_application_interface_t log_application_interface = { ...@@ -628,6 +637,7 @@ static const switch_application_interface_t log_application_interface = {
/* long_desc */ "Logs a channel varaible for the channel calling the application.", /* long_desc */ "Logs a channel varaible for the channel calling the application.",
/* short_desc */ "Logs a channel varaible", /* short_desc */ "Logs a channel varaible",
/* syntax */ "<varname>", /* syntax */ "<varname>",
/* flags */ SAF_SUPPORT_NOMEDIA,
/*.next */ &info_application_interface /*.next */ &info_application_interface
}; };
...@@ -638,6 +648,7 @@ static const switch_application_interface_t hangup_application_interface = { ...@@ -638,6 +648,7 @@ static const switch_application_interface_t hangup_application_interface = {
/* long_desc */ "Hangup the call for a channel.", /* long_desc */ "Hangup the call for a channel.",
/* short_desc */ "Hangup the call", /* short_desc */ "Hangup the call",
/* syntax */ "[<cause>]", /* syntax */ "[<cause>]",
/* flags */ SAF_SUPPORT_NOMEDIA,
/*.next */ &log_application_interface /*.next */ &log_application_interface
}; };
...@@ -648,6 +659,7 @@ static const switch_application_interface_t answer_application_interface = { ...@@ -648,6 +659,7 @@ static const switch_application_interface_t answer_application_interface = {
/* long_desc */ "Answer the call for a channel.", /* long_desc */ "Answer the call for a channel.",
/* short_desc */ "Answer the call", /* short_desc */ "Answer the call",
/* syntax */ "", /* syntax */ "",
/* flags */ SAF_SUPPORT_NOMEDIA,
/*.next */ &hangup_application_interface /*.next */ &hangup_application_interface
}; };
...@@ -658,6 +670,7 @@ static const switch_application_interface_t pre_answer_application_interface = { ...@@ -658,6 +670,7 @@ static const switch_application_interface_t pre_answer_application_interface = {
/* long_desc */ "Pre-Answer the call for a channel.", /* long_desc */ "Pre-Answer the call for a channel.",
/* short_desc */ "Pre-Answer the call", /* short_desc */ "Pre-Answer the call",
/* syntax */ "", /* syntax */ "",
/* flags */ SAF_SUPPORT_NOMEDIA,
/*.next */ &answer_application_interface /*.next */ &answer_application_interface
}; };
...@@ -668,6 +681,7 @@ static const switch_application_interface_t eval_application_interface = { ...@@ -668,6 +681,7 @@ static const switch_application_interface_t eval_application_interface = {
/* long_desc */ "Do Nothing", /* long_desc */ "Do Nothing",
/* short_desc */ "Do Nothing", /* short_desc */ "Do Nothing",
/* syntax */ "", /* syntax */ "",
/* flags */ SAF_SUPPORT_NOMEDIA,
/*.next */ &pre_answer_application_interface /*.next */ &pre_answer_application_interface
}; };
...@@ -678,6 +692,7 @@ static const switch_application_interface_t phrase_application_interface = { ...@@ -678,6 +692,7 @@ static const switch_application_interface_t phrase_application_interface = {
/* long_desc */ "Say a Phrase", /* long_desc */ "Say a Phrase",
/* short_desc */ "Say a Phrase", /* short_desc */ "Say a Phrase",
/* syntax */ "<macro_name>,<data>", /* syntax */ "<macro_name>,<data>",
/* flags */ SAF_NONE,
/*.next */ &eval_application_interface /*.next */ &eval_application_interface
}; };
...@@ -688,6 +703,7 @@ static const switch_application_interface_t strftime_application_interface = { ...@@ -688,6 +703,7 @@ static const switch_application_interface_t strftime_application_interface = {
/* long_desc */ NULL, /* long_desc */ NULL,
/* short_desc */ NULL, /* short_desc */ NULL,
/* syntax */ NULL, /* syntax */ NULL,
/* flags */ SAF_SUPPORT_NOMEDIA,
/*.next */ &phrase_application_interface /*.next */ &phrase_application_interface
}; };
...@@ -698,6 +714,7 @@ static const switch_application_interface_t sleep_application_interface = { ...@@ -698,6 +714,7 @@ static const switch_application_interface_t sleep_application_interface = {
/* long_desc */ "Pause the channel for a given number of milliseconds, consuming the audio for that period of time.", /* long_desc */ "Pause the channel for a given number of milliseconds, consuming the audio for that period of time.",
/* short_desc */ "Pause a channel", /* short_desc */ "Pause a channel",
/* syntax */ "<pausemilliseconds>", /* syntax */ "<pausemilliseconds>",
/* flags */ SAF_NONE,
/* next */ &strftime_application_interface /* next */ &strftime_application_interface
}; };
...@@ -707,6 +724,7 @@ static const switch_application_interface_t transfer_application_interface = { ...@@ -707,6 +724,7 @@ static const switch_application_interface_t transfer_application_interface = {
/* long_desc */ "Immediatly transfer the calling channel to a new extension", /* long_desc */ "Immediatly transfer the calling channel to a new extension",
/* short_desc */ "Transfer a channel", /* short_desc */ "Transfer a channel",
/* syntax */ "<exten> [<dialplan> <context>]", /* syntax */ "<exten> [<dialplan> <context>]",
/* flags */ SAF_SUPPORT_NOMEDIA,
/* next */ &sleep_application_interface /* next */ &sleep_application_interface
}; };
...@@ -716,6 +734,7 @@ static const switch_application_interface_t privacy_application_interface = { ...@@ -716,6 +734,7 @@ static const switch_application_interface_t privacy_application_interface = {
/* long_desc */ "Set caller privacy on calls.", /* long_desc */ "Set caller privacy on calls.",
/* short_desc */ "Set privacy on calls", /* short_desc */ "Set privacy on calls",
/* syntax */ "off|on|name|full|number", /* syntax */ "off|on|name|full|number",
/* flags */ SAF_SUPPORT_NOMEDIA,
/*.next */ &transfer_application_interface /*.next */ &transfer_application_interface
}; };
......
...@@ -48,7 +48,10 @@ static void echo_function(switch_core_session_t *session, char *data) ...@@ -48,7 +48,10 @@ static void echo_function(switch_core_session_t *session, char *data)
static const switch_application_interface_t echo_application_interface = { static const switch_application_interface_t echo_application_interface = {
/*.interface_name */ "echo", /*.interface_name */ "echo",
/*.application_function */ echo_function, /*.application_function */ echo_function,
NULL,NULL,NULL,NULL /* long_desc */ "Perform an echo test against the calling channel",
/* short_desc */ "Echo",
/* syntax */ "",
/* flags */ SAF_NONE,
}; };
static switch_loadable_module_interface_t echo_module_interface = { static switch_loadable_module_interface_t echo_module_interface = {
......
...@@ -689,6 +689,7 @@ static const switch_application_interface_t enum_application_interface = { ...@@ -689,6 +689,7 @@ static const switch_application_interface_t enum_application_interface = {
/* long_desc */ "Perform an ENUM lookup", /* long_desc */ "Perform an ENUM lookup",
/* short_desc */ "Perform an ENUM lookup", /* short_desc */ "Perform an ENUM lookup",
/* syntax */ "<number> [<root>]", /* syntax */ "<number> [<root>]",
/* flags */ SAF_SUPPORT_NOMEDIA,
/*.next */ NULL /*.next */ NULL
}; };
...@@ -729,3 +730,4 @@ SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_mod ...@@ -729,3 +730,4 @@ SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_mod
return SWITCH_STATUS_SUCCESS; return SWITCH_STATUS_SUCCESS;
} }
...@@ -462,6 +462,7 @@ static const switch_application_interface_t bug_application_interface = { ...@@ -462,6 +462,7 @@ static const switch_application_interface_t bug_application_interface = {
/*.interface_name */ "bugtest", /*.interface_name */ "bugtest",
/*.application_function */ bugtest_function, /*.application_function */ bugtest_function,
NULL, NULL, NULL, NULL, NULL, NULL,
/* flags */ SAF_NONE,
/*.next*/ NULL /*.next*/ NULL
}; };
...@@ -469,6 +470,7 @@ static const switch_application_interface_t ivr_application_interface = { ...@@ -469,6 +470,7 @@ static const switch_application_interface_t ivr_application_interface = {
/*.interface_name */ "ivrmenu", /*.interface_name */ "ivrmenu",
/*.application_function */ ivr_application_function, /*.application_function */ ivr_application_function,
NULL, NULL, NULL, NULL, NULL, NULL,
/* flags */ SAF_NONE,
/*.next*/ &bug_application_interface /*.next*/ &bug_application_interface
}; };
...@@ -476,6 +478,7 @@ static const switch_application_interface_t xml_application_interface = { ...@@ -476,6 +478,7 @@ static const switch_application_interface_t xml_application_interface = {
/*.interface_name */ "xml", /*.interface_name */ "xml",
/*.application_function */ xml_function, /*.application_function */ xml_function,
NULL, NULL, NULL, NULL, NULL, NULL,
/* flags */ SAF_NONE,
/*.next*/ &ivr_application_interface /*.next*/ &ivr_application_interface
}; };
...@@ -483,6 +486,7 @@ static const switch_application_interface_t disast_application_interface = { ...@@ -483,6 +486,7 @@ static const switch_application_interface_t disast_application_interface = {
/*.interface_name */ "disast", /*.interface_name */ "disast",
/*.application_function */ disast_function, /*.application_function */ disast_function,
NULL, NULL, NULL, NULL, NULL, NULL,
/* flags */ SAF_SUPPORT_NOMEDIA,
/*.next*/ &xml_application_interface /*.next*/ &xml_application_interface
}; };
...@@ -490,6 +494,7 @@ static const switch_application_interface_t tts_application_interface = { ...@@ -490,6 +494,7 @@ static const switch_application_interface_t tts_application_interface = {
/*.interface_name */ "tts", /*.interface_name */ "tts",
/*.application_function */ tts_function, /*.application_function */ tts_function,
NULL, NULL, NULL, NULL, NULL, NULL,
/* flags */ SAF_NONE,
/*.next*/ &disast_application_interface /*.next*/ &disast_application_interface
}; };
...@@ -497,6 +502,7 @@ static const switch_application_interface_t dirtest_application_interface = { ...@@ -497,6 +502,7 @@ static const switch_application_interface_t dirtest_application_interface = {
/*.interface_name */ "dirtest", /*.interface_name */ "dirtest",
/*.application_function */ dirtest_function, /*.application_function */ dirtest_function,
NULL, NULL, NULL, NULL, NULL, NULL,
/* flags */ SAF_SUPPORT_NOMEDIA,
/*.next*/ &tts_application_interface /*.next*/ &tts_application_interface
}; };
...@@ -504,6 +510,7 @@ static const switch_application_interface_t ivrtest_application_interface = { ...@@ -504,6 +510,7 @@ static const switch_application_interface_t ivrtest_application_interface = {
/*.interface_name */ "ivrtest", /*.interface_name */ "ivrtest",
/*.application_function */ ivrtest_function, /*.application_function */ ivrtest_function,
NULL, NULL, NULL, NULL, NULL, NULL,
/* flags */ SAF_NONE,
/*.next*/ &dirtest_application_interface /*.next*/ &dirtest_application_interface
}; };
...@@ -511,6 +518,7 @@ static const switch_application_interface_t asrtest_application_interface = { ...@@ -511,6 +518,7 @@ static const switch_application_interface_t asrtest_application_interface = {
/*.interface_name */ "asrtest", /*.interface_name */ "asrtest",
/*.application_function */ asrtest_function, /*.application_function */ asrtest_function,
NULL, NULL, NULL, NULL, NULL, NULL,
/* flags */ SAF_NONE,
/*.next*/ &ivrtest_application_interface /*.next*/ &ivrtest_application_interface
}; };
......
...@@ -41,7 +41,9 @@ static void park_function(switch_core_session_t *session, char *data) ...@@ -41,7 +41,9 @@ static void park_function(switch_core_session_t *session, char *data)
static const switch_application_interface_t park_application_interface = { static const switch_application_interface_t park_application_interface = {
/*.interface_name */ "park", /*.interface_name */ "park",
/*.application_function */ park_function, /*.application_function */ park_function,
NULL,NULL,NULL,NULL NULL,NULL,NULL,
/* flags */ SAF_NONE,
NULL
}; };
static switch_loadable_module_interface_t park_module_interface = { static switch_loadable_module_interface_t park_module_interface = {
......
...@@ -177,13 +177,20 @@ static void stop_record_session_function(switch_core_session_t *session, char *d ...@@ -177,13 +177,20 @@ static void stop_record_session_function(switch_core_session_t *session, char *d
static const switch_application_interface_t speak_application_interface = { static const switch_application_interface_t speak_application_interface = {
/*.interface_name */ "speak", /*.interface_name */ "speak",
/*.application_function */ speak_function /*.application_function */ speak_function,
/* long_desc */ "Speak text to a channel via the tts interface",
/* short_desc */ "Speak text",
/* syntax */ "<engine>|<voice>|<text>",
/* flags */ SAF_NONE,
}; };
static const switch_application_interface_t record_application_interface = { static const switch_application_interface_t record_application_interface = {
/*.interface_name */ "record", /*.interface_name */ "record",
/*.application_function */ record_function, /*.application_function */ record_function,
NULL,NULL,NULL, /* long_desc */ "Record a file from the channels input",
/* short_desc */ "Record File",
/* syntax */ "<path> [+time_limit_ms]",
/* flags */ SAF_NONE,
&speak_application_interface &speak_application_interface
}; };
...@@ -191,7 +198,10 @@ static const switch_application_interface_t record_application_interface = { ...@@ -191,7 +198,10 @@ static const switch_application_interface_t record_application_interface = {
static const switch_application_interface_t record_session_application_interface = { static const switch_application_interface_t record_session_application_interface = {
/*.interface_name */ "record_session", /*.interface_name */ "record_session",
/*.application_function */ record_session_function, /*.application_function */ record_session_function,
NULL,NULL,NULL, /* long_desc */ "Starts a background recording of the entire session",
/* short_desc */ "Record Session",
/* syntax */ "<path>",
/* flags */ SAF_NONE,
&record_application_interface &record_application_interface
}; };
...@@ -199,15 +209,21 @@ static const switch_application_interface_t record_session_application_interface ...@@ -199,15 +209,21 @@ static const switch_application_interface_t record_session_application_interface
static const switch_application_interface_t stop_record_session_application_interface = { static const switch_application_interface_t stop_record_session_application_interface = {
/*.interface_name */ "stop_record_session", /*.interface_name */ "stop_record_session",
/*.application_function */ stop_record_session_function, /*.application_function */ stop_record_session_function,
NULL,NULL,NULL, /* long_desc */ "Stops a background recording of the entire session",
/* short_desc */ "Stop Record Session",
/* syntax */ "<path>",
/* flags */ SAF_NONE,
&record_session_application_interface &record_session_application_interface
}; };
static const switch_application_interface_t playback_application_interface = { static const switch_application_interface_t playback_application_interface = {
/*.interface_name */ "playback", /*.interface_name */ "playback",
/*.application_function */ playback_function, /*.application_function */ playback_function,
NULL,NULL,NULL, /* long_desc */ "Playback a file to the channel",
/*.next*/ &stop_record_session_application_interface /* short_desc */ "Playback File",
/* syntax */ "<path>",
/* flags */ SAF_NONE,
/*.next*/ &stop_record_session_application_interface
}; };
static const switch_loadable_module_interface_t mod_playback_module_interface = { static const switch_loadable_module_interface_t mod_playback_module_interface = {
......
...@@ -658,6 +658,7 @@ static const switch_application_interface_t rss_application_interface = { ...@@ -658,6 +658,7 @@ static const switch_application_interface_t rss_application_interface = {
/*.interface_name */ "rss", /*.interface_name */ "rss",
/*.application_function */ rss_function, /*.application_function */ rss_function,
NULL, NULL, NULL, NULL, NULL, NULL,
/* flags */ SAF_NONE,
/*.next*/ NULL /*.next*/ NULL
}; };
......
...@@ -252,6 +252,7 @@ static const switch_application_interface_t socket_application_interface = { ...@@ -252,6 +252,7 @@ static const switch_application_interface_t socket_application_interface = {
/* long_desc */ "Connect to a socket", /* long_desc */ "Connect to a socket",
/* short_desc */ "Connect to a socket", /* short_desc */ "Connect to a socket",
/* syntax */ "<ip>[:<port>]", /* syntax */ "<ip>[:<port>]",
/* flags */ SAF_SUPPORT_NOMEDIA,
/*.next */ NULL /*.next */ NULL
}; };
......
...@@ -82,7 +82,10 @@ static void perl_function(switch_core_session_t *session, char *data) ...@@ -82,7 +82,10 @@ static void perl_function(switch_core_session_t *session, char *data)
static const switch_application_interface_t perl_application_interface = { static const switch_application_interface_t perl_application_interface = {
/*.interface_name */ "perl", /*.interface_name */ "perl",
/*.application_function */ perl_function /*.application_function */ perl_function,
NULL, NULL, NULL,
/* flags */ SAF_NONE, /* should we support no media mode here? If so, we need to detect the mode, and either disable the media functions or indicate media if/when we need */
/*.next*/ NULL
}; };
static switch_loadable_module_interface_t perl_module_interface = { static switch_loadable_module_interface_t perl_module_interface = {
......
...@@ -256,8 +256,11 @@ static void php_function(switch_core_session_t *session, char *data) ...@@ -256,8 +256,11 @@ static void php_function(switch_core_session_t *session, char *data)
} }
static const switch_application_interface_t php_application_interface = { static const switch_application_interface_t php_application_interface = {
/*.interface_name */ "php", /*.interface_name */ "php",
/*.application_function */ php_function /*.application_function */ php_function,
NULL, NULL, NULL,
/* flags */ SAF_NONE, /* should we support no media mode here? If so, we need to detect the mode, and either disable the media functions or indicate media if/when we need */
/*.next*/ NULL
}; };
static switch_loadable_module_interface_t php_module_interface = { static switch_loadable_module_interface_t php_module_interface = {
......
...@@ -86,7 +86,10 @@ static switch_status_t launch_python(char *text, switch_core_session_t *session, ...@@ -86,7 +86,10 @@ static switch_status_t launch_python(char *text, switch_core_session_t *session,
static const switch_application_interface_t python_application_interface = { static const switch_application_interface_t python_application_interface = {
/*.interface_name */ "python", /*.interface_name */ "python",
/*.application_function */ python_function /*.application_function */ python_function,
NULL, NULL, NULL,
/* flags */ SAF_NONE, /* should we support no media mode here? If so, we need to detect the mode, and either disable the media functions or indicate media if/when we need */
/*.next*/ NULL
}; };
static switch_api_interface_t python_run_interface = { static switch_api_interface_t python_run_interface = {
......
...@@ -78,7 +78,10 @@ static void ruby_function(switch_core_session_t *session, char *data) ...@@ -78,7 +78,10 @@ static void ruby_function(switch_core_session_t *session, char *data)
static const switch_application_interface_t ruby_application_interface = { static const switch_application_interface_t ruby_application_interface = {
/*.interface_name */ "ruby", /*.interface_name */ "ruby",
/*.application_function */ ruby_function /*.application_function */ ruby_function,
NULL, NULL, NULL,
/* flags */ SAF_NONE, /* should we support no media mode here? If so, we need to detect the mode, and either disable the media functions or indicate media if/when we need */
/*.next*/ NULL
}; };
static switch_loadable_module_interface_t ruby_module_interface = { static switch_loadable_module_interface_t ruby_module_interface = {
......
...@@ -2570,7 +2570,10 @@ static switch_status_t launch_async(char *text, switch_core_session_t *session, ...@@ -2570,7 +2570,10 @@ static switch_status_t launch_async(char *text, switch_core_session_t *session,
static const switch_application_interface_t ivrtest_application_interface = { static const switch_application_interface_t ivrtest_application_interface = {
/*.interface_name */ "javascript", /*.interface_name */ "javascript",
/*.application_function */ js_parse_and_execute, /*.application_function */ js_parse_and_execute,
NULL, NULL, NULL, /* long_desc */ "Run a javascript ivr on a channel",
/* short_desc */ "Launch JS ivr.",
/* syntax */ "<script> [additional_vars [...]]",
/* flags */ SAF_NONE, /* should we support no media mode here? If so, we need to detect the mode, and either disable the media functions or indicate media if/when we need */
/*.next*/ NULL /*.next*/ NULL
}; };
...@@ -2578,7 +2581,7 @@ static switch_api_interface_t js_run_interface = { ...@@ -2578,7 +2581,7 @@ static switch_api_interface_t js_run_interface = {
/*.interface_name */ "jsrun", /*.interface_name */ "jsrun",
/*.desc */ "run a script", /*.desc */ "run a script",
/*.function */ launch_async, /*.function */ launch_async,
/*.syntax */ "jsrun <script>", /*.syntax */ "jsrun <script> [additional_vars [...]]",
/*.next */ NULL /*.next */ NULL
}; };
......
...@@ -139,10 +139,7 @@ static const switch_timer_interface_t timer_interface = { ...@@ -139,10 +139,7 @@ static const switch_timer_interface_t timer_interface = {
static const switch_loadable_module_interface_t mod_softtimer_module_interface = { static const switch_loadable_module_interface_t mod_softtimer_module_interface = {
/*.module_name */ modname, /*.module_name */ modname,
/*.endpoint_interface */ NULL, /*.endpoint_interface */ NULL,
/*.timer_interface */ &timer_interface, /*.timer_interface */ &timer_interface
/*.switch_dialplan_interface */ NULL,
/*.switch_codec_interface */ NULL,
/*.switch_application_interface */ NULL
}; };
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **module_interface, char *filename) SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **module_interface, char *filename)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论