Prevent empty caller id from blocking calls

Improved the following
- Prevent empty caller id name and number from blocking calls
- Fixed the call block count so it would increment each time it has blocked a call
This commit is contained in:
FusionPBX 2024-07-15 23:06:23 -06:00 committed by GitHub
parent 79a8d6c8ca
commit 215b4d0df7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 2 deletions

View File

@ -102,6 +102,7 @@
sql = sql .. "where (domain_uuid = :domain_uuid or domain_uuid is null) \n";
sql = sql .. "and call_block_enabled = 'true' \n";
sql = sql .. "and call_block_direction = :call_block_direction \n";
sql = sql .. "and (call_block_name <> '' or call_block_number <> '') \n";
sql = sql .. "and ( \n";
sql = sql .. " (\n";
sql = sql .. " call_block_name = :call_block_name \n";
@ -242,9 +243,9 @@
--update the call block count
if (call_block) then
sql = "update v_call_block ";
sql = sql .. "set call_block_count = :call_block_count ";
sql = sql .. "set call_block_count = call_block_count + 1 ";
sql = sql .. "where call_block_uuid = :call_block_uuid ";
local params = {call_block_uuid = call_block_uuid, call_block_count = #call_block_count + 1};
local params = {call_block_uuid = call_block_uuid};
if (debug["sql"]) then
freeswitch.consoleLog("notice", "[dialplan] SQL: " .. sql .. "; params:" .. json.encode(params) .. "\n");
end