]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FSCORE-331
authorAnthony Minessale <anthony.minessale@gmail.com>
Thu, 12 Mar 2009 16:47:47 +0000 (16:47 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Thu, 12 Mar 2009 16:47:47 +0000 (16:47 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12585 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_core_session.c
src/switch_ivr_originate.c

index d400e1faa3ff0661d9362923364c3864ab7ed724..69190126606c1acda86881a3a9cc43bf01fc38f3 100644 (file)
@@ -463,7 +463,7 @@ SWITCH_DECLARE(switch_call_cause_t) switch_core_session_outgoing_channel(switch_
                                }
                        }
 
-                       if (peer_profile) {
+                       if (peer_profile && !(flags & SOF_FORKED_DIAL)) {
                                if ((cloned_profile = switch_caller_profile_clone(session, peer_profile)) != 0) {
                                        switch_channel_set_originatee_caller_profile(channel, cloned_profile);
                                }
index 7f3b8346dcd6d9adc3def2620364cbbe9b617e6a..c6bca07a739a4bd70343bbb10314a0a2719a2d66 100644 (file)
@@ -2118,6 +2118,16 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_originate(switch_core_session_t *sess
        }
 
        if (*bleg) {
+               if (caller_channel && !switch_channel_get_originatee_caller_profile(caller_channel)) {
+                       switch_caller_profile_t *cloned_profile, *peer_profile = switch_channel_get_caller_profile(switch_core_session_get_channel(*bleg));
+                       
+                       if (peer_profile) {
+                               if ((cloned_profile = switch_caller_profile_clone(*bleg, peer_profile)) != 0) {
+                                       switch_channel_set_originatee_caller_profile(caller_channel, cloned_profile);
+                               }
+                       }
+               }
+
                switch_ivr_sleep(*bleg, 0, SWITCH_TRUE, NULL);
        }