From 119a007acd7e6e2814f10219c9f1c9e5843fb37d Mon Sep 17 00:00:00 2001 From: SJS87 Date: Sun, 4 Sep 2016 20:03:03 +0100 Subject: [PATCH] Update call_block index.lua script (#1580) We've had instances where special characters (other than +) are used in the caller_id_number field which prevents these calls from being detected using the call_block feature. We've resolved this by updating fusionpbx/resources/install/scripts/app/call_block/index.lua line 49 to match only numbers rather than using a gsub replace. --- resources/install/scripts/app/call_block/index.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/install/scripts/app/call_block/index.lua b/resources/install/scripts/app/call_block/index.lua index d193161bd2..5c8117ee69 100644 --- a/resources/install/scripts/app/call_block/index.lua +++ b/resources/install/scripts/app/call_block/index.lua @@ -46,7 +46,7 @@ This method causes the script to get its manadatory arguments directly from the -- Command line parameters local params = { - cid_num = string.gsub(tostring(session:getVariable("caller_id_number")), "+", ""), + cid_num = string.match(tostring(session:getVariable("caller_id_number")), "%d+"), cid_name = session:getVariable("caller_id_name"), domain_name = session:getVariable("domain_name"), userid = "", -- session:getVariable("id")