[Freeswitch-svn] [commit] r10287 - in freeswitch/trunk/src: . include

Freeswitch SVN anthm at freeswitch.org
Fri Nov 7 11:42:37 PST 2008


Author: anthm
Date: Fri Nov  7 09:10:02 2008
New Revision: 10287

Modified:
   freeswitch/trunk/src/include/switch_types.h
   freeswitch/trunk/src/switch_ivr_bridge.c

Log:
add park_after_bridge variable

Modified: freeswitch/trunk/src/include/switch_types.h
==============================================================================
--- freeswitch/trunk/src/include/switch_types.h	(original)
+++ freeswitch/trunk/src/include/switch_types.h	Fri Nov  7 09:10:02 2008
@@ -153,6 +153,7 @@
 #define SWITCH_LOCAL_VIDEO_IP_VARIABLE "local_video_ip"
 #define SWITCH_LOCAL_VIDEO_PORT_VARIABLE "local_video_port"
 #define SWITCH_HANGUP_AFTER_BRIDGE_VARIABLE "hangup_after_bridge"
+#define SWITCH_PARK_AFTER_BRIDGE_VARIABLE "park_after_bridge"
 #define SWITCH_EXEC_AFTER_BRIDGE_APP_VARIABLE "exec_after_bridge_app"
 #define SWITCH_EXEC_AFTER_BRIDGE_ARG_VARIABLE "exec_after_bridge_arg"
 #define SWITCH_MAX_FORWARDS_VARIABLE "max_forwards"

Modified: freeswitch/trunk/src/switch_ivr_bridge.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr_bridge.c	(original)
+++ freeswitch/trunk/src/switch_ivr_bridge.c	Fri Nov  7 09:10:02 2008
@@ -939,9 +939,12 @@
 
 	if (!switch_channel_test_flag(caller_channel, CF_TRANSFER) && !a_leg->clean_exit && !inner_bridge) {
 		if ((state != CS_EXECUTE && state != CS_SOFT_EXECUTE && state != CS_PARK && state != CS_ROUTING) ||
-			(switch_channel_test_flag(peer_channel, CF_ANSWERED) && state < CS_HANGUP &&
-			 switch_true(switch_channel_get_variable(caller_channel, SWITCH_HANGUP_AFTER_BRIDGE_VARIABLE)))) {
-			switch_channel_hangup(caller_channel, switch_channel_get_cause(peer_channel));
+			(switch_channel_test_flag(peer_channel, CF_ANSWERED) && state < CS_HANGUP)) {
+			if (switch_true(switch_channel_get_variable(caller_channel, SWITCH_HANGUP_AFTER_BRIDGE_VARIABLE))) {
+				switch_channel_hangup(caller_channel, switch_channel_get_cause(peer_channel));
+			} else if (switch_true(switch_channel_get_variable(caller_channel, SWITCH_PARK_AFTER_BRIDGE_VARIABLE))) {
+				switch_ivr_park_session(session);
+			}
 		}
 	}
 



More information about the Freeswitch-svn mailing list