AEL Macro - Dial() - Extension ~~s~~ on display RPID

So perhaps my use of AEL Macros should not include dialing where possible. ?

The fact that it is a combination of a context with one nameless extension creates a challenge any time you need to reference the channels extension. eg: call Pickup() -

Workaround

SET(GLOBAL(PICKUPMARK)=${EXTEN:2});
Pickup(${EXTEN:2}@PICKUPMARK);

I like the concept of Sub Routine (function style) programming returning to the same line of code and continuing. So I was leaning to it over a dialplan flow of goto contexts. I can achieve the same result with “goto” anyway so it’s not a problem.

I have had plenty of sucess using AEL Dialing Macro’s for calling out SIP trunks which didn’t inherit any issues for extension as it’s different use case scenario.


Questions:

  • I’m still very curious about the AEL Dial macro example here though as i don’t think it’s actually that good for some cases (ie this post)

https://wiki.asterisk.org/wiki/display/AST/AEL+Macros

  • Nevertheless, is it best practice to use contexts and not implement macros like this for such reasons in AEL?

Comments welcome.