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

Freeswitch SVN anthm at freeswitch.org
Thu Aug 30 11:38:21 EDT 2007


Author: anthm
Date: Thu Aug 30 11:38:21 2007
New Revision: 5682

Modified:
   freeswitch/trunk/src/switch_ivr_bridge.c

Log:
try to pass cause code on calls ended during early media

Modified: freeswitch/trunk/src/switch_ivr_bridge.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr_bridge.c	(original)
+++ freeswitch/trunk/src/switch_ivr_bridge.c	Thu Aug 30 11:38:21 2007
@@ -84,12 +84,14 @@
 		switch_event_t *event;
 		loop_count++;
 
-		/* if you really want to make sure it's not ready, test it twice because it might be just a break */
-		if (!switch_channel_ready(chan_a) && !switch_channel_ready(chan_a)) {
+		if (!switch_channel_ready(chan_a)) {
 			break;
 		}
 
 		if ((b_state = switch_channel_get_state(chan_b)) >= CS_HANGUP) {
+			if (originator && !ans_a && !ans_b) {
+				switch_channel_hangup(chan_a, switch_channel_get_cause(chan_b));
+			}
 			break;
 		}
 
@@ -163,8 +165,7 @@
 				continue;
 			}
 		}
-
-
+		
 		/* read audio from 1 channel and write it to the other */
 		status = switch_core_session_read_frame(session_a, &read_frame, -1, stream_id);
 



More information about the Freeswitch-svn mailing list