diff options
author | mogorman <mogorman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-01-13 19:09:05 +0000 |
---|---|---|
committer | mogorman <mogorman@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-01-13 19:09:05 +0000 |
commit | 3615d91f38257892c656d968f4123546264969e9 (patch) | |
tree | 55c23e399e031e170b45b416d7b19bd491e8ee86 | |
parent | c68a2d2d8eeae4700c5d8aca778baebd63261010 (diff) |
Added forward context option from 5497
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@8066 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | apps/app_dial.c | 4 | ||||
-rw-r--r-- | doc/README.variables | 1 |
2 files changed, 4 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"; } diff --git a/doc/README.variables b/doc/README.variables index 32abe78d9..b98ed4fbf 100644 --- a/doc/README.variables +++ b/doc/README.variables @@ -592,6 +592,7 @@ ${PRIREDIRECTREASON} Reason for redirect on PRI, if a call was directed ${RDNIS} * Redirected Dial Number ID Service (Deprecated; use ${CALLERID(rdnis)}) ${TIMESTAMP} * Current date time in the format: YYYYMMDD-HHMMSS (Deprecated; use ${STRFTIME(${EPOCH},,%Y%m%d-%H%M%S)}) ${TRANSFER_CONTEXT} Context for transferred calls +${FORWARD_CONTEXT} Context for forwarded calls ${UNIQUEID} * Current call unique identifier Application return values |