Black and white lists

How to setup?

If you don't want to go into details, contact us. We will quickly help you and answer all questions! Contact us in any convenient way:

To configure customization, you must include the customizer file in the module settings. For versions starting from 2.15.0

Starting with version 2.15.0, all black / white lists are implemented through customization need_registration

Black / white list (filtering by internal number):

Blacklist of internal numbers - allows you to not register a call in CRM in which one of the selected set of internal numbers participated.

On the contrary, the white list of internal numbers allows registering only those calls in CRM in which one of the selected set of internal numbers participated.

To cancel the registration of calls to certain internal numbers, for example 101 and 102, we edit the file /opt/bx24asterisk/custom/need_registration.php.

Example code for the BLACK list on internal numbers 101 and 102:

$black_list = array('101', '102');
$key = $params['conversation']['type'] == 2 ? 'to' : 'from'; // 2 = incoming
if (in_array($params['conversation'][$key], $black_list)) {
$result = false;
}
return array(
'state' => 'success',
'data' => array(
'result' => $result
),
);

An example of the WHITE list code for extension numbers 201 and 202:

$white_list = array('201', '202');
$key = $params['conversation']['type'] == 2 ? 'to' : 'from'; // 2 = incoming
if (!in_array($params['conversation'][$key], $white_list)) {
$result = false;
}
return array(
'state' => 'success',
'data' => array(
'result' => $result
),
);