[asterisk-users] LCR in Asterisk

Alex Balashov abalashov at evaristesys.com
Wed Feb 13 09:57:59 CST 2008


Tilghman Lesher wrote:

> Uh, why not?  You can do LCR quite easily in the dialplan, by using func_odbc
> for each of the provider lookups, then use SORT() to get the lowest cost.
> It's quite easy, and you do not need to resort to AGI.

You can do almost anything in the dial plan with enough spiritual 
commitment in about the same way that you can do just about anything you 
need to do with a bash script, as opposed to Perl, Python, or any 
toolkits or frameworks.

It's not syntactically terse, balloons quickly in semantic complexity, 
is objectively less efficient as the dial plan *is not a programming 
language* (despite having variables, control structures and other things 
characteristic of an execution environment of such), and otherwise 
unnecessarily complicated.  In implementing and extending the logic 
going forward (beyond naive "lookups") in accordance with evolving 
requirements in the business rules, you will find that you run into the 
limits of the algorithmic complexity that the dial plan can provide, and 
that whatever the approach, it's overly obfuscated.  The dial plan 
limits meaningful modularisation and functional decomposition that is 
available with outboard runtime environments.

So, it's not that you couldn't - it's that you shouldn't.

-- 
Alex Balashov
Evariste Systems
Web    : http://www.evaristesys.com/
Tel    : (+1) (678) 954-0670
Direct : (+1) (678) 954-0671
Mobile : (+1) (706) 338-8599



More information about the asterisk-users mailing list