[asterisk-dev] LUA in Asterisk. was [svn-commits] tilghman: trunk r88250 - in /trunk: ./ build_tools/ configs/ include/asterisk...

critch critch at basesys.com
Sat Nov 3 21:20:12 CDT 2007


On Sun, 2007-11-04 at 00:30 +0200, Tzafrir Cohen wrote:
> I looked at the added code and wondered how exactly it's supposed to
> work. Or more specifically: when is code evaluated.
> 
> Does Asterisk include a lua interpreter?
> 
> It seems that lua needs to be used at dialplan loading time using #exec .
> Are there any plans of making the lua support include the "compiler" as
> well (like the current AEL code does)?
> 
> Can anybody spare a few words on why lua was used? I'm generally not
> well-familiar with it so I wonder where it may be much more useful that
> conventional Asterisk dialplan (and AEL) and also what are its
> limitations and its overhead.

While I can't speak to all of your questions, I know lua is used in some
embedded devices. While I haven't coded in it, the linux setop box I
have, Nueros OSD, uses lua for all it's scripting. I'm assuming it is
low enough overhead then for using on embedded devices that asterisk
might run on.

My only real concern is this, how will errors be handled? if you write a
dialplan in a interpreted language and have say a syntax error, should
asterisk die? Also with more and more complex dialplan logic being built
in, this smells a lot like the mod_perl and similar for apache.
Basically a long running app that runs in the same process space. I
believe we need to look into how these apps controlling the dialplan are
going to behave in a multithreaded environment. Most programmers who use
scripting languages are used to only dealing with a single thread and
not worrying so much about garbage collection.  
-- 
critch <critch at basesys.com>




More information about the asterisk-dev mailing list