Jocelyn DELALANDE
2012-Oct-10 09:55 UTC
[asterisk-users] include of regular context from lua dialplan
Hi dear asterisk gurus, I'm trying to use Lua dialplans ; I'd like to include from extensions.lua some regular (non-lua) dialplans, and it seems to fail (silently). I tested it including, in my lua dialplan 1- a context from the same lua dialplan OK 2- a context from extensions.conf dialplan (see below, I can't call 4321, extension not found) NO-OK 3- the "parkedcalls" context from app_parkandannounce.so NO-OK The two last includes work from a regular dialplan (ex: i can include pakedcalls, park and pickup parked calls) So my questions are : - is it supposed to work or by design i cannot include a regular-dialplan from lua ? - Am I missing something ? - is there any solution/workaround, or am I condemned to rewrite parts of dialplans in lua ? Relevant conf-files are below. Thanks by advance, regards, Jocelyn>>> sip.conf[basic-options](!) ; a template dtmfmode=rfc2833 context=luadefault type=friend qualify=yes [natted-phone](!,basic-options) ; another template inheriting basic-options directmedia=no host=dynamic nat=yes [ekiga1](natted-phone) secret=tsettset [thomson1](natted-phone) secret=tsettset [snom1](natted-phone) secret=tsettset <<<>>> extensions.luaextensions = { luademo = { s = demo_start; ["1111"] = function() app.dial("SIP/snom1", 30, "g") end; ["1112"] = function() app.dial("SIP/snom2", 30, "g") end; ["1113"] = function() app.dial("SIP/snom3", 30, "g") end; ["4"] = function () app.park() end; ["500"] = function() app.playback("demo-abouttotry") end; }; luadefault = { -- by default, do the demo include = {"regulardemo", "luademo"}; }; } <<<>>> extensions.conf[regulardemo] exten => 4321,1,Playback(demo-thanks) exten => 4321,n,Hangup() <<<