Hello,
I am new to Asterisk, and using a small home installation. I have two outgoing SIP trunks, and Dial each one as needed in my AEL dialplan. My problem is that I have two patterns ( _[0[068]. and _[13].) that are handled in exactly the same way:
first I tried to define the steps in one pattern, and jump from one to the other
_[0[068]. =>
{
// Do stuff here
}
_[13]. =>
{
jump _[0[068].;
}
In the original extensions.conf language, you could probably GoTo a high numbered priority that used a very general wild card match. As long as the priority range didn’t overlap that used for any other patterns, there should be no conflict, even though it would match so other priority 1 patterns.
You can also do this with GoSub, and that should be the method used to replace, deprecated, macros, in the current extensions.conf.sample file. I’m not sure if there was a workaround for macro in AEL.
I’ve read that macros in AEL in implemented using gosub, but I’m not sure.
In find the original syntax nearly un: you have to repeat exten and the pattern on each line (use?), have to use gotos (ugh hard-to-read spaghetti code) … AEL is much more structured (yeah I’m a software developer).
I’ve thought about matching something like _X. and then doing all the branching / processing inside, but isn’t that kinda ugly in Asterisk?
Ok, maybe “useless” was indeed a bit strong. I do consider my dialplan to be trivial however
Thanks for the tip about CEL, I’m going to look into that then.
I’m probably simply going to use the “userfield” in the CDRs, since everything else looks like it’s working.
Why is the DST field of the CDRs read only? Now I’ll have to run an update on the DB, replacing DST by userfield… It would be so much better directly in the dataplan IMHO.