[asterisk-users] Why write your dialplan using Lua?

Steve Edwards asterisk.org at sedwards.com
Fri Jan 6 14:55:57 CST 2012


On Fri, 6 Jan 2012, José Pablo Méndez Soto wrote:

> I wouldn't jump to a whole different language just to have an elegant 
> script plan.

I would and probably will.

Maybe it's just me, but I look at a dialplan filled with database access,
conditional gotos and priority labels and my eyes just glaze over. Rarely 
do people write dialplans with consistent and sufficient whitespace.

The ability to express a 'program' or concept clearly (elegance is a bit 
more subjective) is IMO one of the attributes that 'separates the men from 
the boys' as far as programmers are concerned.

If you place any value in the old axiom that 80% of a program's life cycle 
cost is in maintenance, anything that eases "the next guy's" burden is a 
win.

Even though I am usually 'the next guy' on my own code, being able to 
quickly see what was intended a couple of years ago and make changes 
without destroying the original flow is a big win.

Being able to use if, while, switch, etc. allows me to clearly express 
myself. I'm looking forward to see what Lua brings to the party.

-- 
Thanks in advance,
-------------------------------------------------------------------------
Steve Edwards       sedwards at sedwards.com      Voice: +1-760-468-3867 PST
Newline                                              Fax: +1-760-731-3000


More information about the asterisk-users mailing list