mod_skinny: fix behavior of transfer when target extension falls through to voicemail - keep bridge from dropping out during that operation

This commit is contained in:
Nathan Neulinger 2014-09-09 15:58:56 -05:00
parent 151440b7e1
commit 574d19e56e
1 changed files with 13 additions and 1 deletions

View File

@ -903,6 +903,7 @@ switch_status_t skinny_session_transfer(switch_core_session_t *session, listener
const char *remote_uuid = NULL;
const char *remote_uuid2 = NULL;
switch_core_session_t *session2 = NULL;
switch_core_session_t *rsession = NULL;
private_t *tech_pvt2 = NULL;
switch_assert(session);
@ -914,6 +915,17 @@ switch_status_t skinny_session_transfer(switch_core_session_t *session, listener
local_uuid = switch_channel_get_uuid(channel);
remote_uuid = switch_channel_get_partner_uuid(channel);
if ( switch_core_session_get_partner(session, &rsession) == SWITCH_STATUS_SUCCESS )
{
switch_channel_t *rchannel = NULL;
rchannel = switch_core_session_get_channel(rsession);
skinny_log_l_msg(listener, SWITCH_LOG_INFO, "SST: setting uuid bridge continue flag on remote channel\n");
switch_channel_set_variable(rchannel, "uuid_bridge_continue_on_cancel", "true");
switch_core_session_rwunlock(rsession);
}
skinny_log_l(listener, SWITCH_LOG_INFO, "SST: local_uuid=%s remote_uuid=%s\n", local_uuid, remote_uuid);
if (tech_pvt->transfer_from_call_id) {
@ -928,7 +940,7 @@ switch_status_t skinny_session_transfer(switch_core_session_t *session, listener
skinny_log_ls(listener, session2, SWITCH_LOG_INFO, "SST: attempting ivr bridge from (%s) to (%s)\n", remote_uuid, remote_uuid2);
if (switch_ivr_uuid_bridge(remote_uuid, remote_uuid2) == SWITCH_STATUS_SUCCESS) {
if (switch_ivr_uuid_bridge(remote_uuid2, remote_uuid) == SWITCH_STATUS_SUCCESS) {
skinny_log_ls_msg(listener, session2, SWITCH_LOG_INFO, "SST: success on uuid bridge\n");
switch_channel_hangup(channel, SWITCH_CAUSE_NORMAL_CLEARING);