FS-6637 try this patch

This commit is contained in:
Anthony Minessale 2014-07-01 22:31:55 +05:00
parent 9b14633cf3
commit 5d70df9b1c
1 changed files with 9 additions and 1 deletions

View File

@ -1141,11 +1141,19 @@ static switch_status_t signal_bridge_on_hangup(switch_core_session_t *session)
} }
switch_channel_hangup(other_channel, switch_channel_get_cause(channel)); switch_channel_hangup(other_channel, switch_channel_get_cause(channel));
} else { } else {
const char *var;
if (!switch_channel_test_flag(channel, CF_ANSWERED)) { if (!switch_channel_test_flag(channel, CF_ANSWERED)) {
switch_channel_handle_cause(other_channel, switch_channel_get_cause(channel)); switch_channel_handle_cause(other_channel, switch_channel_get_cause(channel));
} }
if (switch_channel_test_flag(channel, CF_ANSWERED) &&
(var = switch_channel_get_variable(other_channel, SWITCH_TRANSFER_AFTER_BRIDGE_VARIABLE))) {
transfer_after_bridge(other_session, var);
} else {
switch_channel_set_state(other_channel, CS_EXECUTE); switch_channel_set_state(other_channel, CS_EXECUTE);
} }
}
} else { } else {
switch_channel_hangup(other_channel, switch_channel_get_cause(channel)); switch_channel_hangup(other_channel, switch_channel_get_cause(channel));
} }