<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body text="#000000" bgcolor="#ffffff">
Hello,<br>
<br>
I would like to known how to use DUNDi with a Lua dialplan ?<br>
<br>
In extensions.conf, we should do like these:<br>
<code>[lookupdundi]<br>
switch => DUNDi/priv<br>
<br>
[internal]<br>
include => dundiextens<br>
include => lookupdundi <br>
<br>
exten => _XXXX,2,NoOp(calling ${EXTEN})<br>
exten => _XXXX,n,Dial(SIP/${EXTEN})<br>
exten => _XXXX,n,Hangup()</code><br>
<br>
priority 1 is either defined in dundiextens (local registered devices)
or lookupdundi (remote)<br>
<br>
But as in Lua there is no priority, we can't to this.<br>
I found the following method working:<br>
<br>
<code>extensions = {<br>
internal = {<br>
["_XXXX"] = function(c,e)<br>
app.noop('lua:: dialing exten ' .. e)<br>
-- Goto is not working, I need to use a Local
channel<br>
app.dial('Local/'..e..'@lookupdundi')<br>
app.dial('SIP/'..e)<br>
app.hangup()<br>
end;<br>
};<br>
}</code><br>
<br>
But is this correct/the best one ?<br>
<br>
Regards,<br>
Guillaume<br>
<pre class="moz-signature" cols="72">--
Guillaume Bour <a class="moz-txt-link-rfc2396E" href="mailto:gbour@proformatique.com"><gbour@proformatique.com></a> - proformatique
10 bis, rue Lucien VOILIN - 92800 Puteaux
</pre>
</body>
</html>