Update dial_string.lua
This commit is contained in:
@@ -16,7 +16,7 @@
|
|||||||
--
|
--
|
||||||
-- The Initial Developer of the Original Code is
|
-- The Initial Developer of the Original Code is
|
||||||
-- Mark J Crane <markjcrane@fusionpbx.com>
|
-- Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
-- Copyright (C) 2010 - 2014
|
-- Copyright (C) 2010 - 2019
|
||||||
-- the Initial Developer. All Rights Reserved.
|
-- the Initial Developer. All Rights Reserved.
|
||||||
--
|
--
|
||||||
-- Contributor(s):
|
-- Contributor(s):
|
||||||
@@ -228,20 +228,20 @@ if ( session:ready() ) then
|
|||||||
end
|
end
|
||||||
|
|
||||||
--clear the cache
|
--clear the cache
|
||||||
if (user_name ~= nil) then
|
if (user_name ~= nil and context ~= nil) then
|
||||||
cmd = "delete directory:"..user_name.."@"..context;
|
if (cache.support()) then
|
||||||
result = api:execute("memcache", cmd);
|
cache.del("directory:"..user_name.."@"..context);
|
||||||
if (debug["var"]) then
|
if #number_alias > 0 then
|
||||||
freeswitch.consoleLog("NOTICE", "[dial_string] memcache ".. cmd .. "\n");
|
cache.del("directory:"..number_alias.."@"..domain_name);
|
||||||
freeswitch.consoleLog("NOTICE", "[dial_string] result: ".. result .. "\n");
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if (db_extension ~= nil) then
|
if (db_extension ~= nil and context ~= nil) then
|
||||||
cmd = "delete directory:"..db_extension.."@"..context;
|
if (cache.support()) then
|
||||||
result = api:execute("memcache", cmd);
|
cache.del("directory:"..db_extension.."@"..context);
|
||||||
if (debug["var"]) then
|
if #number_alias > 0 then
|
||||||
freeswitch.consoleLog("NOTICE", "[dial_string] memcache ".. cmd .. "\n");
|
cache.del("directory:"..number_alias.."@"..domain_name);
|
||||||
freeswitch.consoleLog("NOTICE", "[dial_string] result: ".. result .. "\n");
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user