How to Connect MyPBX to 3CX

This application note shows how to connect 3CX to MyPBX using SIP P2P(Peer to Peer) mode. (In the above graph, VOIP Trunking means P2P mode.)

Intercommunication between 3CX and MyPBX

Description:
IP of MyPBX: 192.168.4.146
IP of 3CX: 192.168.5.221
All the extensions under MyPBX are in the format 5XX
All the extensions under 3CX are in the format 1XX

1. MyPBX Configuration

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

                                         Figure 1 Add 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


Step 2: Set up Outbound Route in MyPBX.

Dial Pattern: 1XX, which means all 3-digit number starting with 1 will be sent to 3CX via the SIP P2P mode.
Path: PBX --Outbound Call Control--Outbound Routes--Add Outbound Route

                                 Figure 3 Outbound route for “3CX” SIP P2P mode in MyPBX

2. 3CX Configuration

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

1) Add VOIP Provider Wizard (Type the Name of Provider Choose “Generic VoIP Provider”, Click “Next”.)

                                                Figure 4 Add VOIP Provider Wizard

2) Type the IP address of MyPBX Click “Next”.

                                                     Figure 5 Enter the IP address of MyPBX

3) Enter External Number and Authentication ID (you can enter any number you want except the number similar to extension number). And click “Next”.

Note: The number of “Maximum simultaneous calls” is four in the free version of 3CX. You can also enter the number that you bought from 3CX.

                                                       Figure 6

4) Configure the default destination of inbound route to IVR for The SIP P2P mode and click “Next”.

Note: If you want to change the inbound route, you can double click trunk you want on the Ports/Trunk Status page after creating SIP P2P mode.

                                                           Figure 7

5) Create an outbound call rule for this SIP P2P mode and click “Finish”.
In this example, we allow 3-digit calls starting with 5 dialing from 3CX’s extensions 100-150 to be sent to MyPBX via this SIP P2P mode.

Here are the details:
Calls to number starting with (prefix): the prefix of number we dialed, in this example, we need dial extension number of MyPBX, which starts with 5, so it’s 5 here.
Calls from extensions: the extension ranges in 3CX that are allowed to dial via this trunk.
Calls to numbers with a length of: input the length of number you want.

Note: prefix digit is included here.

Route->strip Digits: the default value is 1; we can set it to 0, so that the full number you dialed will be sent to MyPBX via this trunk.

Note: If you want to change the outbound route, you can double click the outbound rules you want on the outbound rules page.

                                            Figure 8 Create an outbound route in 3CX

6) Configure “Require registration for” on the edit VOIP Provider page. Since the type of the trunk connected to MyPBX is “peer to peer”, we need to set the “Require registration for” to “Do not require”.

                                                                  Figure 9 Edit VOIP Providers

After creating SIP P2P mode, we can check the status of this trunk on the Ports/Trunks Status page; it should be registered (idle) (green).

                                                           Figure 10 Trunks Status

Step 2: Set up extensions of MyPBX route to that of 3CX.

You can choose any of the following methods to set up.

The first method

Configure SIP ID of extension on the extension page.
Enter the corresponding extension number to the SIP ID field on the other page.

                                                              Figure 11 extension
3. Test call:

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

The second method

Step 1: Add DID and connect to the corresponding extension on the inbound rules page. In this case, we create DID for extension 100, so we set up the DID number is 100 and connect to extension 100.

Note: if you have followed the first method, please clear the SIP ID on the Edit Extension page first before configuring.

                                                Figure 12 Add DID for SIP P2P mode

Step 2: Set up source ID on the VoIP Providers page.

                                                         Figure 13 Source ID
Test call:

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

Make calls using 3CX’s extension

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

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

1. MyPBX Configuration

Step 1: Check the status of GSM/PSTN/BRI trunk.

Path: Status--Trunk Status

                                                           Figure 14 Trunks

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 15 Outbound route for GSM/PSTN/BRI trunks in MyPBX

Step 3: Set up Inbound Route for SIP P2P mode in MyPBX, and choose the outbound route we just created as the “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 calls to GSM/PSTN trunk of MyPBX in 3CX, 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 16 Inbound route for this SIP P2P mode

2. 3CX Configuration

Step 1: Set up outbound routes in 3CX.

Note: This dial pattern must match the dial pattern of the outbound route for GSM/PSTN trunk in MyPBX.

                                                     Figure 17 Outbound route in 3CX

3. Test call

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


Receive calls at 3CX from MyPBX’s trunks

The SIP P2P mode connection is finished in the previous step, so we can start to configure rules to route the incoming calls to 3CX side.

1. MyPBX Configuration

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

Note: In this example, we set up the dial pattern is “X.”, which means we can dial any number via this SIP P2P mode. But please place this route at the bottom.

                                      Figure 18 outbound route for SIP P2P mode in MyPBX

The order of outbound routes:

                                                                Figure 19 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 3CX 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 20 Inbound route for GSM trunk

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

                                              Figure 21 Inbound route for PSTN trunk

3) Create an inbound route for BRI trunk.


                                            Figure 22 Inbound route for BRI trunk

2. 3CX Configuration

Create DID number and set up the destination to IVR for PSTN/GSM/BRI trunks of MyPBX at 3CX.

1) Create DID number and set up the destination to IVR for GSM trunks of MyPBX.

Note: The DID number must match that of GSM we configured previously. So we set up the DID number as 15060748304.

                                       Figure 23 Create DID number for GSM trunk of MyPBX

2) Create DID number and set up the destination to IVR for PSTN trunks of MyPBX.

Note: The DID number must match that of PSTN we configured previously. So we set up the DID number as 5503301.


                                      Figure 24 Create DID number for PSTN trunk of MyPBX

3) Create DID number and set up the destination to IVR for BRI trunks of MyPBX.

Note: The DID number must match that of BRI. In this case, the DID number of BRI trunk is 5503300, so we set up the DID number as 5503300.

                                      Figure 25 Create DID number for PSTN trunk of MyPBX

4) Set up Source ID on the VoIP Providers page.

                                                    Figure 26 Source ID

3. Test call

Use mobile phone to dial 5503300 via PSTN trunk, it will reach 3CX’s IVR.
Use mobile phone to dial 1395243184 via GSM trunk, it will reach 3CX’s IVR.
Use mobile phone to call into MyPBX via BRI trunk, it will reach 3CX’s IVR.

Have more questions? Submit a request

1 Comments

Please sign in to leave a comment.