Integration between OMniLeads & PBXs

Vamos a abordar éste ejemplo, utilizando Issabel-PBX (un proyecto de software libre bien conocido). Sin embargo, todo lo expuesto aquí puede ser extrapolado como configuración para cualquier PBX con soporte SIP:

_images/pbx_integration.png

Note

The steps described in this section are applicable both to the scheme where OMniLeads is on one exclusive host and the PBX on another, as well as to the case where OMniLeads runs in Docker coexisting within the same PBX host.

SIP trunk configuration on PBX

We select the creation of a new SIP trunk y complete the configuration with the following parameters

  • En caso de tener OMniLeads en un host y la IP-PBX en otro host dentro de la red LAN:
type=friend
host=XXX.XXX.XXX.OML
port=5161
disallow=all
allow=alaw
qualify=yes
secret=omnileads
fromuser=issabel
defaultuser=issabel
context=from-internal
  • In case you have OMniLeads in the Cloud and the IPPBX in another Host within the LAN network.-
type=friend
host=XXX.XXX.XXX.OML
port=5162
disallow=all
allow=alaw
qualify=yes
secret=omnileads
fromuser=issabel
defaultuser=issabel
context=from-internal
  • In case of executing OMniLeads with Docker inside of IPPBX base operating system
type=friend
host=XXX.XXX.XXX.PBX
port=5163
disallow=all
allow=alaw
qualify=yes
secret=issabelOML
fromuser=issabel
defaultuser=issabel
context=from-internal

Note that the only thing that changes between the different possibilities is the port parameter. This is related to the fact that in OML a SIP port is used for each type of scenario: LAN, NAT cloud or Docker.

_images/telephony_pjsip_LAN_pbx_issabel_trunk.png
_images/telephony_pjsip_LAN_pbx_issabel_trunk2.png

Once our SIP trunk is available, we go to check accessibility using the IPPBX Asterisk IPPBX

asterisk -rx 'sip show peers'

We should observe OK in the output line corresponding to the new SIP trunk, either with port 5161, 5162 or 5163.

_images/telephony_pjsip_LAN_pbx_issabel_trunk3.png

SIP trunk configuration on OMniLeads

Once generated the SIP trunk on IPPBX side, we proced with the generationwith its corresponding part on OMniLeads

  • In case of having OMniLeads in a Host and the IPPBX in another Host within the LAN network
type=wizard
transport=trunk-transport
accepts_registrations=no
sends_auth=yes
sends_registrations=no
accepts_auth=yes
endpoint/rtp_symmetric=no
endpoint/force_rport=no
endpoint/rewrite_contact=no
endpoint/timers=yes
aor/qualify_frequency=60
endpoint/allow=alaw,ulaw
endpoint/dtmf_mode=rfc4733
endpoint/context=from-pbx
remote_hosts=XXX.XXX.XXX.PBX:5060
inbound_auth/username=issabel
inbound_auth/password=issabelOML
outbound_auth/username=omnileads
outbound_auth/password=issabelOML
  • In case you have OMniLeads in the Cloud and the IPPBX in another Host within the LAN network.
type=wizard
transport=trunk-nat-transport
accepts_registrations=no
sends_auth=yes
sends_registrations=no
accepts_auth=yes
endpoint/rtp_symmetric=yes
endpoint/force_rport=yes
endpoint/rewrite_contact=no
endpoint/timers=yes
aor/qualify_frequency=60
endpoint/allow=alaw,ulaw
endpoint/dtmf_mode=rfc4733
endpoint/context=from-pbx
remote_hosts=XXX.XXX.XXX.PBX:5060
inbound_auth/username=issabel
inbound_auth/password=issabelOML
outbound_auth/username=omnileads
outbound_auth/password=issabelOML
  • In case of execution of OMniLeas with Docker inside of the IPPBX base operating system, we used:
type=wizard
transport=trunk-nat-docker-transport
accepts_registrations=no
sends_auth=yes
sends_registrations=no
accepts_auth=yes
endpoint/rtp_symmetric=yes
endpoint/force_rport=yes
endpoint/rewrite_contact=yes
endpoint/timers=yes
aor/qualify_frequency=60
endpoint/allow=alaw,ulaw
endpoint/dtmf_mode=rfc4733
endpoint/context=from-pbx
endpoint/rtp_symmetric=yes
remote_hosts=XXX.XXX.XXX.PBX:5060
inbound_auth/username=issabel
inbound_auth/password=issabelOML
outbound_auth/username=omnileads
outbound_auth/password=issabelOML

Once efective our trunk, we pass to check if Issable is accessible from OMniLeads, using OMniLeads Asterisk CLI.

asterisk -rx 'pjsip show endpoints'

Note

