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

FreeSWITCH SVN anthm at freeswitch.org
Fri Mar 13 15:01:39 PDT 2009


Author: anthm
Date: Fri Mar 13 17:01:39 2009
New Revision: 12595

Log:
avoiding sillyness

Modified:
   freeswitch/trunk/src/switch_ivr_bridge.c

Modified: freeswitch/trunk/src/switch_ivr_bridge.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr_bridge.c	(original)
+++ freeswitch/trunk/src/switch_ivr_bridge.c	Fri Mar 13 17:01:39 2009
@@ -320,6 +320,19 @@
 				continue;
 			}
 		}
+
+		if (!ans_a && !ans_b) {
+			switch_channel_t *un = ans_a ? chan_b : chan_a;
+			
+			if (switch_channel_answer(un) != SWITCH_STATUS_SUCCESS) {
+				switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s Media Establishment Failed.\n", switch_channel_get_name(un));
+				goto end_of_bridge_loop;
+			}
+			
+			if (ans_a) ans_b++; else ans_a++;
+		}
+		
+
 #ifndef SWITCH_VIDEO_IN_THREADS
 		if (switch_channel_test_flag(chan_a, CF_VIDEO) && switch_channel_test_flag(chan_b, CF_VIDEO)) {
 			/* read video from 1 channel and write it to the other */



More information about the Freeswitch-svn mailing list