Introduction
MyPBX can acts as a FXO2VoIP gateway or a VoIP2FXO gateway. As a FXO2VoIP Gateway, it will helps to extend a PABX's VoIP trunk. Meanwhile, MyPBX will extend an IPPBX's PSTN trunk if it is used as a VoIP2FXO gateway.
About Part 1--Setup MyPBX to act as a FXO2VoIP gateway, Please refer the below link:https://support.yeastar.com/hc/en-us/articles/218006437
Part 2. Setup MyPBX to act as a VoIP2FXO gateway
Below are the steps to configure IPPBX and MyPBX. As we know, some IPPBX only work on the software level, they cannot support physical lines such as PSTN lines. For this solution, we can configure MyPBX as an analog Gateway, so that we can dial out using IPPBX’s extensions via the PSTN trunk of MyPBX.
In this manual, we take Elastix for example.
We have two modes for this solution: VoIP Trunk mode and VoIP P2P mode mode.
You can choose one mode to configure.
Elastix IP: 192.168.5.235
MyPBX IP: 192.168.4.148
Flowchart for connection:
VoIP Trunk Mode
1. Make calls using IPPBX’s extension via PSTN trunk of MyPBX
1.1 MyPBX Configuration
1) Create an extension account in MyPBX. Here we take extension 300 for example.
Figure 1 Extension Account in MyPBX
2) Create an outbound route for the PSTN trunk, and set to allow extension 300 call out via this outbound route.
Figure 2 Outbound Route for PSTN Trunk on MyPBX
1.2 IPPBX Configuration
1) Set up VoIP Trunk in Elastix, register to MyPBX according to the information of extension 300. In this case, Elastix will work as an extension of MyPBX. All extensions of Elastix calling from this trunk will be regarded as calling from extension 300 of MyPBX.
Figure 3 VoIP Trunk of Elastix
2) Create an outbound route for VoIP trunk in Elastix.
Figure 4 Outbound Route of Elastix
2. Receive calls from PSTN trunk of MyPBX at IPPBX
2.1 MyPBX Configuration
1) Create an inbound route for the PSTN trunk, and set the inbound route destination as the extension 300.
Figure 5 Inbound Route for PSTN Trunk in MyPBX
2.2 Elastix Configuration
1) Configure Elastix Inbound Route to a destination that you need, in general, we set it to IVR.
VoIP P2P mode
1. Make calls using IPPBX’s extension via PSTN trunk of MyPBX
1.1 IPPBX Configuration
1) Set up SIP P2P mode in Elastix, connect to MyPBX.
Path: PBX -> Trunks -> Add SIP Trunk
Figure 6 SIP P2P mode in Elastix
2) Set up Outbound Route in Elastix. All calls from extensions of Elastix will be sent to MyPBX via the SIP P2P mode.
Note: choose the SIP P2P mode we created in the last step.
Figure 7 Outbound Route in Elastix
1.2 MyPBX Configuration
1) Set up SIP P2P mode in MyPBX, connect to Elastix.
Path:PBX -> Trunks -> VoIP Trunk -> Service Provider -> Add Service Provider
Figure 8 SIP P2P mode on MyPBX
After creating SIP P2P mode, we can check the status of this trunk, it should be OK (green).
Path: Status -> Line Status -> Trunk Status
Figure 9 Trunks Status
2) Create an outbound route for PSTN trunk in MyPBX.
Figure 10 Outbound Route for PSTN Trunk
3) Create an inbound route for SIP P2P mode in MyPBX, and choose the outbound route we created in the last step as destination, so that the calls via this P2P mode will be sent out through PSTN trunk.
Figure 11 Inbound Route for SIP P2P mode
2. Receive calls from PSTN trunk of MyPBX at IPPBX
The SIP P2P mode connection is finished, so we can start to configure a rule to route the incoming calls to Elastix side.
2.1 MyPBX Configuration
1) Create an outbound route for the SIP P2P mode.
Figure 12 Outbound Route for SIP P2P mode on MyPBX
2) Create an inbound route for the PSTN trunk, and choose the outbound route we created in previous step so that the incoming calls from PSTN trunk will be sent to Elastix through the SIP P2P mode.
Note: Since PSTN trunks have no DID number, we need to setup a DID number for each PSTN trunk.
In this guide, we create an inbound route and choose pstn1, the number of pstn1 is 550330, so we set the DID number 5503301. For the other PSTN trunks, you need to create other inbound routes and set the corresponding DID numbers.
Figure 13 Inbound Route on MyPBX
2.2 IPPBX Configuration
In Elastix side, we need to create inbound route for the SIP P2P mode so that we can dial in. In this guide, we choose IVR as the destination, which is the general setting.
Figure 14 Inbound Route in Elastix
0 Comments