From b0e0dd2280007a659bbcafb5322ceefa1b47bf8b Mon Sep 17 00:00:00 2001 From: Marc Olivier Chouinard Date: Fri, 8 Jul 2011 23:57:54 -0400 Subject: [PATCH] switch_channel: When in a dialplan hunt and we have a custom caller_profile, ${destination_number} and other variable kept the previous value of the original dialplan parsing. This correct this so it take the custom created caller_profile for that hunt --- src/switch_channel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/switch_channel.c b/src/switch_channel.c index 68d07a9548..f763fa2f02 100644 --- a/src/switch_channel.c +++ b/src/switch_channel.c @@ -762,7 +762,7 @@ SWITCH_DECLARE(const char *) switch_channel_get_variable_dup(switch_channel_t *c } if (!v && (!channel->variables || !(v = switch_event_get_header_idx(channel->variables, varname, idx)))) { - switch_caller_profile_t *cp = channel->caller_profile; + switch_caller_profile_t *cp = switch_channel_get_caller_profile(channel); if (cp) { if (!strncmp(varname, "aleg_", 5)) {