[asterisk-dev] AEL, GoSub and DIALPLAN_EXISTS() do not like each other!
Kirill Katsnelson
kkm at adaptiveai.com
Wed Feb 2 05:06:59 CST 2011
AEL does not offer this feature of .conf scripts.
Practical example. We are using many customer "applications". An
application name is also a queue name, among a few other things. Also,
there is an optional per-customer set-up macro, invoked like this:
if (${DIALPLAN_EXISTS("setup-${CUSTAPP}",s,1)}) {
GoSub(setup-${CUSTAPP},s,1);
}
Now, GoSub() causes a warning when compiling AEL file. Something we
could live up to now. But the use of `s' here is relying on undocumented
behavior of AEL.
So, between 1.8.1.1 and 1.8.3.rc2 it changed. Macros are no longer using
the `s' extension as their entry point, rather `~~s~~'. That seems like
a completely internal affair between AEL compiler and the dialplan, but
thinking along these lines means there is no such an optional gosub
feature in AEL at all.
Or I can test for both `s' and `~~s~~' in the script, to maintain the
hack compatible both with 1.8.1 and 1.8.3, but obviously I do not like
that either.
There should be a clean and documented way of doing exactly that. Going
AEL should not mean self-limiting to fewer features of Asterisk.
-kkm
More information about the asterisk-dev
mailing list