From aacb232fc362e1bb219b826433c47ab85acf433e Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Tue, 7 Feb 2023 22:47:03 -0700 Subject: [PATCH] Add debug info and change method to access the table Changing the method to access the table with dot notation is just a style should work either way. --- .../scripts/resources/functions/database_handle.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/scripts/resources/scripts/resources/functions/database_handle.lua b/app/scripts/resources/scripts/resources/functions/database_handle.lua index a9a3e3140a..29224c66cd 100644 --- a/app/scripts/resources/scripts/resources/functions/database_handle.lua +++ b/app/scripts/resources/scripts/resources/functions/database_handle.lua @@ -2,8 +2,10 @@ --connect to the database function database_handle(t) if (t == "system") then - return freeswitch.Dbh(database["system"]); + --freeswitch.consoleLog("notice","database.switch " .. database.system .. "\n"); + return freeswitch.Dbh(database.system); elseif (t == "switch") then - return freeswitch.Dbh(database["switch"]); + --freeswitch.consoleLog("notice","database.switch " .. trim(database.switch) .. "\n"); + return freeswitch.Dbh(database.switch); end - end \ No newline at end of file + end