diff --git a/resources/install/scripts/app/xml_handler/resources/scripts/configuration/callcenter.conf.lua b/resources/install/scripts/app/xml_handler/resources/scripts/configuration/callcenter.conf.lua index 9afdfa40a0..611ee82d2a 100644 --- a/resources/install/scripts/app/xml_handler/resources/scripts/configuration/callcenter.conf.lua +++ b/resources/install/scripts/app/xml_handler/resources/scripts/configuration/callcenter.conf.lua @@ -1,6 +1,6 @@ -- xml_handler.lua -- Part of FusionPBX --- Copyright (C) 2015-2017 Mark J Crane +-- Copyright (C) 2015-2018 Mark J Crane -- All rights reserved. -- -- Redistribution and use in source and binary forms, with or without @@ -37,7 +37,7 @@ if not XML_STRING then --log cache error if (debug["cache"]) then - freeswitch.consoleLog("warning", "[xml_handler] " .. cc_cache_key .. " can not be get from memcache: " .. tostring(err) .. "\n"); + freeswitch.consoleLog("warning", "[xml_handler] " .. cc_cache_key .. " can not be get from the cache: " .. tostring(err) .. "\n"); end --connect to the database @@ -287,19 +287,12 @@ local ok, err = cache.set(cc_cache_key, XML_STRING, expire["callcenter"]); if debug["cache"] then if ok then - freeswitch.consoleLog("notice", "[xml_handler] " .. cc_cache_key .. " stored in memcache\n"); + freeswitch.consoleLog("notice", "[xml_handler] " .. cc_cache_key .. " stored in the cache\n"); else - freeswitch.consoleLog("warning", "[xml_handler] " .. cc_cache_key .. " can not be stored in memcache: " .. tostring(err) .. "\n"); + freeswitch.consoleLog("warning", "[xml_handler] " .. cc_cache_key .. " can not be stored in the cache: " .. tostring(err) .. "\n"); end end - --send the xml to the console - if (debug["xml_string"]) then - local file = assert(io.open(temp_dir .. "/callcenter.conf.xml", "w")); - file:write(XML_STRING); - file:close(); - end - --send to the console if (debug["cache"]) then freeswitch.consoleLog("notice", "[xml_handler] " .. cc_cache_key .. " source: database\n"); @@ -307,6 +300,13 @@ else --send to the console if (debug["cache"]) then - freeswitch.consoleLog("notice", "[xml_handler] " .. cc_cache_key .. " source: memcache\n"); + freeswitch.consoleLog("notice", "[xml_handler] " .. cc_cache_key .. " source: cache\n"); end end --if XML_STRING + +--send the xml to the console + if (debug["xml_string"]) then + local file = assert(io.open(temp_dir .. "/callcenter.conf.xml", "w")); + file:write(XML_STRING); + file:close(); + end