[Freeswitch-svn] [commit] r7871 - in freeswitch/trunk/src: . mod/applications/mod_dptools

Freeswitch SVN anthm at freeswitch.org
Tue Mar 11 20:30:52 EDT 2008


Author: anthm
Date: Tue Mar 11 20:30:52 2008
New Revision: 7871

Modified:
   freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c
   freeswitch/trunk/src/switch_ivr.c
   freeswitch/trunk/src/switch_ivr_async.c

Log:
update

Modified: freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c	(original)
+++ freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c	Tue Mar 11 20:30:52 2008
@@ -205,10 +205,15 @@
 	int argc;
 	char *argv[4] = { 0 };
 	char *mydata;
+	int bleg = 0, both = 0;
 
+	
 	if (!switch_strlen_zero(data) && (mydata = switch_core_session_strdup(session, data))) {
 		if ((argc = switch_separate_string(mydata, ' ', argv, (sizeof(argv) / sizeof(argv[0])))) >= 1) {
-			if (!strcasecmp(argv[0], "-bleg")) {
+			bleg = !strcasecmp(argv[0], "-bleg");
+			both = !strcasecmp(argv[0], "-both");
+
+			if (bleg || both) {
 				const char *uuid;
 				switch_channel_t *channel = switch_core_session_get_channel(session);																		
 				if ((uuid = switch_channel_get_variable(channel, SWITCH_SIGNAL_BOND_VARIABLE))) {
@@ -218,6 +223,9 @@
 						switch_core_session_rwunlock(b_session);
 					}
 				}
+				if (both) {
+					switch_ivr_session_transfer(session, argv[1], argv[2], argv[3]);
+				}
 			} else {
 				switch_ivr_session_transfer(session, argv[0], argv[1], argv[2]);
 			}

Modified: freeswitch/trunk/src/switch_ivr.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr.c	(original)
+++ freeswitch/trunk/src/switch_ivr.c	Tue Mar 11 20:30:52 2008
@@ -314,8 +314,9 @@
 							if (!(stream = switch_channel_get_variable_partner(channel, SWITCH_HOLD_MUSIC_VARIABLE))) {
 								stream = switch_channel_get_variable(channel, SWITCH_HOLD_MUSIC_VARIABLE);
 							}
+
 							if (stream) {
-								switch_ivr_broadcast(b_uuid, hold_bleg, SMF_ECHO_ALEG | SMF_LOOP);
+								switch_ivr_broadcast(b_uuid, stream, SMF_ECHO_ALEG | SMF_LOOP);
 							} else {
 								b_uuid = NULL;
 							}

Modified: freeswitch/trunk/src/switch_ivr_async.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr_async.c	(original)
+++ freeswitch/trunk/src/switch_ivr_async.c	Tue Mar 11 20:30:52 2008
@@ -1842,7 +1842,7 @@
 			if ((flags & SMF_HOLD_BLEG)) {
 				switch_event_add_header(event, SWITCH_STACK_BOTTOM, "hold-bleg", "%s", "true");
 			}
-				
+
 			switch_core_session_queue_private_event(other_session, &event);
 		}
 			
@@ -1861,6 +1861,10 @@
 			if ((flags & SMF_LOOP)) {
 				switch_event_add_header(event, SWITCH_STACK_BOTTOM, "loops", "%d", -1);
 			}
+			if ((flags & SMF_HOLD_BLEG)) {
+				switch_event_add_header(event, SWITCH_STACK_BOTTOM, "hold-bleg", "%s", "true");
+			}
+
 			switch_core_session_queue_private_event(session, &event);
 		}
 		master = session;



More information about the Freeswitch-svn mailing list