[asterisk-users] clarification on gosub, macros and AEL

Brian J. Murrell brian at interlinx.bc.ca
Tue Oct 15 10:09:14 CDT 2019


On Fri, 2019-10-11 at 14:12 -0400, Brian J. Murrell wrote:
> I'm trying to clarify my understand of gosub, macros and AEL.
> 
> My understanding is that macros using the Macro() application, which
> is
> defined in extensions.conf by:
> 
> [macro-foo]
> ...
> 
> and called in extensions.conf with
> 
> exten => _9NXXNXXXXXX.,n,Macro(fastbusy)
> 
> is deprecated in favour of Gosub().  True so far?
> 
> But then there are "macro"s defined in extensions.ael:
> 
> macro foo() { ... }
> 
> and called in extensions.ael with:
> 
> &foo(...)
> 
> These are not deprecated because they use Gosub() underneath and not
> Macro()?  Still good so far?
> 
> So if macros in extensions.ael are not deprecated because they just
> use
> Gosub() underneath them, when why, when I try to use Gosub() and
> contexts in extensions.ael directly do I get warnings like:
> 
> [Oct 11 13:50:55] WARNING[10343]: ael/pval.c:2526 check_pval_item:
> Warning: file /etc/asterisk/extensions.ael, line 552-552: application
> call to Gosub affects flow of control, and needs to be re-written
> using AEL if, while, goto, etc. keywords instead!
> 
> but not with these Gosub() implemented "macros"?

Nobody has any information or opinions on any of this?

Cheers,
b.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20191015/fb43d355/attachment.sig>


More information about the asterisk-users mailing list