[asterisk-users] include of regular context from lua dialplan

Jocelyn DELALANDE jocelyn.delalande at option-service.fr
Wed Oct 10 04:55:50 CDT 2012


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.lua

extensions = {
   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()

<<<



More information about the asterisk-users mailing list