mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-02-22 02:46:30 +00:00
Adjust the LUA database connection to accommodate native PostgreSQL support and the recent change to the database connection syntax.
This commit is contained in:
@@ -28,11 +28,14 @@
|
||||
--if the call has been answered
|
||||
--then send presence terminate, and delete from the database
|
||||
|
||||
--include config.lua
|
||||
scripts_dir = string.sub(debug.getinfo(1).source,2,string.len(debug.getinfo(1).source)-(string.len(argv[0])+1));
|
||||
dofile(scripts_dir.."/resources/config.lua");
|
||||
|
||||
--connect to the database
|
||||
--ODBC - data source name
|
||||
--local dbh = freeswitch.Dbh("name","user","pass");
|
||||
--FreeSWITCH core db
|
||||
local dbh = freeswitch.Dbh("core:park");
|
||||
--dbh = freeswitch.Dbh("core:core"); -- when using sqlite
|
||||
dbh = freeswitch.Dbh("sqlite://"..database_dir.."/park.db");
|
||||
--dbh = freeswitch.Dbh(database["system"]);
|
||||
|
||||
--get the argv values
|
||||
script_name = argv[0];
|
||||
|
||||
Reference in New Issue
Block a user