Enhance Call Blocking [master] (#2988)

* Added support for regular expressions in the numbers to be blocked.
Reduced the caching timeout, as the counter is only incremented when a call is blocked and the number is not cached.

* Added default sort order.

* Added option to switch on/off use of regular expression matching for pgsql and mysql.

* Added support for sqlite and updated default number match to "LIKE" as suggested by MafooUK on IRC.

* Selection of behavior (default [=], regex or like matching) is now done via the variable call_block_matching = regex|like|EMPTY - type text - in the Call Block section of Default Settings.

* Updated comment to match new matching.
This commit is contained in:
The-Operator
2018-05-08 08:50:57 -06:00
committed by FusionPBX
parent 9b7d4e4f80
commit 57e0905a36
3 changed files with 33 additions and 8 deletions
+6 -2
View File
@@ -90,7 +90,11 @@ require_once "resources/require.php";
//get the list
$sql = "select * from v_call_block ";
$sql .= "where domain_uuid = '".$_SESSION['domain_uuid']."' ";
if (strlen($order_by)> 0) { $sql .= "order by $order_by $order "; }
if (strlen($order_by)> 0) {
$sql .= "order by $order_by $order ";
} else {
$sql .= "order by call_block_number asc ";
}
$sql .= " limit $rows_per_page offset $offset ";
$prep_statement = $db->prepare(check_sql($sql));
$prep_statement->execute();
@@ -177,4 +181,4 @@ require_once "resources/require.php";
//include the footer
require_once "resources/footer.php";
?>
?>