also check what code you are running. There was a bug with this in master last week that has been fixed.<span></span><br><br>On Tuesday, June 23, 2015, Roman Dissauer <<a href="mailto:roman@dissauer.net">roman@dissauer.net</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">first did you restart freeswitch after configuring lua xml_handler?<div>If yes, check the debug string in fs_cli created by the lua script:</div><div><br></div><div>„ Debug from catch-event-directory, generated XML: …“</div><div><br></div><div>If you don’t find this string in you console, lua xml_handler is not configured properly. If you find this debug string check if there is your user id=„600300"</div><div><br><div><blockquote type="cite"><div>Am 23.06.2015 um 06:28 schrieb Jaime Cruz <<a href="javascript:_e(%7B%7D,'cvml','jaimecm@gmail.com');" target="_blank">jaimecm@gmail.com</a>>:</div><br><div><div dir="ltr"><div>Hi all,<br><br></div><div>I'm working to configure Freeswith directory users on the fly using<br></div><div>the xml-handler-script option in the autoload_configs/lua.conf.xml configuration file<br></div><div>using the followin option:<br> <param name="xml-handler-script" value="catch-event-directory.lua"/><br> <param name="xml-handler-bindings" value="directory"/><br></div><div>as explain in the following url: <a href="https://wiki.freeswitch.org/wiki/Lua_freeswitch_dbh" target="_blank">https://wiki.freeswitch.org/wiki/Lua_freeswitch_dbh</a><br></div><div><br>But I'm get the following error:<br> 2015-06-23 01:09:23.717880 [WARNING] sofia_reg.c:2827 Can't find user [<a href="javascript:_e(%7B%7D,'cvml','600300@voip.hablaip.com');" target="_blank">600300@voip.hablaip.com</a>] from X.X.X.X<br>You must define a domain called '<a href="http://test.com/" target="_blank">test.com</a>' in your directory and add a user with the id="600300" attribute<br>and you must configure your device to use the proper domain in it's authentication credentials.<br><br></div><div>Also with a local created user in xml files the FS autenticate fine, but with a user created by the directory handler script it fail.<br><br></div><div>Any help will be apreciated.<br><br>The FS version is 1.4.19~64bit running on Centos 6.6,<br><br></div><div>and here is the very simple lua script: catch-event-directory.lua that returns the XML_STRING variable:<br></div><div>==================================================================<br>local v_section = XML_REQUEST["section"] or ""<br>local v_tag_name = XML_REQUEST["tag_name"] or ""<br>local req_domain = params:getHeader("domain") or ""<br>local req_user = params:getHeader("user") or ""<br>local req_context= params:getHeader("variable_user_context") or ""<br><br>if (v_section == "directory" and v_tag_name=="domain" and (req_domain) and (req_user)) then<br></div><div> local password="some password"<br></div><div> XML_STRING =<br> [[<?xml version="1.0" encoding="UTF-8" standalone="no"?><br> <document type="freeswitch/xml"><br> <section name="directory"><br> <domain name="]] .. req_domain .. [["><br> <user id="]] .. req_user .. [["><br> <params><br> <param name="password" value="]] .. password .. [["/><br> <param name="dial-string" value="{sip_invite_domain=${domain_name},presence_id=${dialed_user}@${dialed_domain}}${sofia_contact(${dialed_user}@${dialed_domain})}"/><br> </params><br> <variables><br> <variable name="user_context" value="]] .. req_context .. [["/><br> <variable name="limit_max" value="10"/><br> </variables><br> </user><br> </domain><br> </section><br> </document>]]<br> -- comment the following line for production:<br> freeswitch.consoleLog("notice", "Debug from catch-event-directory, generated XML:\n" .. XML_STRING .. "\n")<br></div><div>end<br></div><div><br><br></div><div>Thanks in advance.<br></div><div>Jaime<br></div></div>
_________________________________________________________________________<br>Professional FreeSWITCH Consulting Services: <br><a href="javascript:_e(%7B%7D,'cvml','consulting@freeswitch.org');" target="_blank">consulting@freeswitch.org</a><br><a href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br><br>Official FreeSWITCH Sites<br><a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br><a href="http://confluence.freeswitch.org" target="_blank">http://confluence.freeswitch.org</a><br><a href="http://www.cluecon.com" target="_blank">http://www.cluecon.com</a><br><br>FreeSWITCH-users mailing list<br><a href="javascript:_e(%7B%7D,'cvml','FreeSWITCH-users@lists.freeswitch.org');" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br><a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br><a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a></div></blockquote></div><br></div></div></blockquote>