aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/app_dial.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/apps/app_dial.c b/apps/app_dial.c
index ca3c45a22..123f8f2ed 100644
--- a/apps/app_dial.c
+++ b/apps/app_dial.c
@@ -719,6 +719,9 @@ static void do_forward(struct chanlist *o,
const char *forward_context;
ast_channel_lock(c);
forward_context = pbx_builtin_getvar_helper(c, "FORWARD_CONTEXT");
+ if (ast_strlen_zero(forward_context)) {
+ forward_context = NULL;
+ }
snprintf(tmpchan, sizeof(tmpchan), "%s@%s", c->call_forward, forward_context ? forward_context : c->context);
ast_channel_unlock(c);
stuff = tmpchan;