]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
make the impossible possible
authorAnthony Minessale <anthony.minessale@gmail.com>
Thu, 15 May 2008 21:36:32 +0000 (21:36 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Thu, 15 May 2008 21:36:32 +0000 (21:36 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@8425 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/applications/mod_dptools/mod_dptools.c
src/switch_ivr_bridge.c

index 22cfe1140af24134e206d9922e818887c4a60369..b8e296d41c3be2ac261873e88121d349bcba5207 100644 (file)
@@ -1404,19 +1404,24 @@ SWITCH_STANDARD_APP(att_xfer_function)
        switch_channel_set_flag(channel, CF_INNER_BRIDGE);
        
        switch_ivr_multi_threaded_bridge(session, peer_session, xfer_on_dtmf, peer_session, NULL);
-       
+
+       switch_channel_clear_flag(peer_channel, CF_INNER_BRIDGE);
+       switch_channel_clear_flag(channel, CF_INNER_BRIDGE);
+
        if (bond) {
                switch_core_session_t *b_session;
                char buf[128] = "";
 
-               if ((b_session = switch_core_session_locate(bond))) {
+               if (!switch_channel_ready(channel)) {
+                       switch_ivr_uuid_bridge(switch_core_session_get_uuid(peer_session), bond);
+               } else if ((b_session = switch_core_session_locate(bond))) {
                        switch_channel_t *b_channel = switch_core_session_get_channel(b_session);
                        switch_snprintf(buf, sizeof(buf), "%s %s", switch_core_session_get_uuid(peer_session), switch_core_session_get_uuid(session));
                        switch_channel_set_variable(b_channel, "xfer_uuids", buf);
 
                        switch_snprintf(buf, sizeof(buf), "%s %s", switch_core_session_get_uuid(peer_session), bond);
                        switch_channel_set_variable(channel, "xfer_uuids", buf);
-                       
+
                        switch_core_event_hook_add_state_change(session, hanguphook);
                        switch_core_event_hook_add_state_change(b_session, hanguphook);
 
index 1aecd37478e7569882235780771ab3ca33cd31ec..d57693c4455a560a19f53709391859fa34b3590f 100644 (file)
@@ -369,8 +369,8 @@ static switch_status_t audio_bridge_on_exchange_media(switch_core_session_t *ses
        switch_channel_clear_state_handler(channel, &audio_bridge_peer_state_handlers);
 
        state = switch_channel_get_state(channel);
-
-       if (!switch_channel_test_flag(channel, CF_TRANSFER) && state != CS_PARK && state != CS_ROUTING) {
+       
+       if (!switch_channel_test_flag(channel, CF_TRANSFER) && state != CS_PARK && state != CS_ROUTING && !switch_channel_test_flag(channel, CF_INNER_BRIDGE)) {
                switch_channel_hangup(channel, SWITCH_CAUSE_NORMAL_CLEARING);
        }