[asterisk-users] AEL and swap from macros to contexts

Kevin P. Fleming kpfleming at digium.com
Mon Oct 6 11:44:11 CDT 2008


Pavel Jezek wrote:

> yes, I know, but I hear on IRC, that macros will be deprecated and 
> suggestion was to move to contexts,
> personaly I would like also move away from macros, because macros have 
> some limitations, eg. variable number of arguments isn't possible with 
> classic macros,
> macros also require variable to be defined in macro definition (that is 
> needless, because I'm referecing to ARG1, ARG2 etc. inside macros)
> so I definitively agree with moving from macros to contexts, only one 
> bad thing is compiler warning, when I try to Gosub to context (as macro 
> replacement)

You are confusing AEL macros with traditional dialplan macros; they are
no longer the same thing. As of Asterisk 1.6, AEL macros are implemented
using Gosub, but this is transparent to the AEL programmer... the AEL
dialplan still calls it a 'macro'.

-- 
Kevin P. Fleming
Director of Software Technologies
Digium, Inc. - "The Genuine Asterisk Experience" (TM)



More information about the asterisk-users mailing list