]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
refactor try this Vagabond
authorAnthony Minessale <anthony.minessale@gmail.com>
Thu, 4 Feb 2010 23:52:03 +0000 (23:52 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Thu, 4 Feb 2010 23:52:03 +0000 (23:52 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16573 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_ivr_bridge.c

index 57649ccecbd63205339747950acfe9c1ca5906b0..5eefa65789d8a72a0b7c47ef296c73c178e88a13 100644 (file)
@@ -735,12 +735,6 @@ static switch_status_t uuid_bridge_on_soft_execute(switch_core_session_t *sessio
 
                switch_channel_wait_for_state(other_channel, channel, CS_RESET);
 
-               if (switch_ivr_wait_for_answer(session, other_session) != SWITCH_STATUS_SUCCESS) {
-                       switch_core_session_rwunlock(other_session);
-                       switch_channel_hangup(channel, SWITCH_CAUSE_ORIGINATOR_CANCEL);
-                       return SWITCH_STATUS_FALSE;
-               }
-
                if (switch_channel_get_state(other_channel) == CS_RESET) {
                        switch_channel_set_state(other_channel, CS_SOFT_EXECUTE);
                }
@@ -749,6 +743,11 @@ static switch_status_t uuid_bridge_on_soft_execute(switch_core_session_t *sessio
 
                switch_core_session_reset(session, SWITCH_TRUE, SWITCH_TRUE);
 
+               if (switch_ivr_wait_for_answer(session, other_session) != SWITCH_STATUS_SUCCESS) {
+                       switch_core_session_rwunlock(other_session);
+                       switch_channel_hangup(channel, SWITCH_CAUSE_ORIGINATOR_CANCEL);
+                       return SWITCH_STATUS_FALSE;
+               }
 
                ready_a = switch_channel_ready(channel);
                ready_b = switch_channel_ready(other_channel);