# Choosing a provider when redirecting to a mobile

**Task**: Several providers A,B, C, D are installed on the PBX… The call arrives at MikoPBX through provider A. When dialing an employee's mobile number, the call must also go through provider A. **The provider must support more than one simultaneous call.**

1. Go to **System** → **System file customization**

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

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

<figure><img src="/files/R61HVwQh4xX75UmmNNdE" alt=""><figcaption><p>Extensions.conf file</p></figcaption></figure>

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

```php
[all-outgoing-custom]
exten => _[0-9*#+a-zA-Z][0-9*#+a-zA-Z]!,1,NoOp(-)
    same => n,NoOp("${PROVIDER_ID}" --- "${ONLY_THIS_PROVIDER}")
    same => n,Set(NEED_RETURN=${UNDEFINED})
    same => n,ExecIf($["${ONLY_THIS_PROVIDER}x" == "x"]?return)
    same => n,ExecIf($["${PROVIDER_ID}" != "${ONLY_THIS_PROVIDER}"]?Set(NEED_RETURN=1))
    same => n,ExecIf($["${PROVIDER_ID}" != "${ONLY_THIS_PROVIDER}"]?Set(ROUTFOUND=${UNDEFINED}))
    same => n,Return()
    
[add-trim-prefix-clid-custom]
exten => _[0-9*#+a-zA-Z][0-9*#+a-zA-Z]!,1,NoOp(start check blacklist)
    same => n,ExecIf($["${CHANNEL(channeltype)}" == "PJSIP" ]?Set(__ONLY_THIS_PROVIDER=${CHANNEL(endpoint)}))
    same => n,Return()
```

<figure><img src="/files/fKyI724bOXAjs5Ql9K8y" alt=""><figcaption></figcaption></figure>

4. For each provider, it is necessary to describe the [outbound routes](/mikopbx/english/manual/routing/outbound-routing.md)
5. Fill in the mobile numbers for employees ([see the documentation](/mikopbx/english/manual/telephony/extensions.md))
6. Limit the use of outgoing routes for users, use the "[User Groups](/mikopbx/english/modules/miko/module-users-groups.md)" module
7. Now, if an incoming call is sent to an employee's mobile phone, for example through the [IVR menu](/mikopbx/english/manual/telephony/ivr-menu.md), then the call will be sent through the same provider through which it came


---

# 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/incoming-routing/choosing-a-provider-when-redirecting-to-a-mobile.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.
