GXW4104 Multiple Registration



We have a 3CX system that uses our Grandstream GXW4104 FXO gateway. We have 3 pots like connected leaving fxo#4 empty.
We want to be able to select a line when dialing, as to ensure the main line is available for customers calling in.

Attempted multiple registration but was unsuccessful. Can someone point me in the direction for this? 3 registrations for 3 fxo.
I saw there is a dial plan available, prefix + fxo# + phone number. Can someone elaborate on thus? Stage method is 1.

Also, we would like to force all outbound caller id to use our main trunk number irrespective of which fxo line was used to dial out. Can this be done?


  1. You typically have no control over outbound analog CID as this is usually assigned by the provider to the physical line.

  2. How a line is selected is dependent on how the gateway is setup within 3CX. If the device is setup with one trunk registration to 3CX, then a dial prefix of 99 followed by the desired FXO port is used in the dial string to drive a call to a given port.

  3. If the gateway is set such that each FXO port is a separate trunk in 3CX, then 3CX controls to which port the call will be directed based upon the outbound rules in 3CX and how you construct a dial string such that 3CX knows which port you wish.

You can find more in the manual for the gateway as well as the following link -


I know with other gateways, when configured with 3cx, they default to use the main trunk number as default caller id regardless of which fxo port was used once its a configured DID.

Can you say how exactly this works? I tried this but 3cx kills the call with invalid country code. So i need to configure strip digits on the outbound rule to remove the prefix and fxo number? In this case, strip 3 digits?


The CID may be handled differently in your locale; hence why I indicated “typically”. However, I would be surprised that the CID might be controlled by the gateway.

I have no idea of the dial string needs of the provider in order to dial internationally. Sorry, you will have to experiment or perhaps someone else will know.


We’re actually not dialling internationally. Instead, dialling local. The dial plan is prefix# + fxo# + phone#

Eg. Prefix 99 fxo#2 telephone(12345)
Would be 99211345. Would this be correct? If so, when I do this, 3cx drops the call.


Is there a way to pause after the trunk selection digits? Perhaps a comma.
Analog dial tone is not immediate and you need a slight pause before proceeding.


I’m not sure if there is a way. I do know what the user dials, the pbx (3CX) accepts it and passes it through one of the outbound rules. So, I can strip 3 digits 99 + 1-3 = 3 digits. Begs to question, since I removed prefix + fxo# , the gxw won’t get the dial plan anymore.


The GXW has a setting “wait for dial tone” which avoids the need for any comma as it would not understand a comma nor would 3cx send a comma. Then there is also a setting of “min delay before dialing PSTN” which implements a delay after detecting dial tone to allow for stabilization of the PSTN to occur before the dial string is sent to the PSTN.

The manual has all these settings, you just need to refer to it.

As far as your dialing string, get an analog phone and connect it to the line and then dial the number. Once you get through to the desired destination, that is the string that the provider needs and how the dial string needs to be configured. How you set the trunks up in 3CX is the key as I have no clue as there is more than one way. The GXW is supported using the add gateway function in 3cx under SIP trunks. The dial stage method in the GXW needs to be set to stage 1.


Direct connection to the analogue lines, just require dialing the last 7 digits of the number in e164 format. So a number 3051234567 would be dialed as 1234567. On the 3cx, outbound rules are simple since the gxw4104 is configured as a single trunk. So we match the extension group, route gxw4104 no Prepend no strip callerid main trunk number.


So without trying to specify a port (99X as a prefix) does the call proceed?


You can set in on GXW
You need sent all code to GWN 99 (prefix) + X(port start from 0) + number to dial
This need to be set correctly


No the call fails.
Target point cannot be created.


I believe its better to create each fxo port as their own trunk. I can’t find any proper documentation on this. Can you guys point me in the right direction?



But you also need separate RR,
Round Robin and/or Flexible