const char *short_desc;
/*! an example of the application syntax */
const char *syntax;
+ /*! flags to control behaviour */
+ uint32_t flags;
const struct switch_application_interface *next;
};
const char *desc;
/*! function the api call uses */
switch_api_function_t function;
- /*! an example of the application syntax */
+ /*! an example of the api syntax */
const char *syntax;
const struct switch_api_interface *next;
};
} switch_frame_flag_t;
+typedef enum {
+ SAF_NONE = 0,
+ SAF_SUPPORT_NOMEDIA = (1 << 0)
+} switch_application_flag_t;
+
/*!
\enum switch_signal_t
\brief Signals to send to channels
/* long_desc */ "Bridge the audio between two sessions",
/* short_desc */ "Bridge Audio",
/* syntax */ "<channel_url>",
+ /* flags */ SAF_SUPPORT_NOMEDIA
};
static const switch_loadable_module_interface_t mod_bridgecall_module_interface = {
/*.interface_name */ global_app_name,
/*.application_function */ conference_function,
NULL, NULL, NULL,
+ /* flags */ SAF_NONE,
/*.next*/ NULL
};
/* long_desc */ "Queue dtmf to be sent from a session",
/* short_desc */ "Queue dtmf to be sent",
/* syntax */ "<dtmf_data>",
+ /* flags */ SAF_SUPPORT_NOMEDIA,
/*.next */ NULL
};
/* long_desc */ "Send a redirect message to a session.",
/* short_desc */ "Send session redirect",
/* syntax */ "<redirect_data>",
+ /* flags */ SAF_SUPPORT_NOMEDIA,
/*.next */ &queuedtmf_application_interface
};
/* long_desc */ "Run an ivr menu.",
/* short_desc */ "Run an ivr menu",
/* syntax */ "<menu_name>",
+ /* flags */ SAF_NONE,
/*.next */ &redirect_application_interface
};
/* long_desc */ "Detect speech on a channel.",
/* short_desc */ "Detect speech",
/* syntax */ "<mod_name> <gram_name> <gram_path> [<addr>] OR grammar <gram_name> [<path>] OR pause OR resume",
+ /* flags */ SAF_NONE,
/*.next */ &ivr_application_interface
};
/* long_desc */ "Indicate Ring_Ready on a channel.",
/* short_desc */ "Indicate Ring_Ready",
/* syntax */ "",
+ /* flags */ SAF_SUPPORT_NOMEDIA,
/*.next */ &detect_speech_application_interface
};
/* long_desc */ "Unset a channel varaible for the channel calling the application.",
/* short_desc */ "Unset a channel varaible",
/* syntax */ "<varname>",
+ /* flags */ SAF_SUPPORT_NOMEDIA,
/*.next */ &ring_ready_application_interface
};
/* long_desc */ "Set a channel varaible for the channel calling the application.",
/* short_desc */ "Set a channel varaible",
/* syntax */ "<varname>=<value>",
+ /* flags */ SAF_SUPPORT_NOMEDIA,
/*.next */ &unset_application_interface
};
/* long_desc */ "Set and export a channel varaible for the channel calling the application.",
/* short_desc */ "Export a channel varaible across a bridge",
/* syntax */ "<varname>=<value>",
+ /* flags */ SAF_SUPPORT_NOMEDIA,
/*.next */ &set_application_interface
};
/* long_desc */ "Display Call Info",
/* short_desc */ "Display Call Info",
/* syntax */ "",
+ /* flags */ SAF_SUPPORT_NOMEDIA,
/*.next */ &export_application_interface
};
/* long_desc */ "Logs a channel varaible for the channel calling the application.",
/* short_desc */ "Logs a channel varaible",
/* syntax */ "<varname>",
+ /* flags */ SAF_SUPPORT_NOMEDIA,
/*.next */ &info_application_interface
};
/* long_desc */ "Hangup the call for a channel.",
/* short_desc */ "Hangup the call",
/* syntax */ "[<cause>]",
+ /* flags */ SAF_SUPPORT_NOMEDIA,
/*.next */ &log_application_interface
};
/* long_desc */ "Answer the call for a channel.",
/* short_desc */ "Answer the call",
/* syntax */ "",
+ /* flags */ SAF_SUPPORT_NOMEDIA,
/*.next */ &hangup_application_interface
};
/* long_desc */ "Pre-Answer the call for a channel.",
/* short_desc */ "Pre-Answer the call",
/* syntax */ "",
+ /* flags */ SAF_SUPPORT_NOMEDIA,
/*.next */ &answer_application_interface
};
/* long_desc */ "Do Nothing",
/* short_desc */ "Do Nothing",
/* syntax */ "",
+ /* flags */ SAF_SUPPORT_NOMEDIA,
/*.next */ &pre_answer_application_interface
};
/* long_desc */ "Say a Phrase",
/* short_desc */ "Say a Phrase",
/* syntax */ "<macro_name>,<data>",
+ /* flags */ SAF_NONE,
/*.next */ &eval_application_interface
};
/* long_desc */ NULL,
/* short_desc */ NULL,
/* syntax */ NULL,
+ /* flags */ SAF_SUPPORT_NOMEDIA,
/*.next */ &phrase_application_interface
};
/* long_desc */ "Pause the channel for a given number of milliseconds, consuming the audio for that period of time.",
/* short_desc */ "Pause a channel",
/* syntax */ "<pausemilliseconds>",
+ /* flags */ SAF_NONE,
/* next */ &strftime_application_interface
};
/* long_desc */ "Immediatly transfer the calling channel to a new extension",
/* short_desc */ "Transfer a channel",
/* syntax */ "<exten> [<dialplan> <context>]",
+ /* flags */ SAF_SUPPORT_NOMEDIA,
/* next */ &sleep_application_interface
};
/* long_desc */ "Set caller privacy on calls.",
/* short_desc */ "Set privacy on calls",
/* syntax */ "off|on|name|full|number",
+ /* flags */ SAF_SUPPORT_NOMEDIA,
/*.next */ &transfer_application_interface
};
static const switch_application_interface_t echo_application_interface = {
/*.interface_name */ "echo",
/*.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 = {
/* long_desc */ "Perform an ENUM lookup",
/* short_desc */ "Perform an ENUM lookup",
/* syntax */ "<number> [<root>]",
+ /* flags */ SAF_SUPPORT_NOMEDIA,
/*.next */ NULL
};
return SWITCH_STATUS_SUCCESS;
}
+
/*.interface_name */ "bugtest",
/*.application_function */ bugtest_function,
NULL, NULL, NULL,
+ /* flags */ SAF_NONE,
/*.next*/ NULL
};
/*.interface_name */ "ivrmenu",
/*.application_function */ ivr_application_function,
NULL, NULL, NULL,
+ /* flags */ SAF_NONE,
/*.next*/ &bug_application_interface
};
/*.interface_name */ "xml",
/*.application_function */ xml_function,
NULL, NULL, NULL,
+ /* flags */ SAF_NONE,
/*.next*/ &ivr_application_interface
};
/*.interface_name */ "disast",
/*.application_function */ disast_function,
NULL, NULL, NULL,
+ /* flags */ SAF_SUPPORT_NOMEDIA,
/*.next*/ &xml_application_interface
};
/*.interface_name */ "tts",
/*.application_function */ tts_function,
NULL, NULL, NULL,
+ /* flags */ SAF_NONE,
/*.next*/ &disast_application_interface
};
/*.interface_name */ "dirtest",
/*.application_function */ dirtest_function,
NULL, NULL, NULL,
+ /* flags */ SAF_SUPPORT_NOMEDIA,
/*.next*/ &tts_application_interface
};
/*.interface_name */ "ivrtest",
/*.application_function */ ivrtest_function,
NULL, NULL, NULL,
+ /* flags */ SAF_NONE,
/*.next*/ &dirtest_application_interface
};
/*.interface_name */ "asrtest",
/*.application_function */ asrtest_function,
NULL, NULL, NULL,
+ /* flags */ SAF_NONE,
/*.next*/ &ivrtest_application_interface
};
static const switch_application_interface_t park_application_interface = {
/*.interface_name */ "park",
/*.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 const switch_application_interface_t speak_application_interface = {
/*.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 = {
/*.interface_name */ "record",
/*.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
};
static const switch_application_interface_t record_session_application_interface = {
/*.interface_name */ "record_session",
/*.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
};
static const switch_application_interface_t stop_record_session_application_interface = {
/*.interface_name */ "stop_record_session",
/*.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
};
static const switch_application_interface_t playback_application_interface = {
/*.interface_name */ "playback",
/*.application_function */ playback_function,
- NULL,NULL,NULL,
- /*.next*/ &stop_record_session_application_interface
+ /* long_desc */ "Playback a file to the channel",
+ /* 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 = {
/*.interface_name */ "rss",
/*.application_function */ rss_function,
NULL, NULL, NULL,
+ /* flags */ SAF_NONE,
/*.next*/ NULL
};
/* long_desc */ "Connect to a socket",
/* short_desc */ "Connect to a socket",
/* syntax */ "<ip>[:<port>]",
+ /* flags */ SAF_SUPPORT_NOMEDIA,
/*.next */ NULL
};
static const switch_application_interface_t perl_application_interface = {
/*.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 const switch_application_interface_t php_application_interface = {
- /*.interface_name */ "php",
- /*.application_function */ php_function
+ /*.interface_name */ "php",
+ /*.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 const switch_application_interface_t python_application_interface = {
/*.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 const switch_application_interface_t ruby_application_interface = {
/*.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 const switch_application_interface_t ivrtest_application_interface = {
/*.interface_name */ "javascript",
/*.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
};
/*.interface_name */ "jsrun",
/*.desc */ "run a script",
/*.function */ launch_async,
- /*.syntax */ "jsrun <script>",
+ /*.syntax */ "jsrun <script> [additional_vars [...]]",
/*.next */ NULL
};
static const switch_loadable_module_interface_t mod_softtimer_module_interface = {
/*.module_name */ modname,
/*.endpoint_interface */ NULL,
- /*.timer_interface */ &timer_interface,
- /*.switch_dialplan_interface */ NULL,
- /*.switch_codec_interface */ NULL,
- /*.switch_application_interface */ NULL
+ /*.timer_interface */ &timer_interface
};
SWITCH_MOD_DECLARE(switch_status_t) switch_module_load(const switch_loadable_module_interface_t **module_interface, char *filename)