mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-11 03:57:14 +00:00
add preprocess framework for agc ec etc, ALPHA, needs work
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@14960 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
1 parent
f3b33b9521
commit
113c45bf4b
4 files changed
+324
No files matched your search
@@ -1529,6 +1529,29 @@ SWITCH_STANDARD_API(kill_function)
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
#define PREPROCESS_SYNTAX "<>"
|
||||
SWITCH_STANDARD_API(preprocess_function)
|
||||
{
|
||||
switch_core_session_t *ksession = NULL;
|
||||
char *mycmd = NULL;
|
||||
|
||||
if (switch_strlen_zero(cmd)) {
|
||||
stream->write_function(stream, "-USAGE: %s\n", KILL_SYNTAX);
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
if (!(ksession = switch_core_session_locate(cmd))) {
|
||||
stream->write_function(stream, "-ERR No Such Channel!\n");
|
||||
} else {
|
||||
switch_ivr_preprocess_session(session, (char *)cmd);
|
||||
switch_core_session_rwunlock(ksession);
|
||||
stream->write_function(stream, "+OK\n");
|
||||
}
|
||||
|
||||
switch_safe_free(mycmd);
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
#define PARK_SYNTAX "<uuid>"
|
||||
SWITCH_STANDARD_API(park_function)
|
||||
{
|
||||
@@ -3580,6 +3603,7 @@ SWITCH_MODULE_LOAD_FUNCTION(mod_commands_load)
|
||||
SWITCH_ADD_API(commands_api_interface, "originate", "Originate a Call", originate_function, ORIGINATE_SYNTAX);
|
||||
SWITCH_ADD_API(commands_api_interface, "tone_detect", "Start Tone Detection on a channel", tone_detect_session_function, TONE_DETECT_SYNTAX);
|
||||
SWITCH_ADD_API(commands_api_interface, "uuid_kill", "Kill Channel", kill_function, KILL_SYNTAX);
|
||||
SWITCH_ADD_API(commands_api_interface, "uuid_preprocess", "Pre-process Channel", preprocess_function, PREPROCESS_SYNTAX);
|
||||
SWITCH_ADD_API(commands_api_interface, "uuid_park", "Park Channel", park_function, PARK_SYNTAX);
|
||||
SWITCH_ADD_API(commands_api_interface, "reloadacl", "Reload ACL", reload_acl_function, "[reloadxml]");
|
||||
switch_console_set_complete("add reloadacl reloadxml");
|
||||
|
||||
Reference in new issue
Block a user