How to Connect MyPBX to Trixbox

This application note shows how to connect Trixbox to MyPBX using SIP P2P(Peer to Peer) mode, which will be working fine for: (In the above graph, VOIP Trunking means P2P mode.)

1. Intercommunication between Trixbox and MyPBX
2. Make calls using Trixbox’s extension through the GSM/PSTN/BRI trunks of MyPBX.
3. Receive calls from GSM/PSTN/BRI trunks of MyPBX at Trixbox.

Description: 
IP address of MyPBX: 192.168.5.146
IP address of Trixbox: 192.168.5.210

Intercommunication between Trixbox and MyPBX

Description: 
All the extensions under MyPBX are in the format 5XX.
All the extensions under MyPBX are in the format 3XX.

Note: For SIP P2P mode mode connection, you don’t need to set up inbound routes for any side.

1. MyPBX Configuration

Step 1: Set up SIP P2P mode in MyPBX, connect to Trixbox.
Path: PBX--Trunks--VoIP trunk--Add Service Provider

                                        Figure 1 Create a SIP P2P mode in MyPBX

After creating SIP P2P mode, we can check the status of this trunk; it should be OK (green).
Path: Status--Trunk Status

                                                       Figure 2 Trunk Status in MyPBX

Step 2: Set up Outbound Route in MyPBX.

Dial pattern: 3XX, which means all 3-digit calls starting with 3 will be sent to Trixbox via this SIP P2P mode.
Path: PBX--Outbound Call Control--Outbound Routes--Add Outbound Route

                                         Figure 3 Outbound route for SIP P2P mode in MyPBX

2.Trixbox Configuration

Step 1: Set up SIP P2P mode in Trixbox, connect to MyPBX.

1) PBX--Admin--Set up Trunks--Add SIP Trunk

                                            Figure 4 Add SIP P2P mode

2) Enter the info of trunk for PEER Details:

host=192.168.4.146
type=peer
context=from-trunk
qualify=yes
disallow=all
allow=ulaw,alaw,gsm

                                                              Figure 5 Enter PEER Details

3) Click “Submit Changes” and “Apply Configuration Changes”.

                                                Figure 6 Save and apply changes

4) Click “Continue with reload” in the pop-up window.

                                 Figure 7 Apply Configuration Changes

5) After creating SIP P2P mode, we can check the status of this trunk, it should be “OK”.
Path: PBX--Admin--Tools--Asterisk CLI--Enter the command “sip show peers” and click “Execute”

                                           Figure 8 SIP P2P mode status in Trixbox

Step 2: Set up outbound routes in Trixbox.

Dial pattern: 3XX, which means all 3-digit calls starting with 5 will be sent to MyPBX via the SIP P2P mode.
Path: PBX Admin--Set up Outbound Routes

                                        Figure 9 Outbound route for SIP P2P mode in Trixbox

Click “Submit Changes” and “Apply Configuration Changes”.

3.Test call

Register an IP phone to MyPBX with extension 500.
Register an IP phone to Trixbox with extension 300.
Use 500 to dial 300. You can see 300 is ringing and you can answer the calls
Use 300 to dial 500. You can see 500 is ringing and you can answer the calls

Make calls using Trixbox’s extension via SIP P2P mode

The SIP P2P mode connection is finished in the last step, so we can start to configure rule to make calls via PSTN/GSM/BRI trunks of MyPBX using Trixbox’s extension.

Description: 
PSTN trunk of MyPBX: 5503301
GSM trunk of MyPBX: 15060748304
BRI trunk of MyPBX: 5503300

1.MyPBX Configuration

Step 1: Check the status of GSM/PSTN/BRI trunk.
Path: Status--Trunk Status

                                                         Figure 10 Trunk Status

Step 2: Set up Outbound Route for GSM/PSTN/BRI trunk to make calls in MyPBX.

Path:PBX--Outbound Call Control--Outbound Routes--Add Outbound Route.

1) Create an outbound route for GSM/PSTN/BRI trunk. In this example, all calls starting with 9 will be sent out via the GSM/PSTN/BRI trunk of MyPBX.


                                    Figure 11 Outbound route for SIP P2P mode in MyPBX

Step 3: Set up 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 SIP P2P mode will be sent out through GSM/PSTN trunk.

Note: We must configure DID number of this inbound route to match the dial pattern of outbound routes which are used to make call to GSM/PSTN trunk of MyPBX in Trixbox, however, this dial pattern must match the dial pattern of the outbound route for GSM/PSTN trunk in MyPBX. So, we should set the DID number to “9.”.
Please place this route at the top.

                                 Figure 12 Set up Inbound Route for the SIP P2P mode

2. Trixbox Configuration

Step 1: Set up outbound routes in Trixbox.

Path: PBX--Outbound Routes--Add Route
Note: This dial pattern must match the dial pattern of the outbound route for GSM/PSTN trunk in MyPBX.

                                       Figure 13 Outbound route for SIP P2P mode in Trixbox

3.Test Call

Use Trixbox’s extension to dial 913800000000, then mobile phone 13800000000 will ringing and you can answer the calls.

Receive calls from GSM/PSTN/BRI trunks of MyPBX at Trixbox

The SIP P2P mode connection is finished in the previous step, so we can start to configure a rule to route the incoming calls to Trixbox side.

1. MyPBX Configuration

Step 1: Set up an outbound route for this SIP P2P mode to Trixbox.

Note: In this example, we set up the dial pattern is “X.”. We can dial any number via this SIP P2P mode. And place this route to the end.

                                     Figure 14 Outbound route for SIP P2P mode in MyPBX

The order of outbound routes:

                                                   Figure 15 Order

Step 2: Create an inbound route for GSM/PSTN/BRI trunk, and choose the outbound route we just created as the “Destination”, so that the incoming calls from GSM/PSTN/BRI trunk will be sent to Trixbox via the SIP P2P mode.

Note: Since GSM/PSTN trunks have no DID number, we need to set up a DID number for them.
1) Create an inbound route for GSM trunk.
DID number: 15060748304

                                    Figure 16 Inbound route for GSM trunk

2) Create an inbound route for PSTN trunk.
DID number: 5503301

                                   Figure 17 Inbound route for PSTN trunk

3) Create an inbound route for PRI trunk.

                                    Figure 18 Inbound route for PRI trunk

2. Trixbox Configuration

In Trixbox side, we need create inbound route for the SIP P2P mode so that we can dial in, in this example, we choose IVR as the destination (generally).
PBX Admin Set up Inbound Routes

1) Create an inbound route for GSM trunk of MyPBX. Then DID Number must match that of MyPBX, so we set DID Number of this route to 15060748304.

                           Figure 19 Inbound route for GSM in Trixbox

2) Create an inbound route for PSTN trunk of MyPBX. Then DID Number must match that of MyPBX, so we set DID Number of this route to 5503301.

                                       Figure 20 Inbound route for PSTN in Trixbox

3) Create an inbound route for BRI trunk of MyPBX. Then DID Number must match that of MyPBX, so we set DID Number of this route to 5503300.

                                           Figure 21 Inbound route for BRI in Trixbox

3. Test call

Use mobile phone dial the GSM trunk’s number 15060748304 / the PSTN trunk’s number 5503301/ the BRI trunk’s number 5503300, then it will reach the IVR of Trixbox.

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.