Configuring Grandstream FXO VoIP Gateway
Supported Model: Grandstream GXW4104 FXO
After you familiarize yourself with the basic concept of SIP Trunks (https://www.3cx.com/docs/manual/sip-trunks/) proceed to add a PSTN gateway to your PBX. The template is designed to work with the GXW4104 model only.
- The device must be local to 3CX, in the same subnet and/or locally routed subnet (including site to site VPN)
Step 1: Prepare your Grandstream Device
- Connect the network cable using the “WAN” port of the gateway and power it on.
- Factory Reset your device. This is done by pressing the reset button on the device for 10 seconds, while power on. Allow a few minutes for the device to reset and reboot.
- Next you need to find the IP and MAC Address of your device on your network:
- Download the Grandstream IP Discovery Tool from here.
- Extract it on a PC on the same WAN as the Grandstream device
- Run the executable file, select the correct network interface on the PC and press “Listen”.
- Power off the device, wait a few seconds, then power it on again.
- Wait until the device is detected by the discovery tool
- Make note of the:
- MAC Address
- IP Address
Step 2: Add and Choose Device
- Navigate to “SIP Trunks” within the 3CX Management Console and select “Add Gateway”.
- Select Brand: Grandstream
- Select model/device: Grandstream GXW-4104
- Number of Physical PSTN Ports on device: The amount of FXO ports the device has in total (not how many ports are going to be used)
- Main Trunk No: Define the number of your FXO lines which should act as catch all destination. Commonly your most important number of all.
- Press “OK” to save the device.
Step 3: PSTN Line Setup
Now you need to define some device and line specific options:
- In the “General” tab:
- Registrar: Enter your Grandstream FXO device’s IP address (acquired in Step 1).
- Copy the “Provisioning Link” as it will be needed later in this guide.
- In the “Options” tab:
- Fill in the “MAC Address” of the Grandstream FXO device (acquired in Step 1).
- FAX Transmission Mode: Select the FAX Transmission Mode (T.38 or G.711 Passthrough).
- Caller ID Scheme: Select the Caller ID Scheme. This needs to be confirmed from the PSTN service provider.
- Dial, Ringback, Busy and Reorder Tones: Configure the Tones according to the Telecommunication Standardization Bureau of ITU.
- Press the “Generate device config” button at the top of the page. This will also open a new tab in your browser and redirect you to the device web interface.
- Press the “OK” button.
Step 4: Update the Firmware (if firmware is not the latest)
- Log into the Grandstream GXW-4104 web interface using the IP Address of the device in the browser. The default password is “admin” (without quotes).
- Go to Status → System Info and check that the firmware version is 188.8.131.52 or higher
- If the firmware version is 184.108.40.206, nothing further is required. If it is lower, follow the steps below:
- Go to Maintenance → Upgrade/Provisioning
- Go to the Grandstream website and find the “HTTP Upgrade Server” URL for your device and place the value in the “Firmware Server Path” field in the device web interface.
- Make sure “Always Check for New Firmware” is selected.
- Press “Save” and wait for the device to reboot. Allow up to 10 minutes for the device to complete the firmware update.
Step 5: Provisioning Device
- Log into the Grandstream device using the IP address in a browser tab and go to Maintenance → Upgrade/Provisioning.
- In the “Config Server Path” field enter the “Provisioning Link” you found in Step 3.
- Make sure options:
- “Upgrade Via” is set to HTTP.
- “DHCP Option 66 Override” is set to No.
- “Authenticate Conf File” is set to No.
- Press the “Save” button and reboot device.
The device will now reboot and get the configuration from the 3CX Server.
Step 6: Inbound Rules
Analog lines (FXO) can present the calling number but not the called number. Therefore each FXO port is reflected with a fix DID number. This allows you to individually route calls received from FXO 1 to destination A while calls to FXO 2 are routed differently and so on. The mapping is as follows:
- FXO 1 indicates the dialed number: 000000
- FXO 2 indicates the dialed number: 000001
- FXO 3 indicates the dialed number: 000002
- FXO 4 indicates the dialed number: 000003
Create those DIDs within the gateway to allow calls to be routed based on the port the call was received on. General information on how to manage inbound calls can be found here: https://www.3cx.com/docs/manual/inbound-rules/.
Step 7: Add Outbound Rules
To create “Outbound Rules” please refer to the admin manual: Outbound rules - Routing outgoing calls.