Outbound issue with Grandstream HT813 ATA adapter

Yes, the emergency route should come first, but it should only match emergency numbers and numbers used for testing your emergency calling.

The test call to your cell should not match the emergency route (and presumably would not match the ‘toll free’ route), so it should hit the Spectrum route.

Is it wrong that all routes have 911, 988? I think I ran all buttons before so they propagated.

Now, I’ve moved Spectrum route above all and attempted to make test call out, it just rings and rings… Something with ability to make outbound calls on it.

That would be strange, but if a 911 call hits the first route which is your emergency route, it doesn’t matter about the others because they won’t get looked at.

So paste another log (including pjsip logger).

https://pastebin.freepbx.org/view/7f025744
New logs when PSTN outbound route is on top.

pjsip logger was not on. Note that it gets turned off by restarting or reloading Asterisk, so you need to turn it on again and paste another log.

Sorry, got swamped with work. Here is updated with verbose on:
https://pastebin.freepbx.org/view/45b9aac1

I suspect that the call got taken by the FXS port.

Confirm that the value of SIP Server Port for the trunk (apparently 5060) matches the value of Local SIP Port for the FXO port in the HT and is different from the value of Local SIP Port for the FXS port. Reboot the HT if you change these.

If that’s not your issue, we can use syslog on the HT to see why it is responding strangely.

It’s 5060 in FXS but account is not active. Should I change to something else and or reboot asterisk?

Try changing the FXS Local Port and rebooting the HT. If no luck, we can try syslog on the HT.

I just put some random 4 digits number in FXS and rebooted HT but no luck.

Confirm that on the FXO page, Wait for Dial Tone is No and Stage Method is 1. Else I’m puzzled.

Possibly, the HT has a bug related to port numbers. I’ve seen this with a Grandstream IP phone. Try setting both Local Port values to defaults (5060 for FXS, 5062 for FXO), set SIP Server Port in the trunk to 5062 and retest. If you still have (the same) trouble, plug an analog phone into the FXS port and see whether it actually rings when you attempt a call. Possibly, the HT Status page may show ringing if you refresh it while hearing ringing on the outbound call attempt. Otherwise, we may need to use syslog to see what is happening.

I swapped the ports, even worse, no incoming call or outgoing! Changing back to 5060 works for incoming.

Wait for Dial Tone is No and Stage Method is 1 - what do you mean by this?

I thought that possibly the HT would send Ringing while awaiting dial tone or setting up for 2 stage. But you have those set correctly so that should be fine.

In the trunk setting, set Match (Permit) to 10.100.20.5 and retest with SIP Server Port and the FXO Local Port both set to 5062. If incoming still fails, paste a log of the attempted call. Likewise for outgoing.

Also, if you get the ringing tone when attempting outgoing, report what the Status page shows.

Hi Stewart,
Do I basically change port to 5062 in all places in HT and in trunk?
Thanks.

No. In Unconditional Call Forward to VoIP, SIP Destination Port should be left at 5060, to match the value of Port to Listen On in pjsip settings. In the FXS Port settings, Local SIP Port should be left at 5060. On the FXO Port settings page, Local SIP Port should be set to 5062.

In the Trunk, SIP Server Port should be set to 5062. I’m not aware of any other trunk settings where you would supply a port number.

Ok, I will test later today.

Since you asked for my setup,

I upgraded my raspbx to Asterisk 20 (custom installation for 64bit) for science and since it didn’t have sip module at all, I ended up spending some time converting FXS and FXO of HT813 from SIP to PJSIP.

So my current setup for my home is:
FXS
FreePBX Side: Just a typical PJSIP extension.
HT813 Side: Typical PJSIP Nothing Special

FXO
FreePBX Side:



HT813 side:

Basic Settings @ the very bottom of the page

On Status you expect to show FXS Registered and FXO Unregistered (since it is setup without registration).

I tested it and it works for me so far. I believe I would use Inbound Authentication on trunk if it wasn’t directly connected.

1 Like

Hi,

I’m back to this, thank you so much for sharing your config! I will try to apply and will update.

I was able to find a solution to this pesky issue!

Turned out my HT813 appears to be configured correctly (it worked with ether configs from this thread, but FXO is a must for my incoming to work).

The issue was my outbound rules.

I put my CID in dial pattern for each extension, it now works as I intended.

I didn’t know that if CID field is empty FPBX will start use those rules in the order specified.

Thank you all for your suggestions and help!

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