]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-3555 --resolve
authorAnthony Minessale <anthm@freeswitch.org>
Thu, 15 Sep 2011 16:42:55 +0000 (11:42 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Thu, 15 Sep 2011 16:42:55 +0000 (11:42 -0500)
src/switch_ivr_originate.c

index 3addeb3c4603c34d6096179d8f279ab6e31a9ce4..1bf38b4775443070ea2b7db60c398880c1d5c64c 100644 (file)
@@ -1050,6 +1050,15 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_wait_for_answer(switch_core_session_t
                status = SWITCH_STATUS_FALSE;
        }
 
+       if (switch_channel_test_flag(caller_channel, CF_XFER_ZOMBIE)) {
+               switch_channel_state_t peer_state = switch_channel_get_state(peer_channel);
+
+               while (switch_channel_ready(peer_channel) && switch_channel_get_state(peer_channel) == peer_state) {
+                       switch_channel_ready(caller_channel);
+                       switch_yield(20000);
+               }
+       }
+
        if (caller_channel && !switch_channel_up(caller_channel)) {
                status = SWITCH_STATUS_FALSE;
        }