FreePBX and UK PSTN adaptors

Hi,

Does anybody have the configuration settings that they are using for FreePBX with Grandstream HT813 ATA on the UK PSTN network?

I could also do with the settings for an HT814 Grandstream ATA.

I had this working apart from caller ID and all of a sudden I cannot get things to work properly again.

I am unable to get the FXO port to dial out correctly, I either get a dead line or I get told the number I have dialled is incorrect.

Every time I put the ATA PSTN access code into the prefix box of an outgoing call route I get that error but without it I get no error and no outgoing call.

Incoming calls have also stopped working and I am finding it hard to find ways of troubleshooting the ATA Ports.

Thanks

The UK doesn’t have a monopoly local loop operator, and I think different operators differ in their settings, particularly for caller ID. I don’t think everyone uses the BT, before first ring, system.

Also, within the next year, you can expect to be moved to an on premises ATA, as the analogue network is very close to shutdown, and, I think, has already been shut down, in some areas.

Hi,

I know about the PSTN shutdown.

Just I cannot get the line shifted to SOGEA at the moment as I have the PSTN provider seperate from the broadband and it has created a few issues.

The line is an Openreach one.

I think I have all of the ring tones set correctly on the ATA adapters.

I assume this is not a PABX line (i.e. it is loop start, rather than earth start) and you are not in the wilds of Scotland. Note that SIN 351 still allows BT some implementation choices, even for this, particularly for how ringing current is injected, and how disconnect supervision is signalled.

My educated guess is that the correct CID mode is “ETSI-FSK prior to ringing with LR+DTAS”.

Enable Current Disconnect would probably be preferred, however any combination of the options is allowed on the network side.

I’d do AC termination by country.

It looks like the default first digit delay is long enough not to need to detect dialtone, but enabling dialtone detection would be better, if it works.

Digit length and dial pause each need to be at least 40ms.

Dialing a prefix such as 9 or 0 to get an “outside line” is not recommended for modern systems. Unless you need compatibility with a legacy system, you shouldn’t use one. Set up your numbering so you dial outside numbers the same as you would on a landline or mobile phone.

Log into the HT admin page and look at the Status tab. The FXO status should show On Hook (if not, check physical connection to PSTN line) and Registered (unless you configured the trunk with the static IP of the HT).

At the Asterisk command prompt type
pjsip set logger on
or
sip set debug on
according to the channel driver you are using.
Make a failing outgoing call to 020 3026 4621, paste the Asterisk log for the call at pastebin.com and post the link here. Call from an IP phone or softphone, so we aren’t concerned with possible issues with an ATA on the extension side. Repeat for a failing incoming call.

Also, post screenshots of the FXO Port tab on the HT.

ATA Status Page

FXO Line Termination

PSTN Forwarding

I will sort out some call logs tomorrow.

I tried an outgoing call and whilst it failed the FXO port status changed to in use.

I have removed the default PSTN access code of *00

image

This is too small. SIN 351 allows BT to send a signal as short as 90ms.

I would check that dialtone is being correctly detected, as a false detection is likely to cause initial digits to be lost.

image

This is the absolute minimum acceptable value. I’d suggest increasing it slightly.

I couldn’t see any option that would produce reliable answer supervision detection, so calls may be reported as answered whilst still ringing.

I suggest temporary conservative settings to ensure correct dialing:

  1. Set Wait for Dial-Tone to No (may not be properly detected).
  2. Set Min Delay Before Dial PSTN Number to 1000 (be sure dial tone present).
  3. Set both DTMF Digit Length and DTMF Dial Pause to 100 (make sure DTMF properly heard).
  4. Set Enable PSTN Disconnect Tone Detection to No (in case falsely triggering).

Then retest outgoing. If no luck, test calling your mobile – possibly the call is correctly sent but there is no audio.

Hi, it sounds like you’re having some issues with your Grandstream HT813 and HT814 on FreePBX. For UK PSTN, ensure your SIP settings point to your FreePBX IP and use your extension details for authentication. Set the PSTN accesshttps://19216801.pro/ code (like ‘9’ if required) and choose “UK” for Caller ID type. In your outbound route, make sure dial patterns align with UK formats, such as 0[1-9]xxxxxxxxx;. For troubleshooting,IP address check the FreePBX logs for SIP messages to identify issues, update your ATA firmware, and consider a factory reset if problems persist. If you have specific error messages or settings you’d like help with, feel free to share! Good luck!

Hi,

I am considering a factory reset of the HT813 because not only does it not seem to want to dial out I am not getting any incoming calls.

I have syslog setup on the Ht813 and when I ring the PSTN number the HT813 shows no activity at all.

Sure, but I would first confirm the electrical connection to the PSTN line by unplugging the cord from the HT and connecting an analogue phone in its place. Assuming that the phone can make and receive calls, the plug it back into the HT and do a factory reset.

Before re-entering the config, you should be able to connect a phone to the FXS port and make calls by dialing *00 to get dialtone from the PSTN. Incoming calls should also ring through to the FXS port. If those tests fail, the problem may be with the power supply. If you have one with the same voltage and polarity, sufficient maximum current and a compatible plug, try replacing that first. If you still have trouble, I think it’s likely that the hardware has failed. Was there recently a nearby lightning strike?

Hi,

Already have hard wired phone plugged into a socket doubler sharing the NTE5 with the HT813

Here is a syslog of an incoming call. I managed to get it to start logging correctly.

FreePBX - Pastebin.com

It’s puzzling that Asterisk is rejecting the Authorization header but repeatedly re-requests authentication.

Please confirm that the HT is registering to a pjsip trunk named 900, Authentication is set to Both, and Match Inbound Authentication is set to Auth Username. If no help, post a log (including pjsip logger) from the Asterisk side. and screenshots of trunk settings.

FXO settings on for SIP on HT813

FreePBX Trunk

Caller ID is my UK Land Line in format Area code and number no spaces.

PJSip Trunk

Which Log file contains the PJSip Logging?

At the Asterisk command prompt (not a shell prompt) type
pjsip set logger on
make the failing call, paste the Asterisk log for the call (at the end of /var/log/asterisk/full) and post the link.

I forgot to mention:
Set Tel URI to Disabled. If no luck, also post screenshot of Advanced tab for the trunk

Here is a pastebin of an outgoing call to my mobile.

My mobile does not ring and on this end the call just goes quiet.

I have replaced my numver with xxxxxx and my landline caller ID with yyyyyy and my public IP address with ddd.ddd.ddd.ddd
FreePBX - Outgoing call - Pastebin.com

I get a 403 error trying to read the paste. Possibly it’s flagged as private or somehow triggered moderation. If retry doesn’t help, try pasting at pastebin.freepbx.org .

try that one
https://pastebin.freepbx.org/view/17bdee69

Your public IP should not be involved at all. What is the relationship between 172.16.40.64 and 172.16.50.118? Are they on the same LAN with a wide netmask? Or there’s a non-NAT router between them that doesn’t modify packets? Or they are part of a site-to-site VPN? Or something else?

Just guessing what might help, in Asterisk SIP settings, set Local Networks to 172.16.0.0/12, after Submit and Apply Config, restart Asterisk and retest.