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