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

This commit is contained in:
Marc Olivier Chouinard 2011-07-08 23:57:54 -04:00
parent d9bbf12963
commit b0e0dd2280
1 changed files with 1 additions and 1 deletions

View File

@ -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)) {