[asterisk-dev] AEL and switch breaks ${EXTEN}, bug in AEL compiler?

Klaus Darilion klaus.mailinglists at pernau.at
Thu Feb 5 06:18:06 CST 2009


Hi!

I use Asterisk 1.4.23. I have macro which uses ${MACRO_EXTEN} to access 
the original dialed extension. The problem arises when I use this macro 
in an AEL context which uses switch() conditions:

Please see the attached context (as attachment to avoid line wrapping in 
the email).

The switch happens in priority 13:
          13. Goto(sw-445-${X-PROP-CLIPNOSCREEN}|10)    [pbx_ael]

it jumps to extension sw-445-2. From there it jumps after the switch() 
construct.
   'sw-445-2' =>     10. Goto(_[+1-9].|14)

Here I wonder why it uses the pattern _[+1-9]. instead of the originally 
dialed number (which is stored in ~~EXTEN~~).

Then it calls my macro in

        20. Macro(blacklistMakro)


Here this macro uses ${MACRO_EXTEN} which does not work as 
${MACRO_EXTEN} contains _[+1-9]. instead of the originally dialed number.


Of course I could work around it by calling the macro with a parameter 
to signal the extensions, but IMO the macro should work from an AEL 
context as from a normal context.

Maybe it is a bug in the AEL compiler when jumping out of the switch 
construct.

regards
klaus
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: context.txt
Url: http://lists.digium.com/pipermail/asterisk-dev/attachments/20090205/bc53a776/attachment-0001.txt 


More information about the asterisk-dev mailing list