# Calls to emergency numbers

{% hint style="success" %}
It is necessary to be able to call emergency numbers 112, 1xx
{% endhint %}

1. Go to the **Routing** → **Outbound routes** section.

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2F28jV0oXIFtYCx7rxpyub%2FOutboubdRoutingSection.png?alt=media&#x26;token=bdeb8836-035f-484a-9d05-d5358132a750" alt=""><figcaption><p>Outbound routing section</p></figcaption></figure>

2. Adding a new rule

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2FwNJ6dMxejLwMxgOBFFAP%2FNewRuleForOutoundRouting.png?alt=media&#x26;token=5ca4aa57-74a5-4fdd-a3b7-6fb8d1cb56ff" alt=""><figcaption><p>New rule</p></figcaption></figure>

3. Fill in the parameters as in the screenshot below:

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2Fr7PzmPju0wgnYRXy0omg%2FSettingsForOutboundRoute.png?alt=media&#x26;token=445e63aa-e20d-46d1-b30b-8198d5c40cb8" alt=""><figcaption><p>Parameters for emergency calls rule</p></figcaption></figure>

4. You direct calls to emergency numbers through an arbitrary provider. The provider **must support** dialing emergency numbers. The priority of this rule should be the highest, i.e. it should be described first in the list of created outgoing routes.

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2Fzq3H2F1ixYmZnxR3Saae%2FPriority.png?alt=media&#x26;token=7ae5bab7-6f6e-4c25-997d-1807083270c7" alt=""><figcaption><p>Priority of outbound routing</p></figcaption></figure>

5. Go to **System** → S**ystem file customization**

<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 ccustomization section </p></figcaption></figure>

6. Open the **extensions.conf** configuration file for editing.

<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><p>extensions.conf file</p></figcaption></figure>

7. Set the "**Add to end of file**" mode. In the black window, add the following code snippet:

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

<figure><img src="https://835495363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsZ8acWnNlSalIHQjMFu1%2Fuploads%2FBDuErpph4gyU13cFuBnJ%2FCodeForExtensionsConf.png?alt=media&#x26;token=d16efd64-3671-44be-ae4b-86874b8bd1ff" alt=""><figcaption><p>Code for extensions.conf</p></figcaption></figure>

In the above code snippet, we described the rules for all three-digit numbers starting with 1. If you need to specify specific emergency numbers, then instead of the above code, you need to insert the following lines:

```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)
```
