Revision
16533
Author
anthm
Date
2010-01-28 12:46:47 -0600 (Thu, 28 Jan 2010)

Log Message

more refactor

Modified Paths

Diff

Modified: freeswitch/trunk/src/switch_ivr.c (16532 => 16533)


--- freeswitch/trunk/src/switch_ivr.c	2010-01-28 18:21:27 UTC (rev 16532)
+++ freeswitch/trunk/src/switch_ivr.c	2010-01-28 18:46:47 UTC (rev 16533)
@@ -1276,6 +1276,9 @@
 				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 @@
 			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) {