Merging two MikoPBX
Analysis of a case involving the integration of two MikoPBX systems
Last updated
Analysis of a case involving the integration of two MikoPBX systems
Last updated
In this example, a call center company has two offices: in Berlin and in Cologne. Each office uses a separate MikoPBX system:
PBX Berlin - 192.168.0.202 - all internal employee numbers are assigned using the pattern 2XX (e.g., 201, 202, 203, ...)
PBX Cologne - 192.168.0.201 - all internal employee numbers are assigned using the pattern 3XX (e.g., 301, 302, 303, ...)
For the purposes of this example, local IP addresses are used.
The goal is to merge these two PBX systems to create a unified internal numbering plan: employees in the Berlin office should be able to dial employees in the Cologne office using short numbers and vice versa.
A schematic representation of call routing is shown in the figure below.
For each PBX, you need to add a provider account. To create it, navigate to "Routing" → "Telephony Providers".
Create providers and fill in the connection parameters as follows:
The provider ID will appear in the address bar only after saving the provider. Temporarily, in the "Username" field, enter a derived value. After saving the provider, you can correct it.
In "Advanced Setting" → "Redefining SIP header "From"," check the box "Disable using the fromuser field." This needs to be done for both providers.
In "Advanced Setting" → "Advanced Options," add the following:
This option disables the "Non-working Hours" feature for all incoming calls through this provider.
Navigate to "Routing" → "Outbound Routing." Configure the outgoing routes as shown in the screenshot below:
For each PBX, add the same dialplan application that will redirect calls to internal numbers. In the "Modules" → "Dialplan Applications" section, add a new application with the following parameters:
"Name" - any name
"Extension to Call the Application" - any unique number
"Code Type" - Dialplan Asterisk
Go to the "Programme Code" tab and add the following code to handle calls:
Create an incoming route for each PBX. Navigate to "Routing" → "Incoming Routing," and add a new rule with the following parameters:
For security reasons, forwarding to external phone numbers is prohibited!
To remove this restriction, add the following code to the end of the "extensions.conf" file via the "System" → "Customize System Files" section:
This allows forwarding to 2XX numbers.
On the second PBX, to allow forwarding to 3XX numbers, add the following code to the end of the "extensions.conf" file via the "System" → "Customize System Files" section:
This allows forwarding to 3XX numbers.
In some cases, subscribers on one PBX need to know the statuses of subscribers on the other PBX. For example, when using:
BLF on telephone devices
"Telephony Panel for 1C"
To configure statuses:
On the first PBX, add the following code to the end of the extensions.conf file via the "Customize System Files" section:
For each PBX, add the following code to the end of the pjsip.conf file via the "Customize System Files" section:
Replace the placeholders <ID-Provider-Current-PBX>, <ID-Provider-Other-PBX>, and <SIP-Port-Other-PBX> with your actual values.
On the second PBX, add the following code to the end of the extensions.conf file via the "Customize System Files" section:
Ideally, each PBX should have its own range of SIP numbers that do not overlap. However, in practice, overlaps can occur. This might lead to issues when calling from one PBX to another: the call may drop.
You can work around this problem. On each PBX, add the following code to the end of the extensions.conf file via the "System" → "System file customization" section:
ID_PROVIDER is the identifier of the provider on the current PBX. You can find it in the browser's address bar:
By following these steps, we have successfully connected two PBXs! A green indicator next to the provider account confirms the successful connection of the two systems:
For PBX Berlin (192.168.0.202):
For PBX Cologne (192.168.0.201):
Similarly, you can connect three or even four PBX systems! Note that when connecting three PBXs, each PBX must have not one but two providers. This can be schematically represented as: