[asterisk-bugs] [Asterisk 0013765]: after return from child context ARG is cleared

Asterisk Bug Tracker noreply at bugs.digium.com
Wed Oct 22 15:20:59 CDT 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=13765 
====================================================================== 
Reported By:                pj
Assigned To:                murf
====================================================================== 
Project:                    Asterisk
Issue ID:                   13765
Category:                   PBX/pbx_ael
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     assigned
Asterisk Version:           SVN 
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 148373 
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             2008-10-22 15:10 CDT
Last Modified:              2008-10-22 15:20 CDT
====================================================================== 
Summary:                    after return from child context ARG is cleared
Description: 
simple ael dialplan, that ilustrates situation:
after gosub to child and return back to parent context, ARG1 value is
cleared after return back to parent context.
tested svn trunk and svn branch 1.6.0 both have this issue.


context parent {
  s => {
        Verbose(In parent before gosub to child cx arg1 has value
${ARG1});
        Gosub(child,s,1(${ARG1}));
        Verbose(In parent after gosub to child cx arg1 has value
${ARG1});
        return;
  }
}

context child {
  s => {
        Verbose(In child arg1 has value ${ARG1});
        return;
  }
}

====================================================================== 

---------------------------------------------------------------------- 
 (0094172) pj (reporter) - 2008-10-22 15:20
 http://bugs.digium.com/view.php?id=13765#c94172 
---------------------------------------------------------------------- 
also notice, that if I gosub to child without passing argument to child
context, ie. Gosub(child,s,1);
ARG1 value is retained in both parent and child.
it's correct, that ARG1 in child have value, even if no argument is passed
when gosub to child? imho, ARG1 should be empty in this case.

[Oct 22 22:25:46]     -- Executing [959 at testservices:3]
Gosub("SIP/324-b7334e18", "parent,s,1(324)") in new stack
[Oct 22 22:25:46]     -- Executing [s at parent:1]
Verbose("SIP/324-b7334e18", "In parent before gosub to child cx arg1 has
value 324") in new stack
[Oct 22 22:25:46] In parent before gosub to child cx arg1 has value 324
[Oct 22 22:25:46]     -- Executing [s at parent:2] Gosub("SIP/324-b7334e18",
"child,s,1") in new stack
[Oct 22 22:25:46]     -- Executing [s at child:1] Verbose("SIP/324-b7334e18",
"In child arg1 has value 324") in new stack
[Oct 22 22:25:46] In child arg1 has value 324
[Oct 22 22:25:46]     -- Executing [s at child:2] Return("SIP/324-b7334e18",
"") in new stack
[Oct 22 22:25:46]     -- Executing [s at parent:3]
Verbose("SIP/324-b7334e18", "In parent after gosub to child cx arg1 has
value 324") in new stack
[Oct 22 22:25:46] In parent after gosub to child cx arg1 has value 324
[Oct 22 22:25:46]     -- Executing [s at parent:4] Return("SIP/324-b7334e18",
"") in new stack 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2008-10-22 15:20 pj             Note Added: 0094172                          
======================================================================




More information about the asterisk-bugs mailing list