[asterisk-commits] trunk - r8066 in /trunk: apps/app_dial.c doc/README.variables

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Fri Jan 13 13:09:06 CST 2006


Author: mogorman
Date: Fri Jan 13 13:09:05 2006
New Revision: 8066

URL: http://svn.digium.com/view/asterisk?rev=8066&view=rev
Log:
Added forward context option from 5497

Modified:
    trunk/apps/app_dial.c
    trunk/doc/README.variables

Modified: trunk/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_dial.c?rev=8066&r1=8065&r2=8066&view=diff
==============================================================================
--- trunk/apps/app_dial.c (original)
+++ trunk/apps/app_dial.c Fri Jan 13 13:09:05 2006
@@ -449,13 +449,15 @@
 					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";
 					}

Modified: trunk/doc/README.variables
URL: http://svn.digium.com/view/asterisk/trunk/doc/README.variables?rev=8066&r1=8065&r2=8066&view=diff
==============================================================================
--- trunk/doc/README.variables (original)
+++ trunk/doc/README.variables Fri Jan 13 13:09:05 2006
@@ -592,6 +592,7 @@
 ${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



More information about the asterisk-commits mailing list