mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-13 13:07:06 +00:00
tweak to confirm blind transfer patch
This commit is contained in:
1 parent
d82a38dfd6
commit
f106c18f51
4 files changed
+32
-18
No files matched your search
@@ -3501,6 +3501,31 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_kill_uuid(const char *uuid, switch_ca
|
||||
}
|
||||
}
|
||||
|
||||
SWITCH_DECLARE(switch_status_t) switch_ivr_blind_transfer_ack(switch_core_session_t *session, switch_bool_t success)
|
||||
{
|
||||
switch_channel_t *channel = switch_core_session_get_channel(session);
|
||||
switch_status_t status = SWITCH_STATUS_FALSE;
|
||||
|
||||
if (switch_channel_test_flag(channel, CF_CONFIRM_BLIND_TRANSFER)) {
|
||||
switch_core_session_t *other_session;
|
||||
const char *uuid = switch_channel_get_variable(channel, "blind_transfer_uuid");
|
||||
|
||||
switch_channel_clear_flag(channel, CF_CONFIRM_BLIND_TRANSFER);
|
||||
|
||||
if (!zstr(uuid) && (other_session = switch_core_session_locate(uuid))) {
|
||||
switch_core_session_message_t msg = { 0 };
|
||||
msg.message_id = SWITCH_MESSAGE_INDICATE_BLIND_TRANSFER_RESPONSE;
|
||||
msg.from = __FILE__;
|
||||
msg.numeric_arg = success;
|
||||
switch_core_session_receive_message(other_session, &msg);
|
||||
switch_core_session_rwunlock(other_session);
|
||||
status = SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
return status;
|
||||
|
||||
}
|
||||
|
||||
/* For Emacs:
|
||||
* Local Variables:
|
||||
|
||||
Reference in new issue
Block a user