MikoPBX and FreePBX (PJSIP)
Instructions for integrating multiple PBX systems
Creating a Provider on MikoPBX
In MikoPBX, go to "Routing" → "Telephony Providers":

Add a new SIP provider by clicking "Connect SIP":

Fill in the following parameters:
Provider Name – any name
Account Type – Incoming Registration
Copy the "Username" and "Password"; you will need them later.

Creating a Trunk on FreePBX
In the FreePBX interface, go to "Connectivity" → "Trunks":

Add a new trunk of type "chan_pjsip".

Insert the MikoPBX provider’s login into the "Trunk Name" field:

Go to "pjsip Settings" → "Advanced":
From User – your MikoPBX provider login
Trust RPID/PAI – "yes"
Send RPID/PAI – "Send Remote-Party-ID header"

On the "Dialed Number Manipulation Rules" tab, define your dial patterns
Save the changes.

Registration Variants
Next, choose one of the two registration methods:
FreePBX Registers on MikoPBX

MikoPBX Registers on FreePBX
Set a password (complex, arbitrary). It must be the same on both MikoPBX and FreePBX.

In the MikoPBX “advanced settings” of your provider, under "Additional Parameters," include:
Save and apply the changes.

Routing Configuration
Define an outbound route (“Outbound Routing” article) in MikoPBX:

Define an inbound route (“Incoming Routing” article) in MikoPBX:

If necessary, define a separate route for each DID to direct calls to the correct destination (e.g., if a FreePBX user dials 202, route it to extension 202 on MikoPBX):

Go to "Connectivity" → "Inbound Routes" in FreePBX and define an inbound route:

Go to "Connectivity" → "Outbound Routes" in FreePBX and define an outbound route:

Subscriber Statuses
Sometimes users on one PBX need to see the statuses of users on the other PBX, for example when using BLF. To configure statuses:
MikoPBX
In the "System File Customization" section, add the following text to the end of "extensions.conf" on the first PBX:
List all internal extensions configured on FreePBX.
For each PBX, in the "System file customization" section, add the following text to the end of "pjsip.conf":
Replace "SIP-TRUNK-41C1B8B4" with your MikoPBX provider ID and "172.16.156.216" with the FreePBX address as appropriate.
FreePBX
Use the "Config Edit" module to edit files.
In "extensions_custom.conf," add all of MikoPBX’s internal extensions:
In "pjsip_custom.conf," add:
Replace "SIP-TRUNK-41C1B8B4" with your MikoPBX provider ID and "172.16.156.216" with the FreePBX address, as needed.
The outbound_auth=SIP-TRUNK-41C1B8B4 option applies only if FreePBX registers on MikoPBX. Status sharing was tested only under this registration scenario.
Last updated
Was this helpful?

