# Remove all special characters from the dialed number

Some softphones / CTI solutions transmit a phone number with special characters when dialing, for example **+371(2) 229-3042**

Such a call is very likely to fail, it will be completed by mistake.

1. To solve the problem of "filtering" characters, an additional context should be described through the [Customization of system files](https://docs.mikopbx.com/mikopbx/english/manual/system/custom-files) menu

<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. We will edit the **extensions.conf** file.

<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></figcaption></figure>

3. Add the following context to the end of the file:

```php
[all_peers-custom]

exten => s,1,NoOp(Cleaning dst number)
	same => n,Set(cleanNumber=${FILTER(\*\#1234567890,${EXTEN})})
	same => n,ExecIf($["${EXTEN}" != "${cleanNumber}"]?Goto(all_peers,${cleanNumber},1))
	same => n,return
```

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2FomYjflAGMnZ4L4A5YmYM%2FcodeForExtensions.png?alt=media&#x26;token=6cc7bff2-2ab6-403d-953d-c90524941c62" alt=""><figcaption></figcaption></figure>

{% hint style="success" %}
According to the described rule, only the characters \*#1234567890 will remain in the dialed number
{% endhint %}
