]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
ivr_enterprise_originate: Fix export of variable from the originator channel to the...
authorMarc Olivier Chouinard <mochouinard@moctel.com>
Fri, 12 Nov 2010 01:21:35 +0000 (20:21 -0500)
committerMarc Olivier Chouinard <mochouinard@moctel.com>
Fri, 12 Nov 2010 01:21:35 +0000 (20:21 -0500)
src/switch_ivr_originate.c

index 007d7d9fc189bf1632e9b0610ed8c0d4ac98ba90..da76cf6cbc6fe54972d79477bec2801b0ca9a461 100644 (file)
@@ -1391,6 +1391,14 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_enterprise_originate(switch_core_sess
                data++;
        }
 
+       if (session) {
+               switch_caller_profile_t *cpp = NULL;
+               channel = switch_core_session_get_channel(session);
+               if ((cpp = switch_channel_get_caller_profile(channel))) {
+                       cp = switch_caller_profile_dup(pool, cpp);
+               }
+       }
+
        if (ovars) {
                var_event = ovars;
        } else {
@@ -1436,14 +1444,6 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_enterprise_originate(switch_core_sess
                switch_goto_status(SWITCH_STATUS_FALSE, end);
        }
 
-       if (session) {
-               switch_caller_profile_t *cpp = NULL;
-               channel = switch_core_session_get_channel(session);
-               if ((cpp = switch_channel_get_caller_profile(channel))) {
-                       cp = switch_caller_profile_dup(pool, cpp);
-               }
-       }
-
        switch_threadattr_create(&thd_attr, pool);
        switch_threadattr_stacksize_set(thd_attr, SWITCH_THREAD_STACKSIZE);