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


(Eweihrauch) #1

Hello all.

FreePBX 15.0.16.75

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 ‘1175418136-5060-2@BJC.BGI.F.I’ in 32000 ms (Method: REGISTER)

Really destroying SIP dialog ‘1175418136-5060-2@BJC.BGI.F.I’ Method: REGISTER)

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

user=grandstreampots
type=friend
secret=xxxxxxx
dtmfmode=rfc2833
disallow=all
context=from-trunk
canreinvite=no
allow=ulaw&alaw

Incoming:
USER Context: grandstreampots
USER Details:

secret=xxxxx
type=user
context=from-trunk

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).


#2

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


(Eweihrauch) #3

Still not working :-/

here are my most current settings:

Trunk (chan_sip)

Outgoing settings:

host=192.168.5.8
user=landline603
type=friend
secret=landline603
disallow=all
context=from-trunk
allow=ulaw&alaw

Incoming settings: empty

Over on the HT813 side:
General tab:
Unconditional call forward to PTSN: landline603
Unconditional call forard to voip: landline603@192.168.5.5:5060

FXO tab:
Primary sip server: 192.168.5.5:5160
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 ‘192.168.5.5’
– Executing [landline603@from-sip-external:1] NoOp(“PJSIP/anonymous-0000000 a”, “Received incoming SIP connection from unknown peer to landline603”) in new stack
– Executing [landline603@from-sip-external:2] Set("PJSIP/anonymous-0000000a ", “DID=landline603”) in new stack
– Executing [landline603@from-sip-external:3] Goto(“PJSIP/anonymous-0000000 a”, “s,1”) in new stack
– Goto (from-sip-external,s,1)
– Executing [s@from-sip-external:1] GotoIf(“PJSIP/anonymous-0000000a”, “1?s etlanguage:checkanon”) in new stack
– Goto (from-sip-external,s,2)
– Executing [s@from-sip-external:2] Set(“PJSIP/anonymous-0000000a”, “CHANNE L(language)=en”) in new stack
– Executing [s@from-sip-external:3] GotoIf(“PJSIP/anonymous-0000000a”, “1?n oanonymous”) in new stack
– Goto (from-sip-external,s,5)
– Executing [s@from-sip-external: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 [s@from-sip-external:6] Set(“PJSIP/anonymous-0000000a”, “receve ip=pjsip,remote_addr”) in new stack
– Executing [s@from-sip-external:7] Log(“PJSIP/anonymous-0000000a”, “WARNIN G,“Rejecting unknown SIP connection from 192.168.5.8:5062"”) in new stack
– Executing [s@from-sip-external:8] Answer(“PJSIP/anonymous-0000000a”, “”) in new stack
– Executing [s@from-sip-external:9] Wait(“PJSIP/anonymous-0000000a”, “2”) i n new stack
– Executing [s@from-sip-external:10] Playback(“PJSIP/anonymous-0000000a”, " ss-noservice”) in new stack
– Executing [s@from-sip-external: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 [h@from-sip-external:1] Hangup(“PJSIP/anonymous-0000000a”, “”) in new stack
== Spawn extension (from-sip-external, h, 1) exited non-zero on ‘PJSIP/anonymo us-0000000a’


#4

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.


(Eweihrauch) #5

Just followed the wiki to the best I can:
https://wiki.freepbx.org/pages/viewpage.action?pageId=4161667

Still getting hung up on after answer…

trunk settings for outgoing:
Name GXWT1

type=friend
qualify=yes
secret=GXWT1
host=192.168.5.8
context=from-trunk
port=5060
dtmfmode=rfc2833
canreinvite=no
disallow=all
allow=ulaw

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 192.168.5.5, 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 192.168.5.8 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.


#6

You are pretty close.

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

On the FXO tab:
Stage Method should be 1
SIP Server should be
192.168.5.5:5160
(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 pastebin.freepbx.org and post the link here.


(Eweihrauch) #7

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:
https://pastebin.freepbx.org/view/51875635

And here you can absolutely see the mobile # coming in to the trunk in question:
https://pastebin.freepbx.org/view/7bcbcd59

Current trunk info:

type=friend
qualify=yes
username=GXWT1
secret=GXWT1
host=192.168.5.8
port=5062&5060
context=from-trunk
dtmfmode=rfc2833
canreinvite=no
disallow=all
allow=ulaw

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!


#8

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.


(Eweihrauch) #9

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.


#10

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).


(Eweihrauch) #11

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


#12

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.


(Eweihrauch) #13

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:192.168.5.8:5062 —>
SIP/2.0 403 Forbidden
Via: SIP/2.0/UDP 192.168.5.5:5160;branch=z9hG4bK758044fe;rport=5160
From: sip:home_phone_number@192.168.5.5:5160;tag=as3862f104
To: sip:cell_phone_number%40landline603@192.168.5.8:5062;tag=1385999928
Call-ID: 41770e1c0f6118c51ecc6d812edf44c0@192.168.5.5:5160
CSeq: 102 INVITE
Supported: replaces, path, timer, eventlist
User-Agent: Grandstream HT813 1.0.9.1
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE
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:
https://pastebin.freepbx.org/view/dcc25874

Almost there!!!


(Eweihrauch) #14

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.
LOVING IT!