Introduction:

When the FXO gateway and the 3CX server are not on the same local network, if the FXO gateway directly registers remotely to the 3CX server, it is necessary to open SIP and RTP ports on the firewall for the FXO gateway. This makes the communication of the FXO gateway insecure. If no security configurations are applied to the gateway, it is highly susceptible to call fraud. Moreover, in many cases, the FXO gateway does not have a real public IP address, making it impossible to complete port forwarding settings. In such scenarios, we can attempt to install a 3CX SBC on a host( or virtual machine), or deploy an SBC phone within the same local network as the FXO gateway, enabling the FXO gateway to register to the 3CX server through the 3CX SBC or SBC phone.

 

Below are the relevant steps for registering FXO gateway to the 3CX server via 3CX SBC. It is assumed that 3CX SBC has already been installed locally on the FXO gateway side.

 

First, let us finish the configuration on the 3CX server side:

1. Create the sip trunk for the FXO gateway:

Main trunk number can be same as Authentication ID.

Add all the pstn line numbers as DID.

Change the number of sim calls per trunk as 8, which is the max sim calls of 3CX license.

After we save the setting, it will go to the page of outbound rule:

Please choose the corresponding department, and then save the setting. It means any outgoing calls from the selected department will be sent to the FXO gateway.

2. Send the incoming calls from different pstn lines to the corresponding destinations:

If the destination is extension, please choose the DID in the corresponding extension setting:

It means when any external user dials this number 28805XXX, extension 1000 will ring directly.

What is more, if the destination is IVR or call queue, please choose DID in the digital receptionist or call queue too.

 

Next, let us finish the configuration on the FXO gateway side:

1.Set the FXO gateway as a static IP:

2.Input the account into the FXO gateway:

 

3.Set the routing rule:

IP[192.168.1.10:5060]   x   route    FXO   1

It means any outgoing calls from the 3CX SBC(192.168.1.10) will go out through FXO 1. Here we assume the pstn line is connected to FXO 1, we can confirm it in the call status(Line status is Idle).

4.Set the FXO 1:

Please input the pstn line number as the binding number which is same as DID in 3CX server.

This means that the destination number of any incoming calls from FXO1 will be changed to the PSTN number, which is also the DID number of 3CX server.

 

Finally, we can check the registration status of the gateway on the 3CX server.

If it shows green, it means the gateway has registered successfully, and you can proceed to test making a call.

If it shows red, you may need to review the gateway settings and try restarting the gateway to ensure it successfully registers to the 3CX server.