]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
update
authorAnthony Minessale <anthony.minessale@gmail.com>
Tue, 11 Dec 2007 01:05:52 +0000 (01:05 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Tue, 11 Dec 2007 01:05:52 +0000 (01:05 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6617 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/applications/mod_dptools/mod_dptools.c

index ed14c4932935374bef1c49d39594cc102928b97a..42dbbc7958cd7cc43c78b719b7b996eb8e5e200c 100644 (file)
@@ -1488,6 +1488,16 @@ static switch_call_cause_t user_outgoing_channel(switch_core_session_t *session,
                d_dest = switch_channel_expand_variables(channel, dest);
 
                if (switch_ivr_originate(session, new_session, &cause, d_dest, timelimit, NULL, NULL, NULL, NULL) == SWITCH_STATUS_SUCCESS) {
+                       const char *context;
+                       switch_caller_profile_t *cp;
+                       switch_channel_t *new_channel = switch_core_session_get_channel(*new_session);
+                       
+                       if ((context = switch_channel_get_variable(new_channel, "inbound_context"))) {
+                               if ((cp = switch_channel_get_caller_profile(new_channel))) {
+                                       cp->context = switch_core_strdup(cp->pool, context);
+                               }
+                       }
+                       
                        switch_core_session_rwunlock(*new_session);
                }