]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
more refactor
authorAnthony Minessale <anthony.minessale@gmail.com>
Thu, 28 Jan 2010 18:46:47 +0000 (18:46 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Thu, 28 Jan 2010 18:46:47 +0000 (18:46 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16533 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_ivr.c

index 69c6c4017e1f534eb371ca529dbd9ba5b97fb363..da35ba148886e1ec66ff87ee5597b3ff616a589d 100644 (file)
@@ -1276,6 +1276,9 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_nomedia(const char *uuid, switch_medi
                                switch_channel_set_state(other_channel, CS_PARK);
                                switch_channel_wait_for_state(other_channel, channel, CS_PARK);
                                switch_core_session_receive_message(other_session, &msg);
+                               switch_channel_wait_for_flag(other_channel, CF_REQ_MEDIA, SWITCH_FALSE, 10000, NULL);
+                               switch_channel_wait_for_flag(other_channel, CF_MEDIA_ACK, SWITCH_TRUE, 10000, NULL);
+                               switch_channel_wait_for_flag(other_channel, CF_MEDIA_SET, SWITCH_TRUE, 10000, NULL);
                        }
                        
                        switch_core_session_receive_message(session, &msg);
@@ -1283,6 +1286,9 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_nomedia(const char *uuid, switch_medi
                        if (!switch_core_session_in_thread(session)) {
                                switch_channel_set_state(channel, CS_PARK);
                                switch_channel_wait_for_state(channel, channel, CS_PARK);
+                               switch_channel_wait_for_flag(channel, CF_REQ_MEDIA, SWITCH_FALSE, 10000, NULL);
+                               switch_channel_wait_for_flag(channel, CF_MEDIA_ACK, SWITCH_TRUE, 10000, NULL);
+                               switch_channel_wait_for_flag(channel, CF_MEDIA_SET, SWITCH_TRUE, 10000, NULL);
                        }
                        
                        if (other_channel) {