# Black and white lists

1. Go to **System** → **System file custmization**.

<figure><img src="/files/tYsBgqXvD9DV5euOc4N0" alt=""><figcaption><p>System file customization menu</p></figcaption></figure>

2. Open the **extensions.conf** configuration file for editing.

<figure><img src="/files/R61HVwQh4xX75UmmNNdE" alt=""><figcaption><p>extensions.conf</p></figcaption></figure>

3. Set the "**Add to end of file**" mode and paste the following code:

```php
[add-trim-prefix-clid-custom]
exten => _X!,1,NoOp(...)
    ; Blacklist of numbers. The call will be completed.. 
    same => n,ExecIf($["${CALLERID(num)}" == "491771789427"]?Hangup())
    same => n,ExecIf($["${CALLERID(num)}" == "4915735987904"]?Hangup())
    same => n,ExecIf($["${CALLERID(num)}" == "4915735996685"]?Hangup())
    same => n,return
```

<figure><img src="/files/a87wNM6hwfvD0eIi9Kf0" alt=""><figcaption><p>Code for extensions.conf</p></figcaption></figure>

The whitelist of numbers sometimes needs to be described for specific providers:

```php
[Provider-ID-incoming-custom]
exten => _X!,1,NoOp(...)
    ; Whitelist of numbers. 
    same => n,ExecIf($["${CALLERID(num)}" == "491771789427"]?return)
    same => n,ExecIf($["${CALLERID(num)}" == "4915735996685"]?return)
    same => n,ExecIf($["${CALLERID(num)}" == "4915735987904"]?return)
    same => n,Hangup()
```

* **PROVIDER-ID** - the value that you can find in the address bar at the time of provider configuration

<figure><img src="/files/UPdPLoaBwwpqTG0pxRX1" alt=""><figcaption><p>Provider ID</p></figcaption></figure>


---

# 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.mikopbx.com/mikopbx/english/faq/incoming-routing/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.
