[svn-commits] file: branch 1.4 r47850 - in /branches/1.4: ./ apps/ include/asterisk/

svn-commits at lists.digium.com svn-commits at lists.digium.com
Mon Nov 20 08:51:38 MST 2006


Author: file
Date: Mon Nov 20 09:51:37 2006
New Revision: 47850

URL: http://svn.digium.com/view/asterisk?view=rev&rev=47850
Log:
Use a separate variable in the channel structure to store the context that the channel was dialed from. (issue #8382 reported by jiddings)

Modified:
    branches/1.4/.cleancount
    branches/1.4/apps/app_dial.c
    branches/1.4/apps/app_directed_pickup.c
    branches/1.4/include/asterisk/channel.h

Modified: branches/1.4/.cleancount
URL: http://svn.digium.com/view/asterisk/branches/1.4/.cleancount?view=diff&rev=47850&r1=47849&r2=47850
==============================================================================
--- branches/1.4/.cleancount (original)
+++ branches/1.4/.cleancount Mon Nov 20 09:51:37 2006
@@ -1,1 +1,1 @@
-25
+26

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=47850&r1=47849&r2=47850
==============================================================================
--- branches/1.4/apps/app_dial.c (original)
+++ branches/1.4/apps/app_dial.c Mon Nov 20 09:51:37 2006
@@ -456,7 +456,7 @@
 						       OPT_CALLEE_MONITOR | OPT_CALLER_MONITOR |
 						       OPT_CALLEE_PARK | OPT_CALLER_PARK |
 						       DIAL_NOFORWARDHTML);
-					ast_copy_string(c->context, "", sizeof(c->context));
+					ast_copy_string(c->dialcontext, "", sizeof(c->dialcontext));
 					ast_copy_string(c->exten, "", sizeof(c->exten));
 				}
 				continue;
@@ -577,7 +577,7 @@
 							       OPT_CALLEE_MONITOR | OPT_CALLER_MONITOR |
 							       OPT_CALLEE_PARK | OPT_CALLER_PARK |
 							       DIAL_NOFORWARDHTML);
-						ast_copy_string(c->context, "", sizeof(c->context));
+						ast_copy_string(c->dialcontext, "", sizeof(c->dialcontext));
 						ast_copy_string(c->exten, "", sizeof(c->exten));
 						/* Setup RTP early bridge if appropriate */
 						ast_rtp_early_bridge(in, peer);
@@ -1175,7 +1175,7 @@
 			ast_app_group_set_channel(tmp->chan, outbound_group);
 
 		/* Inherit context and extension */
-		ast_copy_string(tmp->chan->context, chan->context, sizeof(tmp->chan->context));
+		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 */

Modified: branches/1.4/apps/app_directed_pickup.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/apps/app_directed_pickup.c?view=diff&rev=47850&r1=47849&r2=47850
==============================================================================
--- branches/1.4/apps/app_directed_pickup.c (original)
+++ branches/1.4/apps/app_directed_pickup.c Mon Nov 20 09:51:37 2006
@@ -97,7 +97,7 @@
 
 	while ((target = ast_channel_walk_locked(target))) {
 		if (!strcasecmp(target->exten, exten) &&
-		    !strcasecmp(target->context, context) &&
+		    !strcasecmp(target->dialcontext, context) &&
 		    can_pickup(target)) {
 			res = pickup_do(chan, target);
 			ast_channel_unlock(target);

Modified: branches/1.4/include/asterisk/channel.h
URL: http://svn.digium.com/view/asterisk/branches/1.4/include/asterisk/channel.h?view=diff&rev=47850&r1=47849&r2=47850
==============================================================================
--- branches/1.4/include/asterisk/channel.h (original)
+++ branches/1.4/include/asterisk/channel.h Mon Nov 20 09:51:37 2006
@@ -382,6 +382,7 @@
 	char macrocontext[AST_MAX_CONTEXT];		/*!< Macro: Current non-macro context. See app_macro.c */
 	char macroexten[AST_MAX_EXTENSION];		/*!< Macro: Current non-macro extension. See app_macro.c */
 	int macropriority;				/*!< Macro: Current non-macro priority. See app_macro.c */
+	char dialcontext[AST_MAX_CONTEXT];              /*!< Dial: Extension context that we were called from */
 
 	struct ast_pbx *pbx;				/*!< PBX private structure for this channel */
 	int amaflags;					/*!< Set BEFORE PBX is started to determine AMA flags */



More information about the svn-commits mailing list