[asterisk-users] ael context ~~s~~ in macros broke Dial() U() option in 1.6.2.17.2 and newer

Mark G Thomas Mark at Misty.com
Mon Aug 8 13:09:54 CDT 2011


Hi,

This is still broken in 1.6.2.20. Please see below.

On Fri, May 06, 2011 at 04:27:42PM +0000, Watkins, Bradley wrote:
> >From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-
> >bounces at lists.digium.com] On Behalf Of Mark G Thomas
> >Sent: Friday, May 06, 2011 12:02 PM
> >To: Asterisk Users Mailing List - Non-Commercial Discussion
> >Subject: Re: [asterisk-users] ael context ~~s~~ in macros broke Dial() U()
> >option in 1.6.2.17.2 and newer
> >
> >Hi,
> >
> >On Thu, May 05, 2011 at 05:30:04PM -0400, Paul Belanger wrote:
> >> On 11-05-05 05:14 PM, Mark G Thomas wrote:
> >> >Hi,
> >> >
> >> >I think this must be a bug introduced with 1.6.2.17.something.
> >> >
> >> >When I upgrade from asterisk-1.6.2.16.1 to asterisk-1.6.2.17.2 or
> >> >1.6.2.18, my AEL Dial() commands with the "U" options fail with the
> >following error:
> >> >
> >> >[May  3 12:05:54] ERROR[6300] app_stack.c: Attempt to reach a non-
> >existent
> >> >     destination for gosub: (Context:screen, Extension:s, Priority:1)
> >> >
> >> You might want to have a look at:
> >> https://issues.asterisk.org/view.php?id=18910
> >
> >Thanks. This is it.
> >
> >If I'm reading this right, it describes the change which broke things for me,
> >but no solution applicable to my Dial() command U flag, which is invoking my
> >AEL GoSub (Macro). Switching the Dials back to the M flag doesn't fix it
> >either.
> >
> >It sure seems to me this change to AEL has had unexpected consequences in
> >terms of breaking things in dialplans.
> >
> 
> I was under the impression that this had been fixed, although perhaps it's not yet in a release.  Is there a chance you try with the latest 1.6.2 branch from SVN?
> 
> - Brad

In AEL, Dial() with the U flag is still broken. 

Reverting to a pre-1.6.2.17.2 pval.c fixes the problem.

[Aug  8 13:36:01] ERROR[24608]: app_stack.c:402 gosub_exec: Attempt to reach a non-existent destination for gosub: (Context:screen, Extension:s, Priority:1)

My AEL dialplan segment:
--------------------------
context internals {
    102 => {
        Dial(${MARKCELL},30,tgU(screen));
        jump s at home-menu;
    };
};

macro screen() {
    Wait(0.5);
    Read(ACCEPT,followme/options,1,,1,20);
    if( "${ACCEPT}" = "1" ) {
        Background(connecting);
    } else {
        Set(GOSUB_RESULT=CONTINUE);
    };
    return;
};

Here's the dialplan it created under 1.6.2.20, but U(screen)
in Dial() tries to call screen,s which doesn't exist.
-----------------------------------------------------------
[ Context 'internals' created by 'pbx_ael' ]
  '102' =>          1. Dial(${MARKCELL},30,tgU(screen))           [pbx_ael]
                    2. Goto(home-menu,s,1)                        [pbx_ael]

[ Context 'screen' created by 'pbx_ael' ]
  '~~s~~' =>        1. Wait(0.5)                                  [pbx_ael]
                    2. Read(ACCEPT,followme/options,1,,1,20)      [pbx_ael]
                    3. GotoIf($[ "${ACCEPT}" = "1" ]?4:6)         [pbx_ael]
                    4. Background(connecting)                     [pbx_ael]
                    5. Goto(7)                                    [pbx_ael]
                    6. Set(GOSUB_RESULT=CONTINUE)                 [pbx_ael]
                    7. NoOp(Finish if_screen_25)                  [pbx_ael]
                    8. Return()                                   [pbx_ael]


This works, from an earlier version, before the pval.c change:
----------------------------------------------------------------
[ Context 'screen' created by 'pbx_ael' ]
  's' =>            1. Wait(0.5)                                  [pbx_ael]
                    2. Read(ACCEPT,followme/options,1,,1,20)      [pbx_ael]
                    3. GotoIf($[ "${ACCEPT}" = "1" ]?4:6)         [pbx_ael]
                    4. Background(connecting)                     [pbx_ael]
                    5. Goto(7)                                    [pbx_ael]
                    6. Set(GOSUB_RESULT=CONTINUE)                 [pbx_ael]
                    7. NoOp(Finish if_screen_25)                  [pbx_ael]
                    8. Return()                                   [pbx_ael]



-- 
Mark G. Thomas (Mark at Misty.com)
Web: http://mgtinternet.com/
Tel: +1-215-512-0112 US: 877-512-0112



More information about the asterisk-users mailing list