Update index.lua
This commit is contained in:
parent
5bbe08c69d
commit
e8e28e834b
|
|
@ -113,14 +113,16 @@
|
||||||
end
|
end
|
||||||
local found = false;
|
local found = false;
|
||||||
dbh:query(sql, params, function(row)
|
dbh:query(sql, params, function(row)
|
||||||
|
found = true;
|
||||||
|
|
||||||
|
--get the values from the database
|
||||||
call_block_uuid = row.call_block_uuid;
|
call_block_uuid = row.call_block_uuid;
|
||||||
call_block_app = row.call_block_app;
|
call_block_app = row.call_block_app;
|
||||||
call_block_data = row.call_block_data;
|
call_block_data = row.call_block_data;
|
||||||
call_block_count = row.call_block_count;
|
call_block_count = row.call_block_count;
|
||||||
extension_uuid = row.extension_uuid;
|
extension_uuid = row.extension_uuid;
|
||||||
|
|
||||||
cached_value = domain_uuid..','..caller_id_number;
|
--cached_value = domain_uuid..','..caller_id_number;
|
||||||
found = true;
|
|
||||||
end);
|
end);
|
||||||
|
|
||||||
--set call block default to false
|
--set call block default to false
|
||||||
|
|
@ -194,7 +196,9 @@
|
||||||
dbh:release();
|
dbh:release();
|
||||||
|
|
||||||
--set the cache
|
--set the cache
|
||||||
local ok, err = cache.set(call_block_cache_key, cached_value, '3600');
|
if (cached_value ~= nil) then
|
||||||
|
local ok, err = cache.set(call_block_cache_key, cached_value, '3600');
|
||||||
|
end
|
||||||
if debug["cache"] then
|
if debug["cache"] then
|
||||||
if ok then
|
if ok then
|
||||||
freeswitch.consoleLog("notice", "[call_block] " .. call_block_cache_key .. " stored in the cache\n");
|
freeswitch.consoleLog("notice", "[call_block] " .. call_block_cache_key .. " stored in the cache\n");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue