From a048d2b638b4f01b43f34c7b3b524d82d9b744e1 Mon Sep 17 00:00:00 2001 From: Brian West Date: Thu, 27 Feb 2014 14:10:44 -0600 Subject: [PATCH] FS-5934 force_transfer_context not being honored if you happen to do an attended this patch makes perfect sense. --- src/switch_ivr.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/switch_ivr.c b/src/switch_ivr.c index f0e3007f49..3090942df5 100644 --- a/src/switch_ivr.c +++ b/src/switch_ivr.c @@ -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);