[asterisk-commits] file: branch 1.4 r54884 - /branches/1.4/apps/app_dial.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Fri Feb 16 10:02:36 MST 2007


Author: file
Date: Fri Feb 16 11:02:35 2007
New Revision: 54884

URL: http://svn.digium.com/view/asterisk?view=rev&rev=54884
Log:
Allow directed pickup to pick up the real context instead of the macro context if a Macro is used. (issue #8984 reported by jamesb63)

Modified:
    branches/1.4/apps/app_dial.c

Modified: branches/1.4/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/apps/app_dial.c?view=diff&rev=54884&r1=54883&r2=54884
==============================================================================
--- branches/1.4/apps/app_dial.c (original)
+++ branches/1.4/apps/app_dial.c Fri Feb 16 11:02:35 2007
@@ -1185,7 +1185,10 @@
 			ast_app_group_set_channel(tmp->chan, outbound_group);
 
 		/* Inherit context and extension */
-		ast_copy_string(tmp->chan->dialcontext, chan->context, sizeof(tmp->chan->dialcontext));
+		if (!ast_strlen_zero(chan->macrocontext))
+			ast_copy_string(tmp->chan->dialcontext, chan->macrocontext, sizeof(tmp->chan->dialcontext));
+		else
+			ast_copy_string(tmp->chan->dialcontext, chan->context, sizeof(tmp->chan->dialcontext));
 		ast_copy_string(tmp->chan->exten, chan->exten, sizeof(tmp->chan->exten));
 
 		/* Place the call, but don't wait on the answer */



More information about the asterisk-commits mailing list