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

Freeswitch SVN anthm at freeswitch.org
Thu Sep 6 20:49:09 EDT 2007


Author: anthm
Date: Thu Sep  6 20:49:08 2007
New Revision: 5686

Modified:
   freeswitch/trunk/src/switch_ivr_bridge.c

Log:
tweak

Modified: freeswitch/trunk/src/switch_ivr_bridge.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr_bridge.c	(original)
+++ freeswitch/trunk/src/switch_ivr_bridge.c	Thu Sep  6 20:49:08 2007
@@ -89,9 +89,6 @@
 		}
 
 		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;
 		}
 
@@ -183,6 +180,12 @@
 		}
 	}
 
+	if (switch_channel_get_state(chan_b) >= CS_HANGUP) {	
+		if (originator && switch_channel_ready(chan_a) && !switch_channel_test_flag(chan_a, CF_ANSWERED)) {
+			switch_channel_hangup(chan_a, switch_channel_get_cause(chan_b));
+		}
+	}
+
 	msg.string_arg = data->b_uuid;
 	msg.message_id = SWITCH_MESSAGE_INDICATE_UNBRIDGE;
 	msg.from = __FILE__;



More information about the Freeswitch-svn mailing list