diff options
author | Matt O'Gorman <mogorman@digium.com> | 2006-01-13 19:09:05 +0000 |
---|---|---|
committer | Matt O'Gorman <mogorman@digium.com> | 2006-01-13 19:09:05 +0000 |
commit | 169eeb859928ff22a953eac073ba00f2c7877895 (patch) | |
tree | 55c23e399e031e170b45b416d7b19bd491e8ee86 /apps/app_dial.c | |
parent | 55c8fc92a92d0c105e8b09df178ef01421d49152 (diff) |
Added forward context option from 5497
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@8066 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_dial.c')
-rw-r--r-- | apps/app_dial.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/app_dial.c b/apps/app_dial.c index e6571c9ef..cee81e07e 100644 --- a/apps/app_dial.c +++ b/apps/app_dial.c @@ -449,13 +449,15 @@ static struct ast_channel *wait_for_answer(struct ast_channel *in, struct localu char tmpchan[256]; char *stuff; char *tech; + char *forward_context; ast_copy_string(tmpchan, o->chan->call_forward, sizeof(tmpchan)); if ((stuff = strchr(tmpchan, '/'))) { *stuff = '\0'; stuff++; tech = tmpchan; } else { - snprintf(tmpchan, sizeof(tmpchan), "%s@%s", o->chan->call_forward, o->chan->context); + forward_context = pbx_builtin_getvar_helper(o->chan, "FORWARD_CONTEXT"); + snprintf(tmpchan, sizeof(tmpchan), "%s@%s", o->chan->call_forward, forward_context ? forward_context : o->chan->context); stuff = tmpchan; tech = "Local"; } |