add flush_dtmf app and uuid_flush_dtmf api command
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10252 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
af0d0d28c4
commit
869302e302
|
@ -2477,6 +2477,21 @@ SWITCH_STANDARD_API(uuid_session_heartbeat_function)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SWITCH_STANDARD_API(uuid_flush_dtmf_function)
|
||||||
|
{
|
||||||
|
switch_core_session_t *fsession;
|
||||||
|
|
||||||
|
if (!switch_strlen_zero(cmd) && (fsession = switch_core_session_locate(cmd))) {
|
||||||
|
switch_channel_flush_dtmf(switch_core_session_get_channel(fsession));
|
||||||
|
switch_core_session_rwunlock(fsession);
|
||||||
|
stream->write_function(stream, "+OK\n");
|
||||||
|
} else {
|
||||||
|
stream->write_function(stream, "-ERR no such session\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
return SWITCH_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
#define SETVAR_SYNTAX "<uuid> <var> <value>"
|
#define SETVAR_SYNTAX "<uuid> <var> <value>"
|
||||||
SWITCH_STANDARD_API(uuid_setvar_function)
|
SWITCH_STANDARD_API(uuid_setvar_function)
|
||||||
{
|
{
|
||||||
|
@ -2815,6 +2830,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_commands_load)
|
||||||
switch_api_interface_t *commands_api_interface;
|
switch_api_interface_t *commands_api_interface;
|
||||||
*module_interface = switch_loadable_module_create_module_interface(pool, modname);
|
*module_interface = switch_loadable_module_create_module_interface(pool, modname);
|
||||||
|
|
||||||
|
SWITCH_ADD_API(commands_api_interface, "uuid_flush_dtmf", "Flush dtmf on a given uuid", uuid_flush_dtmf_function, "<uuid>");
|
||||||
SWITCH_ADD_API(commands_api_interface, "md5", "md5", md5_function, "<data>");
|
SWITCH_ADD_API(commands_api_interface, "md5", "md5", md5_function, "<data>");
|
||||||
SWITCH_ADD_API(commands_api_interface, "hupall", "hupall", hupall_api_function, "<cause> [<var> <value>]");
|
SWITCH_ADD_API(commands_api_interface, "hupall", "hupall", hupall_api_function, "<cause> [<var> <value>]");
|
||||||
SWITCH_ADD_API(commands_api_interface, "strftime_tz", "strftime_tz", strftime_tz_api_function, "<Timezone_name> [format string]");
|
SWITCH_ADD_API(commands_api_interface, "strftime_tz", "strftime_tz", strftime_tz_api_function, "<Timezone_name> [format string]");
|
||||||
|
|
|
@ -411,6 +411,11 @@ SWITCH_STANDARD_APP(check_acl_function)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SWITCH_STANDARD_APP(flush_dtmf_function)
|
||||||
|
{
|
||||||
|
switch_channel_flush_dtmf(switch_core_session_get_channel(session));
|
||||||
|
}
|
||||||
|
|
||||||
SWITCH_STANDARD_APP(transfer_function)
|
SWITCH_STANDARD_APP(transfer_function)
|
||||||
{
|
{
|
||||||
int argc;
|
int argc;
|
||||||
|
@ -2279,6 +2284,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_dptools_load)
|
||||||
SWITCH_ADD_APP(app_interface, "privacy", "Set privacy on calls", "Set caller privacy on calls.", privacy_function, "off|on|name|full|number",
|
SWITCH_ADD_APP(app_interface, "privacy", "Set privacy on calls", "Set caller privacy on calls.", privacy_function, "off|on|name|full|number",
|
||||||
SAF_SUPPORT_NOMEDIA);
|
SAF_SUPPORT_NOMEDIA);
|
||||||
|
|
||||||
|
SWITCH_ADD_APP(app_interface, "flush_dtmf", "flush any queued dtmf", "flush any queued dtmf", flush_dtmf_function, "", SAF_SUPPORT_NOMEDIA);
|
||||||
SWITCH_ADD_APP(app_interface, "hold", "Send a hold message", "Send a hold message", hold_function, HOLD_SYNTAX, SAF_SUPPORT_NOMEDIA);
|
SWITCH_ADD_APP(app_interface, "hold", "Send a hold message", "Send a hold message", hold_function, HOLD_SYNTAX, SAF_SUPPORT_NOMEDIA);
|
||||||
SWITCH_ADD_APP(app_interface, "unhold", "Send a un-hold message", "Send a un-hold message", unhold_function, UNHOLD_SYNTAX, SAF_SUPPORT_NOMEDIA);
|
SWITCH_ADD_APP(app_interface, "unhold", "Send a un-hold message", "Send a un-hold message", unhold_function, UNHOLD_SYNTAX, SAF_SUPPORT_NOMEDIA);
|
||||||
SWITCH_ADD_APP(app_interface, "transfer", "Transfer a channel", TRANSFER_LONG_DESC, transfer_function, "<exten> [<dialplan> <context>]",
|
SWITCH_ADD_APP(app_interface, "transfer", "Transfer a channel", TRANSFER_LONG_DESC, transfer_function, "<exten> [<dialplan> <context>]",
|
||||||
|
|
Loading…
Reference in New Issue