]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix for FSCORE-34
authorMichael Jerris <mike@jerris.com>
Fri, 3 Aug 2007 16:46:21 +0000 (16:46 +0000)
committerMichael Jerris <mike@jerris.com>
Fri, 3 Aug 2007 16:46:21 +0000 (16:46 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5564 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_ivr.c

index e80ce70c87d08968f2ad0b0c6b34367e8b25bf1b..6e25ecddf0b24789bc5fc88ea0b6ce073d1ed93a 100644 (file)
@@ -890,8 +890,17 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_session_transfer(switch_core_session_
 
 
                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);
                }
@@ -906,6 +915,9 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_session_transfer(switch_core_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);