FSCORE-417
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15196 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
d374fcaed6
commit
93805c8a0d
|
@ -785,6 +785,7 @@ static switch_status_t signal_bridge_on_hangup(switch_core_session_t *session)
|
||||||
if (uuid && (other_session = switch_core_session_locate(uuid))) {
|
if (uuid && (other_session = switch_core_session_locate(uuid))) {
|
||||||
switch_channel_t *other_channel = switch_core_session_get_channel(other_session);
|
switch_channel_t *other_channel = switch_core_session_get_channel(other_session);
|
||||||
const char *sbv = switch_channel_get_variable(other_channel, SWITCH_SIGNAL_BRIDGE_VARIABLE);
|
const char *sbv = switch_channel_get_variable(other_channel, SWITCH_SIGNAL_BRIDGE_VARIABLE);
|
||||||
|
const char *var;
|
||||||
|
|
||||||
if (!switch_strlen_zero(sbv) && !strcmp(sbv, switch_core_session_get_uuid(session))) {
|
if (!switch_strlen_zero(sbv) && !strcmp(sbv, switch_core_session_get_uuid(session))) {
|
||||||
|
|
||||||
|
@ -792,7 +793,19 @@ static switch_status_t signal_bridge_on_hangup(switch_core_session_t *session)
|
||||||
switch_channel_set_variable(other_channel, SWITCH_BRIDGE_VARIABLE, NULL);
|
switch_channel_set_variable(other_channel, SWITCH_BRIDGE_VARIABLE, NULL);
|
||||||
|
|
||||||
if (switch_channel_up(other_channel)) {
|
if (switch_channel_up(other_channel)) {
|
||||||
switch_channel_hangup(other_channel, switch_channel_get_cause(channel));
|
|
||||||
|
if (switch_true(switch_channel_get_variable(other_channel, SWITCH_PARK_AFTER_BRIDGE_VARIABLE))) {
|
||||||
|
switch_ivr_park_session(other_session);
|
||||||
|
} else if ((var = switch_channel_get_variable(other_channel, SWITCH_TRANSFER_AFTER_BRIDGE_VARIABLE))) {
|
||||||
|
transfer_after_bridge(other_session, var);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (switch_channel_test_flag(other_channel, CF_BRIDGE_ORIGINATOR) &&
|
||||||
|
switch_true(switch_channel_get_variable(other_channel, SWITCH_HANGUP_AFTER_BRIDGE_VARIABLE))) {
|
||||||
|
switch_channel_hangup(other_channel, switch_channel_get_cause(channel));
|
||||||
|
} else {
|
||||||
|
switch_channel_set_state(other_channel, CS_EXECUTE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue