[asterisk-dev] [Code Review] Create STACK_PEEK to view calling context, extension, and priority

Tilghman Lesher reviewboard at asterisk.org
Sun Mar 4 03:49:49 CST 2012


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/1776/#review5729
-----------------------------------------------------------



/trunk/apps/app_stack.c
<https://reviewboard.asterisk.org/r/1776/#comment10483>

    going up N frames up... ugh...



/trunk/apps/app_stack.c
<https://reviewboard.asterisk.org/r/1776/#comment10484>

    This was related to a previous bugfix and could probably be eliminated.



/trunk/apps/app_stack.c
<https://reviewboard.asterisk.org/r/1776/#comment10485>

    The only reason for the suppress argument is that this was written and intended to be used in AEL.  While we normally would spew log messages when we do something silly (like call a stack function on a channel without a stack), we want to suppress those messages when the logic was generated automatically by AEL.



/trunk/apps/app_stack.c
<https://reviewboard.asterisk.org/r/1776/#comment10486>

    Now that I think it over, I can't imagine how this would be useful.  We can keep it, or it can go.  What do other reviewers think of this argument?



/trunk/apps/app_stack.c
<https://reviewboard.asterisk.org/r/1776/#comment10487>

    I've modified the load order on this, so that it's loaded prior to pbx_ael, because the bubble code depends upon this function existing at configuration-parse time.



/trunk/funcs/func_dialplan.c
<https://reviewboard.asterisk.org/r/1776/#comment10488>

    Similarly, the DIALPLAN_EXISTS function needs to be registered prior to the load time of pbx_ael.



/trunk/pbx/pbx_ael.c
<https://reviewboard.asterisk.org/r/1776/#comment10489>

    Oops, this change should probably be deleted, as it relates to another issue entirely.


- Tilghman


On March 4, 2012, 3:38 a.m., Tilghman Lesher wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1776/
> -----------------------------------------------------------
> 
> (Updated March 4, 2012, 3:38 a.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Summary
> -------
> 
> The issue in question wants variables similar to how Macro worked, which presented variables in the dialplan to denote the calling context, extension, and priority.  This might be similarly set by AEL, except that AEL doesn't have the information to pass at the right time.  It has the information before the call to Gosub is made, but it needs to be passed into the Gosub, so it can be saved on the stack (and thus correctly disappear, restoring previous values, when Return is executed.  Thus, STACK_PEEK was born, with the intention of being able to mimic features in 1.4's AEL that are not present anymore.
> 
> Whether this goes into a version of Asterisk earlier than 11 is a case for the bug reporter to make.
> 
> 
> This addresses bug ASTERISK-19336.
>     https://issues.asterisk.org/jira/browse/ASTERISK-19336
> 
> 
> Diffs
> -----
> 
>   /trunk/utils/ael_main.c 358080 
>   /trunk/utils/conf2ael.c 358080 
>   /trunk/tests/test_gosub.c 358080 
>   /trunk/res/ael/pval.c 358080 
>   /trunk/pbx/pbx_ael.c 358080 
>   /trunk/funcs/func_dialplan.c 358080 
>   /trunk/apps/app_stack.c 358080 
> 
> Diff: https://reviewboard.asterisk.org/r/1776/diff
> 
> 
> Testing
> -------
> 
> Added test cases to test_gosub, in the process discovering another bug that has since been fixed.  Works as designed.
> 
> 
> Thanks,
> 
> Tilghman
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20120304/673e7b54/attachment-0001.htm>


More information about the asterisk-dev mailing list