AEL #include


#1

Anyone know how to perform a #include in extensions.ael? It isn’t documented at voip-info.org/tiki-index.php … terisk+AEL

Thanks.


#2

Have you just tried it? Where you may do it inside or outside of contexts as long as the included file is written properly?


#3

MuppenMaster,

I couldn’t get #include to work with AEL in beta1. I also ran across a number of other quirks (the biggest one was that to reload an extensions.ael file, I had to recycle asterisk) that caused me to put it aside for the moment. These problems were either bugs, or the AEL feature wasn’t being used heavily enough for me to generate any useful responses to my queries on the asterisk-users list. I haven’t tried AEL yet in CVS HEAD or Beta2.

I couldn’t tell whether you were saying “yes it works” or “just try it”. I’ve noticed you posting some AEL scripts recently, which I take as a good sign. I’d really like to pick up my experimentation with AEL again, but I’m really still a newbie, so getting Asterisk dial plans working is my first priority. Those two problems in particular were showstoppers for me. I’m curious whether anyone has gotten #include to work.

Thanks,
john


#4

Tried it.

Putting the #include before a context seems to break the parser, and it complains it can’t find the following context.

Putting it inside a context causes asterisk to return an immediate 404, without logging anything, even with verbose turned on in logger.conf.

sigh Here we go again. Why is it every time I try and do anything moderately complex with Asterisk, Asterisk fails to come through?


#5

I think I’ll skip using AEL. The inability to do #includes, and the fact you have to bounce asterisk to reload precludes it from any serious use.


#6

Indeed, AEL is new and you must try things, remember we are only at RC1 of 1.2, it is not ‘released’ yet. All AEL does is parse the extensions.ael file and convert it into a standard extension concept within Asterisk, it is still the same diaplan logic internal to Asterisk. Therefore everything you may do in AEL is doable in extensions.conf, just that AEL is a bit more ‘language like’ than extensions.conf.

Therefore, there are no limitations to any of the examples provided, as they are all doable in the old extensions.conf way of dialplan management just a different approach.


#7

Em, any idea how to get #include to work then?


#8

Have not tried, may not work. Trial and error right now, as it is an RC1… And maybe not a feature planned for 1.2, not sure.


#9

Ok, so it looks like it mostly works… but doesn’t provide all the functionality prior to what was there before AEL.


#10

Asterisk extension.conf is still in place, therefore everything is in Asterisk that was there before. AEL is a new interpretor that converts a script like language into an internal extensions.conf.


#11

Grrr. Except #include doesn’t work.