Custom Lua Script - Mysql Connection ISSUE

Status
Not open for further replies.

Stelios

New Member
Sep 24, 2017
28
1
3
45
I have create a lua script and I pass in it 3 parameters.

Lua execute by a dialplan see image. Everything is fine but....

.... When I try to connect to remote mySQL Server its does not connect any more. It not possible to connect to database.
It was working for more that 1 week... but now is does not connect to MySQL any more.


mysql = require "luasql.mysql";
local env = mysql.mysql();
local conn = env:connect('MYSQL-DB','USER','PASSWORD','remote.server.com','3306');

if (conn ~= nil) then
session:consoleLog("info", "Connected\n");
else
session:consoleLog("info", "DID NOT Connected\n");
return 0;
end
......
......
.....


Questions:
1.There is restriction in fusion pbx ?
2. How can I hand the error with lua script ?

Thanks
 

Attachments

  • Capture.PNG
    Capture.PNG
    4.5 KB · Views: 4
Status
Not open for further replies.