mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-13 20:50:41 +00:00
add start_dtmf and stop_dtmf apps, inspired by trixter.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5256 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
105f4cfe4c
commit
47755f4d20
@ -649,6 +649,27 @@ static void ivr_application_function(switch_core_session_t *session, char *data)
|
||||
}
|
||||
|
||||
|
||||
static void dtm_session_function(switch_core_session_t *session, char *data)
|
||||
{
|
||||
switch_channel_t *channel;
|
||||
|
||||
channel = switch_core_session_get_channel(session);
|
||||
assert(channel != NULL);
|
||||
|
||||
switch_ivr_inband_dtmf_session(session);
|
||||
}
|
||||
|
||||
|
||||
static void stop_dtmf_session_function(switch_core_session_t *session, char *data)
|
||||
{
|
||||
switch_channel_t *channel;
|
||||
|
||||
channel = switch_core_session_get_channel(session);
|
||||
assert(channel != NULL);
|
||||
|
||||
switch_ivr_stop_inband_dtmf_session(session);
|
||||
}
|
||||
|
||||
static const switch_api_interface_t strepoch_api_interface = {
|
||||
/*.interface_name */ "strepoch",
|
||||
/*.desc */ "Convert a date string into epoch time",
|
||||
@ -681,6 +702,25 @@ static const switch_api_interface_t presence_api_interface = {
|
||||
/*.next */ &dptools_api_interface
|
||||
};
|
||||
|
||||
static const switch_application_interface_t dtmf_application_interface = {
|
||||
/*.interface_name */ "start_dtmf",
|
||||
/*.application_function */ dtm_session_function,
|
||||
/* long_desc */ "Detect inband dtmf on the session",
|
||||
/* short_desc */ "Detect dtmf",
|
||||
/* syntax */ "",
|
||||
/* flags */ SAF_NONE,
|
||||
NULL
|
||||
};
|
||||
|
||||
static const switch_application_interface_t stop_dtmf_application_interface = {
|
||||
/*.interface_name */ "stop_dtmf",
|
||||
/*.application_function */ stop_dtmf_session_function,
|
||||
/* long_desc */ "Stop detecting inband dtmf.",
|
||||
/* short_desc */ "stop inband dtmf.",
|
||||
/* syntax */ "<path>",
|
||||
/* flags */ SAF_NONE,
|
||||
&dtmf_application_interface
|
||||
};
|
||||
|
||||
static const switch_application_interface_t exe_application_interface = {
|
||||
/*.interface_name */ "execute_extension",
|
||||
@ -689,7 +729,7 @@ static const switch_application_interface_t exe_application_interface = {
|
||||
/*.short_desc */ "Execute an extension",
|
||||
/*.syntax */ "<extension> <dialplan> <context>",
|
||||
/* flags */ SAF_SUPPORT_NOMEDIA,
|
||||
/*.next */
|
||||
/*.next */ &stop_dtmf_application_interface
|
||||
};
|
||||
|
||||
static const switch_application_interface_t sched_transfer_application_interface = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user