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

FreeSWITCH SVN anthm at freeswitch.org
Mon Nov 17 12:13:13 PST 2008


Author: anthm
Date: Mon Nov 17 15:13:12 2008
New Revision: 10429

Log:
fix linksys transfers

Modified:
   freeswitch/trunk/src/switch_ivr_bridge.c
   freeswitch/trunk/src/switch_ivr_originate.c

Modified: freeswitch/trunk/src/switch_ivr_bridge.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr_bridge.c	(original)
+++ freeswitch/trunk/src/switch_ivr_bridge.c	Mon Nov 17 15:13:12 2008
@@ -527,6 +527,7 @@
 	switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s CUSTOM RESET\n", switch_channel_get_name(channel));
 
 	switch_channel_clear_flag(channel, CF_TRANSFER);
+	switch_channel_clear_flag(channel, CF_ORIGINATING);
 
 	if (switch_channel_test_flag(channel, CF_ORIGINATOR)) {
 		switch_channel_set_state(channel, CS_SOFT_EXECUTE);

Modified: freeswitch/trunk/src/switch_ivr_originate.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr_originate.c	(original)
+++ freeswitch/trunk/src/switch_ivr_originate.c	Mon Nov 17 15:13:12 2008
@@ -1645,16 +1645,18 @@
 					continue;
 				}
 				
-				switch_channel_clear_flag(peer_channels[i], CF_ORIGINATING);
 				if (status == SWITCH_STATUS_SUCCESS) { 
+					switch_channel_clear_flag(peer_channels[i], CF_ORIGINATING);
 					if (bleg && *bleg && *bleg == peer_sessions[i]) {
 						continue;
 					}
-				} else if ((state=switch_channel_get_state(peer_channels[i])) < CS_HANGUP) {
-					if (!(state == CS_RESET || switch_channel_test_flag(peer_channels[i], CF_TRANSFER))) {
+				} else if ((state=switch_channel_get_state(peer_channels[i])) < CS_HANGUP && switch_channel_test_flag(peer_channels[i], CF_ORIGINATING)) {
+					if (!(state == CS_RESET || switch_channel_test_flag(peer_channels[i], CF_TRANSFER) || 
+						  switch_channel_test_flag(peer_channels[i], CF_BRIDGED))) {
 						switch_channel_hangup(peer_channels[i], *cause);
 					}
 				}
+				switch_channel_clear_flag(peer_channels[i], CF_ORIGINATING);
 
 				switch_core_session_rwunlock(peer_sessions[i]);
 			}



More information about the Freeswitch-svn mailing list