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

José Pablo Méndez Soto auxcri at gmail.com
Fri Jan 6 12:51:36 CST 2012


Hello,

Reading through the Wiki:

"Asterisk supports the ability to write dialplan instructions in the Lua
programming language. This method can be used as an alternative to or in
combination with extensions.conf and/or AEL. PBX lua allows users to use
the full power of lua to develop telephony applications using Asterisk"

My question is, what is the benefit of using Lua? I recently noticed that
OpenSIPS added a compatibility module to use Lua as well. However, where is
the real advantage here?

I mean, you have all these pieces in Asterisk like Lego blocks: AGI
Commands, AMI Actions, Dialplan Applications, Dialplan Functions which I
think are the ones that really limit what the PBX can do right?

What's the difference between calling them out from extensions.conf or even
from extensions.ael and calling them from extensions.lua? What else can you
do writing you dialplan in Lua? Could I maybe program N-Way calling* with
it?

Are we talking about expanding Asterisk capabilities a huge deal? Or just
performance wise during dialplan execution?

With OpenSIPS I understand its power because you may affect the SIP
behavior based on db queries performed by Lua scripts, or modify the next
message to be sent, but with Asterisk, you wouldn't be able to modify an
ongoing session through Lua based on, e.g., an incoming INVITE to establish
a new conference room, would you? Or tell Asterisk to save the
Register-CallID of an endpoint as part of the sip peer settings in memory,
like the contact ID field.

Regards,

 *José Pablo Méndez


**By N-Way calling I mean having one party on hold, calling another party,
and immediate (ad-hoc) invoke a conference bridge to join the 3 parties.
Just like Cisco phone systems do. *
 *****
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20120106/c45285d8/attachment.htm>


More information about the asterisk-users mailing list