> 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/faq/outbound-routing/calls-to-emergency-numbers.md).

# Звонки на экстренные номера

{% hint style="success" %}
Необходимо иметь возможность звонить на экстренные номера 101, 102, 103, 112 и т.д.
{% endhint %}

1. Переходим в раздел **Маршрутизация** → **Исходящие маршруты**.

<figure><img src="https://3704471835-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MPK4TuzRBnP7rt8htho-887967055%2Fuploads%2Fgit-blob-7fb8ed39fc8261da84ee3748e1db16d6056b2dc7%2F1%20(2).png?alt=media" alt=""><figcaption><p>Раздел "<a href="/mikopbx/manual/routing/outbound-routing.md">Исходящие маршруты</a>"</p></figcaption></figure>

2. Добавляем новое правило

<figure><img src="https://3704471835-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MPK4TuzRBnP7rt8htho-887967055%2Fuploads%2Fgit-blob-5b0005bf677fd589b64c82cb3bdc422a18b35ff5%2F2%20(2).png?alt=media" alt=""><figcaption><p>Добавление нового правила</p></figcaption></figure>

3. Заполняем параметры как на скриншоте ниже:

<figure><img src="https://3704471835-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MPK4TuzRBnP7rt8htho-887967055%2Fuploads%2FHPKaXZrkKfYSgF46WIH1%2F3.png?alt=media&amp;token=0a8a4376-9295-4a79-939e-76acf14b6fc2" alt=""><figcaption><p>Параметры для правила "Звонки на экстренные номера"</p></figcaption></figure>

4. Звонки на экстренные номера направляете через произвольного провайдера. Провайдер **должен поддерживать** набор экстренных номеров. Приоритет данного правила должен быть наивысшим, т.е. в списке созданных исходящих маршрутов он должен быть описан первым.

<figure><img src="https://3704471835-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MPK4TuzRBnP7rt8htho-887967055%2Fuploads%2FByMr7q44mMOSk6mWW7ym%2F4.png?alt=media&amp;token=0b7375d7-27dd-462a-9359-a3a0d345edcb" alt=""><figcaption><p>Указание приоритета для звонков на экстренные номера</p></figcaption></figure>

5. Перейдите в раздел **Система** → **Кастомизация системных файлов**.

<figure><img src="https://3704471835-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MPK4TuzRBnP7rt8htho-887967055%2Fuploads%2FSIdPzbsPdI8ELsUTrNsg%2F5.png?alt=media&amp;token=7efa9bd1-8035-4e5c-b3e0-8f52c424f701" alt=""><figcaption><p>Раздел "Кастомизация системных файлов"</p></figcaption></figure>

6. Откройте для редактирования конфигурационный файл **extensions.conf**.

<figure><img src="https://3704471835-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MPK4TuzRBnP7rt8htho-887967055%2Fuploads%2FVz95pPWzfWcXgxA26S8H%2F6.png?alt=media&amp;token=934e30c4-dc87-413a-b907-840e12f1a7bd" alt=""><figcaption><p>Редактирование файла "extensions.conf"</p></figcaption></figure>

7. Установите режим «**Добавлять в конец файла**». В черное окно добавьте следующий фрагмент кода:

```php
[internal](+)
exten => _1XX,1,Goto(outgoing,${EXTEN},1)	
```

<figure><img src="https://3704471835-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MPK4TuzRBnP7rt8htho-887967055%2Fuploads%2FSPwwNvZxHTxWXsr7oZSo%2FnewForm.png?alt=media&amp;token=b105240f-0715-4247-8b5e-8ea5f2c95f98" alt=""><figcaption><p>Добавление кода в конец файла</p></figcaption></figure>

В выше приведенном фрагменте кода мы описали правила для всех трехзначных номеров, начинающихся с 1. Если нужно указать конкретные экстренные номера, то вместо выше представленного кода нужно вставить следующие строки:

```php
[internal](+)
exten => 112,1,Goto(outgoing,${EXTEN},1)
exten => 101,1,Goto(outgoing,${EXTEN},1)
exten => 102,1,Goto(outgoing,${EXTEN},1)
exten => 103,1,Goto(outgoing,${EXTEN},1)
```


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.mikopbx.com/mikopbx/faq/outbound-routing/calls-to-emergency-numbers.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
