Help Setting up a GrandStream HT813 for FXO from comcast pots to voip

Hello all.


I have an FXO/FXS card with FXO module on it now, being passed through from my vmware host to the freepbx vm I have running.

However, in effort to move to new hardware, I will be saying goodby to that hardware for now, and have picked up a Grandstream HT813 to act as the FXO gateway from Comcast POTS to my FreePBX vm.

I’ve googled, searched this and the grandstream forums and have come up with the same handful of threads of folks trying to register the device with fxo, and have tried to apply the same logic to it all, but am coming up really short in getting any of this to work.
Despite trunk settings (incoming and outgoing), the darn thing won’t register to FreePBx

Getting the following debug messages:

Scheduling destruction of SIP dialog ‘[email protected]’ in 32000 ms (Method: REGISTER)

Really destroying SIP dialog ‘[email protected]’ Method: REGISTER)

Here is my trunk settings, using a chan_sip trunk:
Outgoing: (Trunk Name) 5555555555 (actually my home # not this…)


USER Context: grandstreampots
USER Details:


For the Unconditional Fall Forward to STN #, I have the name of the outgoing trunk.
Likewise, I have the same userid @ sip server with a 5160 set for destination of the port.

On the FXS Port tab of the HT813:
Primary sip server is freepbxip:5160
sip username is grandstreampots
authenticate name is grandstreampots
password matches the secret
everything else is defaults

On the FXo tab (not that I need it, but at least that should be working and should be registered…
Primary sip server is freepbxip:5160
sip username is grandstreampots
authenticate name is grandstreampots
password matches the secret
everything else is defaults

Nothing will register between the servers, and I am not sure what I am doing wrong at this point.

Any thoughts?

Basically I am just using the device as a gateway from the xfinity pots line to FreePBX. I have a Grandstream 750 that serves the purpose of talking to freepbx and making and receiving calls from there.

edit: FXO not FXS…half my issue LOL.
still having issues getting this setup.

edit 2:

Followed Grandstream HT813 as VoiP Gateway
again and made some headway. i can see an unmonitored connection for sip show peers, but the test calls in to the house now just ring until I get ‘the mailbox you are trying to reach is not in service, goodbye’ then disconnected. Even tried a new any any inbound route in just to ensure everything was captured, but no dice.

edit 3: outbound also not working.

I have absolutely no idea what I may have done wrong at this point.
This shouldn’t be that too far different from the times I used an obihai or sipura (tossed them a while back due to the echo issues).

Do not register the fxo port. You just need to correctly fill the field named “unconditional forward to”. That field takes care of sending the incoming analog call to your FreePBX

Still not working :-/

here are my most current settings:

Trunk (chan_sip)

Outgoing settings:


Incoming settings: empty

Over on the HT813 side:
General tab:
Unconditional call forward to PTSN: landline603
Unconditional call forard to voip: [email protected]:5060

FXO tab:
Primary sip server:
Sip useerID, authid and pw landline603 (matches trunk)

sip registration is no
unregister on reboot no
outgoing without registration yess

local sip: 5062
local rtp: 5012

ring through fxs: no

rings: 4

rest are all defaults

At the moment, I can see a call coming in from my cell phone, but I get hung up on imemdiately:

1 sip peers [Monitored: 0 online, 0 offline Unmonitored: 1 online, 0 offline]
== Setting global variable ‘SIPDOMAIN’ to ‘’
– Executing [[email protected]:1] NoOp(“PJSIP/anonymous-0000000 a”, “Received incoming SIP connection from unknown peer to landline603”) in new stack
– Executing [[email protected]:2] Set("PJSIP/anonymous-0000000a ", “DID=landline603”) in new stack
– Executing [[email protected]:3] Goto(“PJSIP/anonymous-0000000 a”, “s,1”) in new stack
– Goto (from-sip-external,s,1)
– Executing [[email protected]:1] GotoIf(“PJSIP/anonymous-0000000a”, “1?s etlanguage:checkanon”) in new stack
– Goto (from-sip-external,s,2)
– Executing [[email protected]:2] Set(“PJSIP/anonymous-0000000a”, “CHANNE L(language)=en”) in new stack
– Executing [[email protected]:3] GotoIf(“PJSIP/anonymous-0000000a”, “1?n oanonymous”) in new stack
– Goto (from-sip-external,s,5)
– Executing [[email protected]:5] Set(“PJSIP/anonymous-0000000a”, “TIMEOU T(absolute)=15”) in new stack
– Channel will hangup at 2020-10-02 20:35:56.655 EDT.
– Executing [[email protected]:6] Set(“PJSIP/anonymous-0000000a”, “receve ip=pjsip,remote_addr”) in new stack
– Executing [[email protected]:7] Log(“PJSIP/anonymous-0000000a”, “WARNIN G,“Rejecting unknown SIP connection from"”) in new stack
– Executing [[email protected]:8] Answer(“PJSIP/anonymous-0000000a”, “”) in new stack
– Executing [[email protected]:9] Wait(“PJSIP/anonymous-0000000a”, “2”) i n new stack
– Executing [[email protected]:10] Playback(“PJSIP/anonymous-0000000a”, " ss-noservice”) in new stack
– Executing [[email protected]:11] PlayTones(“PJSIP/anonymous-0000000a”, “congestion”) in new stack
== Spawn extension (from-sip-external, s, 11) exited non-zero on ‘PJSIP/anonym ous-0000000a’
– Executing [[email protected]:1] Hangup(“PJSIP/anonymous-0000000a”, “”) in new stack
== Spawn extension (from-sip-external, h, 1) exited non-zero on ‘PJSIP/anonymo us-0000000a’

That is not the way you are supposed to set it up. You can follow the guide for the GXW4104, which is the same device just with more ports.

Just followed the wiki to the best I can:

Still getting hung up on after answer…

trunk settings for outgoing:
Name GXWT1


basic settings doesn’t seem to change anything at this point. regardless of what I put in for unconditional, it goes limp and hangs up on me. right now set to GXWT1 at the sip server and port 5060.

FXO port is pointing at primary sip server, also used outbound proxy here as well same addy as per the wiki,.

sip username and password and what have you is GXWT1

Not registering. Sip show peers shows:
Comedia ACL Port Status Description
GXWT1 Yes Yes 5062 OK (8 ms)
1 sip peers [Monitored: 1 online, 0 offline Unmonitored: 0 online, 0 offline]

Oddly enough, for poops and giggles, I spun up a 3CX intstance and was able to configure the HT813 to it no issue. Only had to change one thing really, which was changing stage method frmo 2 to 1. Doesn’t seem to impact the FreePBX instance though and I am not sure why it works one way with 3CX but not after trying all day with FreePBX :-/

Clearly, I’m doing something wrong, but I have no idea what parameter it is, etc and I’m going around in circles.

Greatly appreciate any assistance.

About ready to try out freepbx 14 with asterisk like 12 or 13 just to see if it behaves.

You are pretty close.

In the outgoing trunk settings, you need
(matches the value of Local SIP Port on the HT FXO tab)
as well as

On the FXO tab:
Stage Method should be 1
SIP Server should be
(5160 matches the value of Bind Port in chan_sip settings)
SIP Registration should be No
Outgoing Call Without Registration should be Yes.

If you use Call Forward Unconditional, the port number (after the colon) should be 5160.

If you still have trouble, at the Asterisk command prompt type
sip set debug on
make a test call and paste the Asterisk log for the call (which should now include a SIP trace) at and post the link here.

Ok, I’ve got it setup such that at least it now rings through, BUT only shows the trunk name GXWT1 on caller ID.

If I set the # of rings beyond 1, it disconnects or tells me the # I am trying to call is not in service.
Tried playing a bit with the # of rings (2 at least I know is needed to pass caller ID as it comes on the second ring) but even lowering the delays etc. it doesn’t seem to work and I’m not sure why. Unconditional is in use and without it no rings happen anyways.

Here’s a pastebin showing a recent test call from my cell phone on in:

And here you can absolutely see the mobile # coming in to the trunk in question:

Current trunk info:


I have an inbound route to route any calls to ring group 1 (rings all my house phones)

Here are the screenshots of the rest of the config currently:. FXS is st to account active no and all defaults .Advanced settings is all defaults.

I also whitelisted the device/ip in fail2ban (forgot about it before).

I’m so close now!!
Appreciate your insight!

I have no idea if that syntax is valid, but why don’t you just have port=5062? 5060 makes no sense in this context.

If that doesn’t fix it, please paste/post the complete log for the incoming call (including sip debug) starting from the first line that appears.

If outgoing working now? If not, paste/post a log for that.

Freepbx keeps putting that back itself, not me. I had it set to port=5062 and next time I looked that was appended on.

Doubt that’s the issue though.

Haven’t even bothered testing outbound yet. Just want to get inbound working first.

Got like one week to get it done before I have to move my rack equipment across the room. If this doesn’t work I’ll go back to the hw dahdi.

I don’t know what’s wrong but it may be a bug. Look at /etc/asterisk/sip_additional.conf and post the section starting [GXWT1]

Another thought is that it is unusual to have a DID with letters. In Unconditional Call Forward to VoIP, change the User ID to a number (typically your phone number but it can be anything unique on your system). Then, use that number in the DID field of the Incoming Route.

In any case, post a complete log with SIP debug for the incoming call (and one for outgoing if not working).

Doesn’t that unconditional forward need to match the trunk name (from what I read all over)?

It’s just what it puts in the user field of the SIP URI and the To header. Asterisk uses it as the called number.

aight ,so, good news, inbound works and with callerID now!
replaced the forward with my actual home phone # that’s on the actual POTS service.

HOWEVER ,now I can’t dial outbound :slight_smile:
Staged dialing is set to 1 from 2 (read all about that before), and outbound proxy with and without any kind of settings makes no difference. I’ve also tried Current Disconnect Threshold (ms) tweaking from the default 100 to 500 and even 800.

I am noticing (in the pjsip debugging):

<— SIP read from UDP: —>
SIP/2.0 403 Forbidden
Via: SIP/2.0/UDP;branch=z9hG4bK758044fe;rport=5160
From: sip:[email protected]:5160;tag=as3862f104
To: sip:cell_phone_number%[email protected]:5062;tag=1385999928
Call-ID: [email protected]:5160
CSeq: 102 INVITE
Supported: replaces, path, timer, eventlist
User-Agent: Grandstream HT813
Content-Length: 0

I suspect that is due to outbound authorization being weird?
In the FXO port, Outgoing Call without Registration is set to yes, so wouldn’t that bypass that issue?
Or is this more to do with the # in the forwarder section under basic settings needing to match the trunk name?

Here is the pastbin link to the whole output for outbound attempt:

Almost there!!!

Aaaand It’s working now.
Had to clear out the dial plan!

Thank you so much for your help!
I need to seriously document this tomorrow and paste it all here for a guide!.

Inbound and outbound working beautifully. Not hearing any issues, delays, echos, etc.

1 Like

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.