Summary: | ASTERISK-05456: Local channels don't inherit _ prefixed variable | ||
Reporter: | Manuel Guesdon (mguesdon) | Labels: | |
Date Opened: | 2005-11-04 11:31:14.000-0600 | Date Closed: | 2008-01-15 15:54:59.000-0600 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Channels/chan_local |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ||
Description: | This: [TEST] exten => 104,1,NoOp exten => 104,2,Set(FEE=A) exten => 104,3,Set(_FIE=B) exten => 104,4,Set(__FUM=C) exten => 104,5,NoOp(104: FEE=${FEE}) exten => 104,6,NoOp(104: FIE=${FIE}) exten => 104,7,NoOp(104: FUM=${FUM}) exten => 104,8,dial(Local/105@TEST) exten => 105,1,NoOp(105: FEE=${FEE}) exten => 105,2,NoOp(105: FIE=${FIE}) exten => 105,3,NoOp(105: FUM=${FUM}) exten => 105,4,dial(Local/106@TEST) exten => 106,1,NoOp(106: FEE=${FEE}) exten => 106,2,NoOp(106: FIE=${FIE}) exten => 106,3,NoOp(106: FUM=${FUM}) produce: -- Executing NoOp("SIP/oxy_stdphone2-14dd", "") in new stack -- Executing Set("SIP/oxy_stdphone2-14dd", "FEE=A") in new stack -- Executing Set("SIP/oxy_stdphone2-14dd", "_FIE=B") in new stack -- Executing Set("SIP/oxy_stdphone2-14dd", "__FUM=C") in new stack -- Executing NoOp("SIP/oxy_stdphone2-14dd", "104: FEE=A") in new stack -- Executing NoOp("SIP/oxy_stdphone2-14dd", "104: FIE=B") in new stack -- Executing NoOp("SIP/oxy_stdphone2-14dd", "104: FUM=C") in new stack -- Executing Dial("SIP/oxy_stdphone2-14dd", "Local/105@TEST") in new stack -- Called 105@TEST -- Executing NoOp("Local/105@TEST-e549,2", "105: FEE=") in new stack -- Executing NoOp("Local/105@TEST-e549,2", "105: FIE=") in new stack -- Executing NoOp("Local/105@TEST-e549,2", "105: FUM=C") in new stack -- Executing Dial("Local/105@TEST-e549,2", "Local/106@TEST") in new stack -- Called 106@TEST -- Executing NoOp("Local/106@TEST-3582,2", "106: FEE=") in new stack -- Executing NoOp("Local/106@TEST-3582,2", "106: FIE=") in new stack -- Executing NoOp("Local/106@TEST-3582,2", "106: FUM=C") in new stack We can see that FIE (_FIE) is not inherited by exten 105 as it should be. As far as I can see, the reason is that there's 2 local channels created (see local_new() in chan_local.c) but I think only one of the 2 (and not the good one) inherit _ prefixed variables (see local_call()). | ||
Comments: | By: Kevin P. Fleming (kpfleming) 2005-11-07 20:08:41.000-0600 This is not fixable, as it is behaving 'by design'. The single _ prefix variable is being inherited into the channel created by app_dial, but that is not visible in the dialplan. It is _not_ inherited into the channel created by chan_local, because that is a second level of channel creation and single _ prefix variables only get inherited into a single level of channel creation. By: Kevin P. Fleming (kpfleming) 2005-11-08 15:48:11.000-0600 Mark has decided to change the behavior here, to make chan_local appear more like a single channel instead of its current two-channel appearance (even though it uses two channels internally). To that end, chan_local now _moves_ all the variables from the incoming channel to the outgoing one, rather than using the inheritance method. This should solve your problem. By: Digium Subversion (svnbot) 2008-01-15 15:54:59.000-0600 Repository: asterisk Revision: 7031 U trunk/ChangeLog U trunk/channels/chan_local.c ------------------------------------------------------------------------ r7031 | kpfleming | 2008-01-15 15:54:58 -0600 (Tue, 15 Jan 2008) | 2 lines issue ASTERISK-5456 ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=7031 |