mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-27 21:54:16 +00:00
the same guy who added att xfer to asterisk was nice enough to add it to freeswitch too
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7885 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
1 parent
e76486968e
commit
dc3a65388b
10 files changed
+277
-55
No files matched your search
@@ -412,7 +412,7 @@ SWITCH_DECLARE(void) switch_core_session_run(switch_core_session_t *session)
|
||||
case CS_HANGUP: /* Deactivate and end the thread */
|
||||
{
|
||||
const char *var = switch_channel_get_variable(session->channel, SWITCH_PROCESS_CDR_VARIABLE);
|
||||
const char *hook_var = switch_channel_get_variable(session->channel, SWITCH_API_HANGUP_HOOK_VARIABLE);
|
||||
const char *hook_var;
|
||||
|
||||
if (!switch_strlen_zero(var)) {
|
||||
if (!strcasecmp(var, "a_only")) {
|
||||
@@ -431,6 +431,8 @@ SWITCH_DECLARE(void) switch_core_session_run(switch_core_session_t *session)
|
||||
STATE_MACRO(hangup, "HANGUP");
|
||||
switch_core_session_signal_unlock(session);
|
||||
|
||||
hook_var = switch_channel_get_variable(session->channel, SWITCH_API_HANGUP_HOOK_VARIABLE);
|
||||
|
||||
if (!switch_strlen_zero(hook_var)) {
|
||||
switch_stream_handle_t stream = { 0 };
|
||||
char *cmd = switch_core_session_strdup(session, hook_var);
|
||||
@@ -439,7 +441,7 @@ SWITCH_DECLARE(void) switch_core_session_run(switch_core_session_t *session)
|
||||
*arg++ = '\0';
|
||||
}
|
||||
SWITCH_STANDARD_STREAM(stream);
|
||||
switch_api_execute(cmd, arg, session, &stream);
|
||||
switch_api_execute(cmd, arg, NULL, &stream);
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Hangup Command %s(%s):\n%s\n", cmd, arg, switch_str_nil((char *) stream.data));
|
||||
switch_safe_free(stream.data);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user