From dad60ef40ab2bbd0f04317d8353e9783a0b4b7b7 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Wed, 11 Jan 2023 19:52:42 -0700 Subject: [PATCH] config fs_path convert to boolean The fs_path setting from config.conf is picked up from the config as a string. The directory.lua code expects the value as boolean so we are converting it to a boolean so it can be used in that way. --- .../xml_handler/resources/scripts/directory/directory.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/scripts/resources/scripts/app/xml_handler/resources/scripts/directory/directory.lua b/app/scripts/resources/scripts/app/xml_handler/resources/scripts/directory/directory.lua index 3b69cdab21..94028683bc 100644 --- a/app/scripts/resources/scripts/app/xml_handler/resources/scripts/directory/directory.lua +++ b/app/scripts/resources/scripts/app/xml_handler/resources/scripts/directory/directory.lua @@ -83,6 +83,11 @@ -- true - send call to FS where ext reged -- false - send call directly to ext local USE_FS_PATH = xml_handler and xml_handler["fs_path"] + if (USE_FS_PATH == 'true') then + USE_FS_PATH = true; + else + USE_FS_PATH = false; + end -- Make sance only for extensions with number_alias -- false - you should register with AuthID=UserID=Extension (default) @@ -267,7 +272,7 @@ --freeswitch.consoleLog("notice", "[xml_handler][directory] database_hostname is " .. database_hostname .. "\n"); --hostname was not found set USE_FS_PATH to false to prevent a database_hostname concatenation error - if (database_hostname == nil) then + if (database_hostname == nil and USE_FS_PATH) then USE_FS_PATH = false; end