]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-4331 FS-4424 --resolve 2 for one sale
authorAnthony Minessale <anthm@freeswitch.org>
Thu, 19 Jul 2012 22:39:12 +0000 (17:39 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Thu, 19 Jul 2012 22:39:42 +0000 (17:39 -0500)
src/mod/applications/mod_dptools/mod_dptools.c
src/switch_ivr_originate.c

index 2aa5679b7b07ef188923ea794ae6612349107c7c..02f988f6cfb83e706e124abb965f5a42f01fae9d 100755 (executable)
@@ -3510,7 +3510,7 @@ static switch_call_cause_t pickup_outgoing_channel(switch_core_session_t *sessio
 
        tech_pvt = switch_core_session_alloc(nsession, sizeof(*tech_pvt));
        tech_pvt->key = switch_core_session_strdup(nsession, pickup);
-       switch_event_dup(&tech_pvt->vars, var_event);
+
 
        switch_core_session_set_private(nsession, tech_pvt);
        
@@ -3534,7 +3534,9 @@ static switch_call_cause_t pickup_outgoing_channel(switch_core_session_t *sessio
        pickup_add_session(nsession, pickup);
        switch_channel_set_flag(nchannel, CF_PICKUP);
        switch_channel_set_flag(nchannel, CF_NO_PRESENCE);
-       
+
+       switch_event_dup(&tech_pvt->vars, var_event);
+
        goto done;
 
   error:
index efe855b565d1ed8624cf26553e8a77aa3a220a94..9bddf694d9a86f46456400611d93f9491b3ef32f 100644 (file)
@@ -2580,6 +2580,16 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
                                        local_clobber = switch_true(lc);
                                }
 
+                               if (switch_channel_test_flag(originate_status[i].peer_channel, CF_NO_PRESENCE)) {
+                                       if (var_event) {
+                                               switch_event_del_header(var_event, "presence_id");
+                                       }
+                                       if (local_var_event) {
+                                               switch_event_del_header(local_var_event, "presence_id");
+                                       }
+                               }
+
+
                                if (local_clobber) {
                                        if (var_event) {
                                                switch_event_header_t *header;