Adjust the LUA database connection to accommodate native PostgreSQL support and the recent change to the database connection syntax.
This commit is contained in:
@@ -30,14 +30,7 @@
|
||||
digit_timeout = 5000;
|
||||
|
||||
--connect to the database
|
||||
--ODBC - data source name
|
||||
if (dsn_name) then
|
||||
dbh = freeswitch.Dbh(dsn_name,dsn_username,dsn_password);
|
||||
end
|
||||
--FreeSWITCH core db handler
|
||||
if (db_type == "sqlite") then
|
||||
dbh = freeswitch.Dbh("sqlite://"..db_path.."/"..db_name);
|
||||
end
|
||||
dbh = freeswitch.Dbh(database["system"]);
|
||||
|
||||
--prepare the api object
|
||||
api = freeswitch.API();
|
||||
@@ -151,14 +144,7 @@
|
||||
end_epoch = os.time();
|
||||
|
||||
--connect to the database
|
||||
--ODBC - data source name
|
||||
if (dsn_name) then
|
||||
dbh = freeswitch.Dbh(dsn_name,dsn_username,dsn_password);
|
||||
end
|
||||
--FreeSWITCH core db handler
|
||||
if (db_type == "sqlite") then
|
||||
dbh = freeswitch.Dbh("sqlite://"..db_path.."/"..db_name);
|
||||
end
|
||||
dbh = freeswitch.Dbh(database["system"]);
|
||||
|
||||
--get the conference sessions
|
||||
sql = [[SELECT count(*) as num_rows
|
||||
@@ -613,6 +599,9 @@
|
||||
end
|
||||
end
|
||||
|
||||
--close the database connection
|
||||
dbh:release();
|
||||
|
||||
--send the call to the conference
|
||||
profile = "default";
|
||||
cmd = meeting_uuid.."-"..domain_name.."@"..profile.."+flags{".. flags .."}";
|
||||
|
||||
@@ -49,14 +49,7 @@
|
||||
password_tries = 0;
|
||||
|
||||
--connect to the database
|
||||
--ODBC - data source name
|
||||
if (dsn_name) then
|
||||
dbh = freeswitch.Dbh(dsn_name,dsn_username,dsn_password);
|
||||
end
|
||||
--FreeSWITCH core db handler
|
||||
if (db_type == "sqlite") then
|
||||
dbh = freeswitch.Dbh("sqlite://"..db_path.."/"..db_name);
|
||||
end
|
||||
dbh = freeswitch.Dbh(database["system"]);
|
||||
|
||||
--set the api
|
||||
api = freeswitch.API();
|
||||
@@ -282,7 +275,7 @@
|
||||
end
|
||||
|
||||
--close the database connection
|
||||
--dbh:release();
|
||||
dbh:release();
|
||||
|
||||
--notes
|
||||
--record the video
|
||||
|
||||
Reference in New Issue
Block a user