[Freeswitch-svn] [commit] r3928 - freeswitch/trunk/src

Freeswitch SVN mikej at freeswitch.org
Sun Jan 7 20:55:16 EST 2007


Author: mikej
Date: Sun Jan  7 20:55:16 2007
New Revision: 3928

Modified:
   freeswitch/trunk/src/switch_ivr.c

Log:
Make sure we pass early media after the pre-answer (thanks Mike Murdock for the report and troubleshooting assistance)

Modified: freeswitch/trunk/src/switch_ivr.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr.c	(original)
+++ freeswitch/trunk/src/switch_ivr.c	Sun Jan  7 20:55:16 2007
@@ -1928,11 +1928,14 @@
 				switch_channel_answer(chan_a);
 				ans_a++;
 			} else if (!pre_b && switch_channel_test_flag(chan_b, CF_EARLY_MEDIA)) {
-				switch_channel_pre_answer(chan_a);
-				pre_b++;
+				if (switch_channel_pre_answer(chan_a) == SWITCH_STATUS_SUCCESS) {
+					pre_b++;
+				}
+			}
+			if (!pre_b) {
+				switch_yield(10000);
+				continue;
 			}
-			switch_yield(10000);
-			continue;
 		}
 
 



More information about the Freeswitch-svn mailing list