# Black and white lists

If you don't want to go into details, contact us. We will quickly help you and answer all questions!\
[Contact us](/contacts.md) in any convenient way.

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

{% hint style="warning" %}
Starting with version 2.15.0, all black / white lists are implemented through customization need\_registration
{% endhint %}

### Black / white lists (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/itgrix\_bx/customizer/actions/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
    ),
);
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.itgrix.com/custom_common/black-and-white-lists.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
