# 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](/mikopbx/english/manual/system/custom-files.md) menu

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

2. We will edit the **extensions.conf** file.

<figure><img src="/files/R61HVwQh4xX75UmmNNdE" 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="/files/cddcaqszxC9gl7i6HTe3" alt=""><figcaption></figcaption></figure>

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


---

# 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/outbound-routing/remove-all-special-characters-from-the-dialed-number.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.
