<div dir="ltr"><div>I have a myself writed script, it must read data from database and create XML config for FS. For creating XML I using genx library, it was installed by luarocks. This library worked fine when I use it in standalone scripts, but when I use it in FS I`ve got next error (I`ve put there bigger part of freeswitch.log for better explanation):</div><div><br></div><div>2014-10-07 15:34:02.010800 [INFO] switch_cpp.cpp:1328 package.path /usr/local/share/freeswitch/scripts/lua/?.lua package.cpath /usr/local/lib/lua/5.1/?.so;/usr/local/lib/?.so</div><div>2014-10-07 15:34:02.010848 [NOTICE] switch_cpp.cpp:1328 Debug from gen_dir_user_xml.lua, provided params:</div><div>&#39;Event-Name: GENERAL</div><div>Core-UUID: ed5920d2-154e-e411-b150-005056a83c1f</div><div>FreeSWITCH-Hostname: voip-bsd-01.local</div><div>FreeSWITCH-Switchname: voip-bsd-01.local</div><div>FreeSWITCH-IPv4: xxx.xxx.xxx.xxx</div><div>FreeSWITCH-IPv6: %3A%3A1</div><div>Event-Date-Local: 2014-10-07%2015%3A34%3A02</div><div>Event-Date-GMT: Tue,%2007%20Oct%202014%2011%3A34%3A02%20GMT</div><div>Event-Date-Timestamp: 1412681642009651</div><div>Event-Calling-File: switch_core.c</div><div>Event-Calling-Function: switch_load_network_lists</div><div>Event-Calling-Line-Number: 1393</div><div>Event-Sequence: 397</div><div>domain: <a href="http://company1.xxxx.com">company1.xxxx.com</a></div><div>purpose: network-list</div><div><br></div><div>&#39;</div><div>2014-10-07 15:34:02.010858 [NOTICE] switch_cpp.cpp:1328 Debug from gen_dir_user_xml.lua:</div><div>XML_REQUEST[section]:directory</div><div>XML_REQUEST[&quot;tag_name&quot;]:domain</div><div>XML_REQUEST[&quot;key_name&quot;]:name</div><div>XML_REQUEST[&quot;key_value&quot;]:<a href="http://company1.xxxx.com">company1.xxxx.com</a></div><div>2014-10-07 15:34:02.016535 [DEBUG] freeswitch_lua.cpp:360 DBH handle 0x80c32d0f0 Connected.<br></div><div>2014-10-07 15:34:02.016916 [ERR] mod_lua.cpp:203 error loading module &#39;genx&#39; from file &#39;/usr/local/lib/lua/5.1/genx.so&#39;:</div><div>        /usr/local/lib/lua/5.1/genx.so: Undefined symbol &quot;lua_call&quot;</div><div>stack traceback:</div><div>        [C]: in ?</div><div>        [C]: in function &#39;require&#39;</div><div>        .../local/share/freeswitch/scripts/lua/gen_dir_user_xml.lua:202: in main chunk</div><div>2014-10-07 15:34:02.016923 [ERR] mod_lua.cpp:269 LUA script parse/execute error!</div><div><br></div><div>My lua.conf.xml:</div><div><br></div><div><div>&lt;configuration name=&quot;lua.conf&quot; description=&quot;LUA Configuration&quot;&gt;</div><div>  &lt;settings&gt;</div><div>    &lt;param name=&quot;module-directory&quot; value=&quot;/usr/local/lib/lua/5.1/?.so&quot;/&gt;<br></div><div>    &lt;param name=&quot;module-directory&quot; value=&quot;/usr/local/lib/?.so&quot;/&gt;</div><div>    &lt;param name=&quot;script-directory&quot; value=&quot;$${script_dir}/lua/?.lua&quot;/&gt;<br></div><div>    &lt;param name=&quot;xml-handler-script&quot; value=&quot;lua/gen_dir_user_xml.lua&quot;/&gt;<br></div><div>    &lt;param name=&quot;xml-handler-bindings&quot; value=&quot;directory&quot;/&gt;</div><div>  &lt;/settings&gt;<br></div><div>&lt;/configuration&gt;</div></div><div><br></div><div><br></div><div>I`d attached script because it is large.</div><div><br></div><div>Any thinks about methods for solving problem?</div><div><br></div>-- <br><div dir="ltr">best regards, </div><div dir="ltr">Dmitriy Borisov</div>
</div>