# Black and white lists

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

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2Fn06cIfMIqk6wJhcxD3gW%2FSystemFileCustomization.png?alt=media&#x26;token=4edfbfbf-6903-46c5-b1b5-d2a62131f59e" alt=""><figcaption><p>System file customization menu</p></figcaption></figure>

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

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2FNuELWVzuFh5rThr08jvu%2FEditExtensions.conf.png?alt=media&#x26;token=567dc075-00ed-45a7-bc10-915ccc1dc97f" 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="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2Fdysw9O64FZH59vtUBzYF%2FCodeForExtensions.png?alt=media&#x26;token=96ccdc95-e910-4721-be19-2a6ff019ca54" 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="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2FeS1x3whjYzQacSf5U1Xh%2FProviderID.png?alt=media&#x26;token=18b4d548-b730-495f-b80d-976e0b0c38f7" alt=""><figcaption><p>Provider ID</p></figcaption></figure>
