# Forwarding incoming calls from the PBX

## Forwarding incoming calls from the PBX to OMniLeads

This section illustrates how to configure OMniLeads and an Asterisk-based PBX to route calls from the PBX to OMniLeads.

<figure><img src="https://documentacion-omnileads.readthedocs.io/es/latest/_images/campaigns_in_route_frompbx_ivr.png" alt=""><figcaption></figcaption></figure>

Figure 1: Call forwarding from PBX \
\
We start from the fact that there is a SIP trunk that links OMniLeads with the PBX. \
The first thing that must be defined is the number assigned to the incoming route that will process the call from the PBX to an OMniLeads destination, since this number (route DID) must be dialed by the PBX to send calls from any module (extensions, IVRs, incoming routes, follow me, etc.) of said PBX, to the destination configured in the OMniLeads route:

<figure><img src="https://content.gitbook.com/content/7qGfc9c0eCArZb6QcwvW/blobs/woNBoAsdHk7jo7SjJUkJ/image.png" alt=""><figcaption></figcaption></figure>

The idea of creating an extension pointing towards OMniLeads is illustrated in figures 3 and 4: If our Asterisk PBX has a web configuration interface, we can simply generate a *New custom extension* and make it point to *SIP/trunkomnileads/123456*, where "trunkomnileads" is the name configured in the PBX to designate the SIP trunk with OMniLeads.&#x20;

Using the route with the DID *123456* as shown in the previous figure, the Asterisk PBX should generate calls through the SIP trunk to the mentioned number whenever any PBX resource needs to reach the *123456* destination of OMniLeads. \_Figure 2: Incoming route parameters

<figure><img src="https://documentacion-omnileads.readthedocs.io/es/latest/_images/campaigns_in_route_frompbx2.png" alt=""><figcaption></figcaption></figure>

Figure 3: Custom extension for OMniLeads Although the extension in the PBX can have any number (2222 was used as an example), the important thing is to send 123456 (in our example) to OMniLeads, as highlighted in the following figure:

<figure><img src="https://documentacion-omnileads.readthedocs.io/es/latest/_images/campaigns_in_route_frompbx3.png" alt=""><figcaption></figcaption></figure>

Figure 4: Custom extension for OMniLeads Once the extension is available in the PBX, it is only a matter of invoking it from any module of the PBX, such as an IVR:

<figure><img src="https://documentacion-omnileads.readthedocs.io/es/latest/_images/campaigns_in_route_frompbx4.png" alt=""><figcaption></figcaption></figure>

Figure 5: Forwarding to OMniLeads from IVR Although the figure above exemplifies the forwarding of calls to incoming OMniLeads campaigns from a PBX IVR, we can conclude that PBX extensions can also dial or transfer calls to OMniLeads, and that PBX modules such as time conditions, follow me, incoming routes, etc. can invoke a custom PBX extension that forwards calls to OMniLeads.


---

# 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.omnileads.net/english/contact-campaigns/inbound-campaign/forwarding-incoming-calls-from-the-pbx.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.
