]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-5934 force_transfer_context not being honored if you happen to do an attended...
authorBrian West <brian@freeswitch.org>
Thu, 27 Feb 2014 20:10:44 +0000 (14:10 -0600)
committerBrian West <brian@freeswitch.org>
Thu, 27 Feb 2014 20:11:16 +0000 (14:11 -0600)
src/switch_ivr.c

index f0e3007f49e47a12b9d00c0f29f4eb138f063823..3090942df59742998825988ecb7f191d4f1c80b0 100644 (file)
@@ -1750,6 +1750,14 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_session_transfer(switch_core_session_
        if ((profile = switch_channel_get_caller_profile(channel))) {
                const char *var;
 
+               if (zstr(dialplan) && (var = switch_channel_get_variable(channel, "force_transfer_dialplan"))) {
+                       use_dialplan = var;
+               }
+
+               if (zstr(context) && (var = switch_channel_get_variable(channel, "force_transfer_context"))) {
+                       use_context = var;
+               }
+
                if (zstr(use_dialplan)) {
                        use_dialplan = profile->dialplan;
                        if (!zstr(use_dialplan) && !strcasecmp(use_dialplan, "inline")) {
@@ -1773,14 +1781,6 @@ SWITCH_DECLARE(switch_status_t) switch_ivr_session_transfer(switch_core_session_
                        extension = "service";
                }
 
-               if (zstr(dialplan) && (var = switch_channel_get_variable(channel, "force_transfer_dialplan"))) {
-                       use_dialplan = var;
-               }
-
-               if (zstr(context) && (var = switch_channel_get_variable(channel, "force_transfer_context"))) {
-                       use_context = var;
-               }
-
                new_profile = switch_caller_profile_clone(session, profile);
 
                new_profile->dialplan = switch_core_strdup(new_profile->pool, use_dialplan);