I’m hoping someone can give me guidance on how to specify complementary contexts and extensions in both extensions.conf and extensions.lua for the same running instance of Asterisk; or, to put it a bit differently, I’d like to prove that the following statement from (wiki.asterisk.org/wiki/display/A … figuration) means what I think it means:
[quote]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.
We’re running Asterisk 220.127.116.11 on Ubuntu 12.04, though we do plan to move to Asterisk 11 or a later LTS version at some point. We’re managing most aspects of the switch with FreePBX 2.10, so the various files in /etc/asterisk that describe extensions are expressed in extensions.conf syntax, but I’m doing a little research and discovery on the use of Lua, and I’ve been led to believe (based on the quote above as well as what I’ve read in “Asterisk:The Definitive Guide”) that it’s possible to express elements of the dialplan in Lua without cutting everything over to Lua in one go.
I’ve done my best to read through the Wiki, the O’Reilly book, and anything else I could find with the help of Google, but I’m stuck on how to actually get started. I thought that if I defined a unique named context (e.g. ‘lua_demo’) on the Lua side, I could jump to it from the dialplan side with something like ‘exten => *392,n,Goto(lua_demo,s,1)’ … but that bombed out. I think I’m missing the point of how you actually enter a dialplan, and I don’t understand Asterisk internals very well yet. So… maybe I should be using Dial() with a Local channel that starts in the named Lua context?
I can provide config files for anyone who wants to look through them to point out what I’m doing wrong, but my post is more about filling in holes in my conceptual understanding than asking for tech support, so tips or pointers would be fine.