]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
update
authorAnthony Minessale <anthony.minessale@gmail.com>
Wed, 12 Mar 2008 00:30:52 +0000 (00:30 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Wed, 12 Mar 2008 00:30:52 +0000 (00:30 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7871 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/applications/mod_dptools/mod_dptools.c
src/switch_ivr.c
src/switch_ivr_async.c

index da1fe6fc382532484c1e23f6ba8523bfcfa210f3..393866a679067e078f0bb3106055a486ba72dc21 100644 (file)
@@ -205,10 +205,15 @@ SWITCH_STANDARD_APP(transfer_function)
        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_STANDARD_APP(transfer_function)
                                                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]);
                        }
index 3d00d23fca5e755b9fd4e237114838682a0fbd72..0f76abffa54d3e4337910f128f51c51abdfd6376 100644 (file)
@@ -314,8 +314,9 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_parse_event(switch_core_session_t *se
                                                        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;
                                                        }
index 8c4eaad9ce0caaa403c5703f134940c0b5e1c280..4a46f2ed70adeced76eec16f0b84118bac5eb905 100644 (file)
@@ -1842,7 +1842,7 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_broadcast(const char *uuid, const cha
                        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 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_broadcast(const char *uuid, const cha
                        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;