If we are executing OMniLeads in Docker, for access the container executing we must execute the following command: docker exec -it oml-asterisk-prodenv, then we can start the CLI

The command output should be similar to the figure:

_images/telephony_pjsip_LAN_pbx_oml_trunk2.png

At this point, exists a SIP trunk between bot phone systems, pending the calls routing configuration between both systems

Finally we emphasize on make relations between parameters onIssabel and OMniLeads SIP trunks

A picture is worth a thousand words:

_images/telephony_pjsip_LAN_pbx_trunk_relationship.png

How send calls from IP-PBX to OMniLeads

Now we exposed a way to connect the IP-PBX resources (inbound routes, IVRs, announcements, extensions, etc.) with OMniLeads. It means, that, for example from one option of the company main IVR can derive to an OMniLeads inbound campaing, or that one extension can contact or transfer a call to an OMniLeads inbound campaign or OMniLeads agent.

This is completely viable using the IP-PBX custom extensions, in ourexample case: Issabel-PBX

_images/pbx_integration_pbx2oml.png

Calls to OMniLeads inbound routes

Now we present the example where the user want to create a custom extension in which, when call it from another extension or invoke it from some PBX object(IVR, inbound route, announcement, etc) create a channel against OMniLeads, particularly pointing to an inbound route which can at the same time, send the call to an inbound campaign.

For one side, we have an inbound route in OMniLeas, pointing for instance, to an inbound campaign:

_images/pbx_integration_inr_oml.png

Having in mind that the DID choosen was 098098, in the IPPBX we mustgenerate an extension with type custom, where the Dial stringshould point to the OMniLeads SIP trunk, and the sent number should be 098098.

_images/pbx_integration_exten_to_inr.png

In the figure we mark three elements:

  1. The extension number, could be different to the number sent to OMniLeads(3) . It can be every numner, only making sure the Dial extension from the custom extension matches with the DID number from the OML inbound route (098098 for our example)
  2. The trunk where the custom extension points. This values must matches with the field Trunk Name on the SIP trunk against OMniLeads generated on the IP-IPBX
  3. The number to send by the trunk must match with the DID on the OMniLeads inbound route

This way every IPPBX extension could call o transfer a call to this custom extension and will be sent to the related inbound route on OMniLeads for finally connect over an inbound campaign or the assigned element as destination of the OMniLeads inbound route

As a final mention, we want to make clear that we can have in the IPPBXmany custom extensions pointing to different OMniLeads inbound routesas we like !

Calls to OMniLeads agents

From the figure, let’s take the agent Adrian Belew. Note that its ID is 1 and its SIP number is 1006. For that reason at the momment to make the number to send in the Dial string of the IPPBX custom extension we must concatenate the SIP Number with its Agent ID; in our example will be 10061 for agent Adrian Belew and 10072 for agent Mikael Ackerfeldt

_images/pbx_integration_agents_oml.png

When generating the configuration in the PBX to be able to send calls to the agents, we have two alternatives

  1. 1- Use an outgoing route from the PBX to OMniLeads as indicated in the following figure
_images/pbx_integration_agents_oml_outr.png

In this case, any extension of the PBX can generate a call to an agent by dialing the combination mentioned in the previous paragraph.

  1. Generate a custom extensions for each OML agent, that is, the Dial chain of the custom extension will no longer be made up of an OMniLeads incoming route DID as it was in the case of linking with incoming routes, but it will be a combination of the ID of the agent and his SIP number.

As indicated in the figure

_images/pbx_integration_exten_to_agent.png

In the figure we mark three elements:

  1. The extension number, could be different to the number sent to OMniLeads(3) . It can be every numner, only making sure the Dial extension from the custom extension matches with the concatenation of the ID agent and its SIP number (10061 for our example)
  2. The trunk where the custom extension points. This values must matches with the field Trunk Name on the SIP trunk against OMniLeads generated on the IP-IPBX
  3. The number to send by the trunk must to match with the concatenation of the ID agent and its SIP number (10061 for our example)

We must to repeat the procedure for every OMniLeads agent that want to customize there extension in the PBX

Either of the two alternatives are viable and you will get the desired result.

Calls from OMniLeads to the PSTN and the IPPBX resources

Finally we are going to generate the outboung routing inside OMniLeadsthat allow agents and diales raise calls to the PSTN, and , at the same timeallow agents to call or transfer calls to the IPPBX resources like extensions, ring, groups, queues calls, etc

_images/pbx_integration_oml2pstn.png _images/pbx_integration_oml2pbx.png

Simply we must add a new outbound route that points to the trunk to the IPPBX

_images/pbx_integration_oml_outr.png

This way the integration is completely functional and both systems can make all types of calls and interactions