TryLearn More

Use SIP trunks, WebRTC & Apps

Slash your Phone Bill by 80%

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.

Notes:

  • The device must be local to 3CX, in the same subnet and/or locally routed subnet (including site to site VPN)

Configuring Grandstream FXO VoIP Gateway

Supported Model: Grandstream GXW4104 FXO

Step 1: Prepare your Grandstream Device

Step 2: Add and Choose Device

Step 3: PSTN Line Setup

Step 4: Update the Firmware (if firmware is not the latest)

Step 5: Provisioning Device

Step 6: Inbound Rules

Step 7: Add Outbound Rules

Step 1: Prepare your Grandstream Device

  1. Connect the network cable using the “WAN” port of the gateway and power it on.
  2. 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.
  3. Next you need to find the IP and MAC Address of your device on your network:
  1. Download the Grandstream IP Discovery Tool from here.
  2. Extract it on a PC on the same WAN as the Grandstream device
  3. Run the executable file, select the correct network interface on the PC and press “Listen”.
  4. Power off the device, wait a few seconds, then power it on again.
  5. Wait until the device is detected by the discovery tool
  6. Make note of the:
  • MAC Address
  • IP Address


Step 2: Add and Choose Device

  1. Navigate to “SIP Trunks” within the 3CX Management Console and select “Add Gateway”.
  2. Select Brand: Grandstream
  3. Select model/device: Grandstream GXW-4104
  4. 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)
  5. Main Trunk No: Define the number of your FXO lines which should act as catch all destination. Commonly your most important number of all.
  6. Press “OK” to save the device.

Step 3: PSTN Line Setup

Now you need to define some device and line specific options:

  1. 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.
  1. 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.
  1. 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.
  2. Press the “OK” button.

Step 4: Update the Firmware (if firmware is not the latest)

  1. 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).
  2. Go to Status → System Info and check that the firmware version is 1.4.1.5 or higher

  3. If the firmware version is 1.4.1.5, nothing further is required. If it is lower, follow the steps below:
  1. Go to Maintenance → Upgrade/Provisioning
  2. 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.
  3. Make sure “Always Check for New Firmware” is selected.
  4. 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

  1. Log into the Grandstream device using the IP address in a browser tab and go to Maintenance → Upgrade/Provisioning.
  2. In the “Config Server Path” field enter the “Provisioning Link” you found in Step 3.
  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.
  1. 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.