mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 11:43:50 +00:00
Update the method to connect to the database with lua.
This commit is contained in:
@@ -30,7 +30,8 @@
|
||||
digit_timeout = 5000;
|
||||
|
||||
--connect to the database
|
||||
dbh = freeswitch.Dbh(database["system"]);
|
||||
dofile(scripts_dir.."/resources/functions/database_handle.lua");
|
||||
dbh = database_handle('system');
|
||||
|
||||
--prepare the api object
|
||||
api = freeswitch.API();
|
||||
@@ -139,7 +140,8 @@
|
||||
end_epoch = os.time();
|
||||
|
||||
--connect to the database
|
||||
dbh = freeswitch.Dbh(database["system"]);
|
||||
dofile(scripts_dir.."/resources/functions/database_handle.lua");
|
||||
dbh = database_handle('system');
|
||||
|
||||
--get the conference sessions
|
||||
if (conference_session_uuid) then
|
||||
|
||||
@@ -49,7 +49,8 @@
|
||||
password_tries = 0;
|
||||
|
||||
--connect to the database
|
||||
dbh = freeswitch.Dbh(database["system"]);
|
||||
dofile(scripts_dir.."/resources/functions/database_handle.lua");
|
||||
dbh = database_handle('system');
|
||||
|
||||
--set the api
|
||||
api = freeswitch.API();
|
||||
|
||||
@@ -36,7 +36,8 @@
|
||||
debug["info"] = false;
|
||||
|
||||
--connect to the database
|
||||
dbh = freeswitch.Dbh(database["system"]);
|
||||
dofile(scripts_dir.."/resources/functions/database_handle.lua");
|
||||
dbh = database_handle('system');
|
||||
|
||||
--used to stop the lua service
|
||||
local file = assert(io.open(tmp_file, "w"));
|
||||
|
||||
@@ -42,7 +42,11 @@
|
||||
dofile(scripts_dir.."/resources/functions/explode.lua");
|
||||
|
||||
--connect to the database
|
||||
dbh = freeswitch.Dbh(database["system"]);
|
||||
dofile(scripts_dir.."/resources/functions/database_handle.lua");
|
||||
dbh = database_handle('system');
|
||||
|
||||
--exits the script if we didn't connect properly
|
||||
assert(dbh:connected());
|
||||
|
||||
--if the params class and methods do not exist then add them to prevent errors
|
||||
if (not params) then
|
||||
|
||||
Reference in New Issue
Block a user