<div dir="ltr">Hi All,<div><br></div><div>I have FS 1.2 stable installed on fresh Ubuntu 12.04 LTS. I installed lua and lua socket libraries from package:</div><div><br></div># apt-get install lua5.1 liblua5.1-socket-dev liblua5.1-socket2<div>
<span><span style="font-size:12px;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:bold;vertical-align:baseline;white-space:pre-wrap"><br></span></span></div>This installed socket module in /usr/lib/i386-linux-gnu/lua/5.1/, which I added as a module directory in lua.conf.xml.<div>
<br></div><div>When I attempt to run the command "require 'socket.http'" in a lua script within FS, I get this error:</div><div><br></div><div><div style="font-family:arial,sans-serif;font-size:13px">2013-11-25 10:14:38.394321 [ERR] mod_lua.cpp:199 /usr/local/freeswitch/scripts/test.lua:27: module 'socket.http' not found:</div>
<div style="font-family:arial,sans-serif;font-size:13px"><span style="white-space:pre-wrap">        </span>no field package.preload['socket.http']</div><div style="font-family:arial,sans-serif;font-size:13px"><span style="white-space:pre-wrap">        </span>no file './socket/http.lua'</div>
<div style="font-family:arial,sans-serif;font-size:13px"><span style="white-space:pre-wrap">        </span>no file '/usr/local/share/lua/5.1/socket/http.lua'</div><div style="font-family:arial,sans-serif;font-size:13px">
<span style="white-space:pre-wrap">        </span>no file '/usr/local/share/lua/5.1/socket/http/init.lua'</div><div style="font-family:arial,sans-serif;font-size:13px"><span style="white-space:pre-wrap">        </span>no file '/usr/local/lib/lua/5.1/socket/http.lua'</div>
<div style="font-family:arial,sans-serif;font-size:13px"><span style="white-space:pre-wrap">        </span>no file '/usr/local/lib/lua/5.1/socket/http/init.lua'</div><div style="font-family:arial,sans-serif;font-size:13px">
<span style="white-space:pre-wrap">        </span>no file '/usr/lib/i386-linux-gnu/lua/5.1/socket/http.so'</div><div style="font-family:arial,sans-serif;font-size:13px"><span style="white-space:pre-wrap">        </span>no file '/usr/lib/i386-linux-gnu/lua/5.1/socket.so'</div>
<div style="font-family:arial,sans-serif;font-size:13px">stack traceback:</div><div style="font-family:arial,sans-serif;font-size:13px"><span style="white-space:pre-wrap">        </span>[C]: in function 'require'</div></div>
<div><br></div><div>It's looking for http.so; however in the socket module library there are only the files core.so and unix.so<br></div><div><br></div><div>When I run lua interpreter from terminal and try the same require command, it works without complaint:</div>
<div><br></div><div><div>root@server:~# lua</div><div>Lua 5.1.4 Copyright (C) 1994-2008 Lua.org, PUC-Rio</div><div>> require "socket.http";</div></div><div>></div><div><br></div><div>So why is FS' lua complaining about a luasocket library that standard lua isn't, and how do I deal with it?</div>
<div><br></div><div>Thanks,<br>Neil</div></div>