# Убрать все спецсимволы из набираемого номера

Некоторые софтфоны / CTI решения при наборе передают номер телефона с спецсимволами, к примеру **+7(495) 229-3042**.

Такой вызов с большой вероятностью не пройдет, будет завершен по ошибке.

1. Для решения задачи «фильтрации» символов следует описать дополнительный контекст через меню [Кастомизация системных файлов](https://wiki.mikopbx.ru/custom-files)

<figure><img src="/files/CSVmRjAVgBn9mvcH161V" alt=""><figcaption><p>Окно "Кастомизация системных файлов"</p></figcaption></figure>

2. Править будем файл **extensions.conf**.

<figure><img src="/files/bFUJRA63LCVHXd7omPg0" alt=""><figcaption><p>Файл 'Extensions.conf"</p></figcaption></figure>

3. Добавьте в конец файла следующий контекст:

```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/3C9h8LPewqI9k4vyAXL8" alt=""><figcaption><p>Добавление кода в конец файла</p></figcaption></figure>

{% hint style="success" %}
Согласно описанному правилу, в набираемом номере останутся только символы \*#1234567890
{% 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/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.
