[asterisk-users] DUNDi and Lua dialplan
Guillaume Bour
gbour at proformatique.com
Tue Dec 7 09:30:45 UTC 2010
Hello,
I would like to known how to use DUNDi with a Lua dialplan ?
In extensions.conf, we should do like these:
|[lookupdundi]
switch => DUNDi/priv
[internal]
include => dundiextens
include => lookupdundi
exten => _XXXX,2,NoOp(calling ${EXTEN})
exten => _XXXX,n,Dial(SIP/${EXTEN})
exten => _XXXX,n,Hangup()|
priority 1 is either defined in dundiextens (local registered devices)
or lookupdundi (remote)
But as in Lua there is no priority, we can't to this.
I found the following method working:
|extensions = {
internal = {
["_XXXX"] = function(c,e)
app.noop('lua:: dialing exten ' .. e)
-- Goto is not working, I need to use a Local
channel
app.dial('Local/'..e..'@lookupdundi')
app.dial('SIP/'..e)
app.hangup()
end;
};
}|
But is this correct/the best one ?
Regards,
Guillaume
--
Guillaume Bour<gbour at proformatique.com> - proformatique
10 bis, rue Lucien VOILIN - 92800 Puteaux
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20101207/2561a875/attachment.htm
More information about the asterisk-users
mailing list