From 6b1490ae1129abcbb0bf79ee4f87901c92ecac44 Mon Sep 17 00:00:00 2001 From: seanbright Date: Sat, 30 May 2009 02:46:41 +0000 Subject: Treat an empty FORWARD_CONTEXT the same way we treat a missing one. (closes issue #15056) Reported by: p_lindheimer Patches: 05292009_bug15056.diff uploaded by seanbright (license 71) Tested by: p_lindheimer git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@198251 f38db490-d61c-443f-a65b-d21fe96a405b --- apps/app_dial.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'apps/app_dial.c') diff --git a/apps/app_dial.c b/apps/app_dial.c index f0907bd4d..c8cb3a37d 100644 --- a/apps/app_dial.c +++ b/apps/app_dial.c @@ -503,6 +503,9 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, struct dial_l tech = tmpchan; } else { const char *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); stuff = tmpchan; tech = "Local"; -- cgit v1.2.3