diff --git a/apps/app_dial.c b/apps/app_dial.c index 2548e8e09b..249c0dcb81 100644 --- a/apps/app_dial.c +++ b/apps/app_dial.c @@ -746,6 +746,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;