<br><br><div class="gmail_quote">On Mon, Jan 11, 2010 at 2:53 PM, Mike van Lammeren <span dir="ltr">&lt;<a href="mailto:mike@van.lammeren.net">mike@van.lammeren.net</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello!<div><br></div><div>I&#39;d like to be able to have FreeSWITCH check a database for authorization, every time a user registers. There are some great examples on the wiki, which use either MOD_XML_CURL or Lua to dynamically provide a dialplan, but I cannot find an example for providing a directory.</div>

<div><br></div><div>I am developing an application that will have thousands of users, and will run on multiple FreeSWITCH servers behind a load balancer. Ideally, FreeSWITCH would only look-up directory information, specifically, username and password, whenever a user attempts to connect. The directory information will be changing regularly, as users are added or removed from the system.</div>

<div><br></div><div>Is this possible with FreeSWITCH? Or can only dialplan information be provided dynamically?</div><div><br></div><div>I&#39;ve written a script in Lua that provides the XML data, such as that found in the example /freeswitch/conf/directory/default/ folders, and I try to call it with this bit of XML in /freeswitch/conf/directory/default.xml:</div>

<div><br></div><div><div><div><div>&lt;groups&gt;</div><div><span style="white-space: pre;">        </span>&lt;group name=&quot;default&quot;&gt;</div><div><span style="white-space: pre;">        </span>&lt;users&gt;</div>
<div><span style="white-space: pre;">                </span>&lt;param name=&quot;xml-handler-script&quot; value=&quot;/directory.lua&quot;/&gt;</div><div><span style="white-space: pre;">                </span>&lt;param name=&quot;xml-handler-bindings&quot; value=&quot;users&quot;/&gt;</div>

<div><span style="white-space: pre;">        </span>&lt;/users&gt;</div><div>&lt;/groups&gt;</div><div><br></div><div>Is this the right approach? Am I going about this the right way?</div></div></div></div></blockquote><div><br>
You can bind &quot;directory&quot; as well as &quot;dialplan&quot; and a few others. I personally don&#39;t use xml_curl in production but for kicks I tried to learn it and I documented some of my journey on my personal blog. (<a href="http://telecommusings.blogspot.com/">http://telecommusings.blogspot.com/</a>)<br>
<br>xml_curl was designed to scale and be applied in your type of scenario. Raymond (intralanman on IRC) has played with it quite a bit as have a number of others. <br>-MC<br></div></div><br><br>