switch_channel_set_variable(channel, SWITCH_SIGNAL_BOND_VARIABLE, NULL);
- if ((uuid = switch_channel_get_variable(channel, SWITCH_SIGNAL_BOND_VARIABLE))
- && (other_session = switch_core_session_locate(uuid))) {
+\r
+ /* If HANGUP_AFTER_BRIDGE is set to 'true', SWITCH_SIGNAL_BRIDGE_VARIABLE \r
+ * will not have a value, so we need to check SWITCH_BRIDGE_VARIABLE */\r
+\r
+ uuid = switch_channel_get_variable(channel, SWITCH_SIGNAL_BRIDGE_VARIABLE);\r
+ \r
+ if(!uuid) {\r
+ uuid = switch_channel_get_variable(channel, SWITCH_BRIDGE_VARIABLE);\r
+ }\r
+\r
+ if (uuid && (other_session = switch_core_session_locate(uuid))) {\r
switch_channel_set_variable(other_channel, SWITCH_SIGNAL_BOND_VARIABLE, NULL);
switch_core_session_rwunlock(other_session);
}
switch_channel_set_variable(channel, SWITCH_BRIDGE_VARIABLE, NULL);
switch_channel_set_variable(other_channel, SWITCH_BRIDGE_VARIABLE, NULL);
+\r
+ /* If we are transferring the CALLER out of the bridge, we do not want to hang up on them */\r
+ switch_channel_set_variable(channel, SWITCH_HANGUP_AFTER_BRIDGE_VARIABLE, "false");\r
switch_channel_hangup(other_channel, SWITCH_CAUSE_BLIND_TRANSFER);
switch_ivr_media(uuid, SMF_NONE);