From 752a5acf8b9c04404a4c05172d9d4ffea1d0feaa Mon Sep 17 00:00:00 2001 From: markjcrane Date: Mon, 4 Jan 2016 19:09:29 -0700 Subject: [PATCH] Update the ivr menu to use memcache with the uuid as part of the key. --- .../resources/scripts/configuration/ivr.conf.lua | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/resources/install/scripts/app/xml_handler/resources/scripts/configuration/ivr.conf.lua b/resources/install/scripts/app/xml_handler/resources/scripts/configuration/ivr.conf.lua index 726ff1a7d2..8f5eaf5f9e 100644 --- a/resources/install/scripts/app/xml_handler/resources/scripts/configuration/ivr.conf.lua +++ b/resources/install/scripts/app/xml_handler/resources/scripts/configuration/ivr.conf.lua @@ -28,9 +28,8 @@ ivr_menu_uuid = params:getHeader("Menu-Name"); --get the cache - hostname = trim(api:execute("switchname", "")); if (trim(api:execute("module_exists", "mod_memcache")) == "true") then - XML_STRING = trim(api:execute("memcache", "get configuration:ivr.conf:" .. hostname)); + XML_STRING = trim(api:execute("memcache", "get configuration:ivr.conf:" .. ivr_menu_uuid)); else XML_STRING = "-ERR NOT FOUND"; end @@ -137,7 +136,7 @@ --freeswitch.consoleLog("notice", "[xml_handler]"..api:execute("eval ${dsn}")); --set the cache - result = trim(api:execute("memcache", "set configuration:ivr.conf:" .. hostname .." '"..XML_STRING:gsub("'", "'").."' ".."expire['ivr.conf']")); + result = trim(api:execute("memcache", "set configuration:ivr.conf:".. ivr_menu_uuid .." '"..XML_STRING:gsub("'", "'").."' ".."expire['ivr.conf']")); --send the xml to the console if (debug["xml_string"]) then @@ -148,7 +147,7 @@ --send to the console if (debug["cache"]) then - freeswitch.consoleLog("notice", "[xml_handler] configuration:ivr.conf:" .. hostname .." source: database\n"); + freeswitch.consoleLog("notice", "[xml_handler] configuration:ivr.conf:" .. ivr_menu_uuid .." source: database\n"); end else @@ -156,6 +155,6 @@ XML_STRING = XML_STRING:gsub("'", "'"); --send to the console if (debug["cache"]) then - freeswitch.consoleLog("notice", "[xml_handler] configuration:ivr.conf source: memcache\n"); + freeswitch.consoleLog("notice", "[xml_handler] configuration:ivr.conf" .. ivr_menu_uuid .." source: memcache\n"); end end --if XML_STRING