HOW TO: Grandstream GXW-4104 setup

Hello. One fix in your procedure that made everything work.
TAB Profile 1:
SIP Server: YOUR_FREEPBX_INSTALLS_IP
Outbound Proxy:YOUR_FREEPBX_INSTALLS_IP
NAT Traversal (STUN): NO
Force INVITE: YES
SIP Registration: YES ******

(with default SIP registration set to NO, I was calling in and it always said that the number you have dialed is not in service. Outgoing it was saying that all lines are currently busy)

Also, if you want to setup the other ports, under the Tab Channels, you can provide an example:
In freepbx
Trunk name: 5142222222
Outgoing Caller ID: 5142222222

Outgoing settings
Trunk name: 6001
Peer details:

  • Peer details:
    o canreinvite=no
    o context=from-pstn
    o dtmfmode=rfc2833
    o host=dynamic
    o qualify=yes
    o secret=STRONG_PASSWORD_YOU_DEFINED_ON_THE_TRUNK 6001
    o type=friend

Channel: 2
SIP User ID: 6001
Authenticate ID: 6001
Authen Password: THE_STRONG_PASSWORD_YOU_DEFINED_ON_THE_TRUNK 6001
Profile ID: Profile 1

Finally, an addon explanation. If you want a call incoming from a specific port to go to a specific destination, in freepbx:
Incoming routes.

  • Description: whatever you want like callsfrom4501234567
  • DID number: (type exactly what you’ve written in the grandstream, in FXO lines Tab, Channel Dialing to VoIP, Unconditional Call Forward, User ID, ch2:THISnumber!
  • Set destination: Whatever you want your system to do.

The big string sends a DID and Freepbx catches the DID in that line.

Hope it helped. I made a full manual with the addon and corrections!