From 293516be59f2495a0517f8297a337a2876786cc4 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Tue, 10 Jul 2012 22:44:11 -0500 Subject: [PATCH] FS-4370 --resolve --- src/switch_channel.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/switch_channel.c b/src/switch_channel.c index 8c36f64fe7..99a4cc6121 100644 --- a/src/switch_channel.c +++ b/src/switch_channel.c @@ -3577,7 +3577,9 @@ SWITCH_DECLARE(char *) switch_channel_expand_variables_check(switch_channel_t *c idx = atoi(ptr); } - if (vtype == 3 || (sub_val = (char *) switch_channel_get_variable_dup(channel, vname, SWITCH_TRUE, idx))) { + if (!sub_val) sub_val = vname; + + if ((sub_val = (char *) switch_channel_get_variable_dup(channel, vname, SWITCH_TRUE, idx))) { if (var_list && !switch_event_check_permission_list(var_list, vname)) { sub_val = "INVALID"; }