Brian J. Murrell
2019-Oct-11 18:12 UTC
[asterisk-users] clarification on gosub, macros and AEL
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"? 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/20191011/d9c0db4b/attachment.sig>
Brian J. Murrell
2019-Oct-15 15:09 UTC
[asterisk-users] clarification on gosub, macros and AEL
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>
>>> Nobody has any information or opinions on any of this?Personally, I don't think MACROS are going anywhere any time soon, so I have not bothered looking into a substitution. As for ael; I've never used it. Doug
Antony Stone
2019-Oct-15 16:19 UTC
[asterisk-users] clarification on gosub, macros and AEL
On Friday 11 October 2019 at 20:12:43, Brian J. Murrell wrote:> I'm trying to clarify my understand of gosub, macros and AEL.Sounds more like a question for the developers' list. Antony. -- I think broken pencils are pointless. Please reply to the list; please *don't* CC me.