> For the complete documentation index, see [llms.txt](https://docs.mikopbx.com/mikopbx/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mikopbx.com/mikopbx/english/faq/outbound-routing/remove-all-special-characters-from-the-dialed-number.md).

# 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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.mikopbx.com/mikopbx/english/faq/outbound-routing/remove-all-special-characters-from-the-dialed-number.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
