Problem with HT813 FXO port


#1

Hello everybody,
I’m running an Asterisk server with a HT503 ATA. I use it to filter out unwanted calls from the landline (based on a white and black-lists and some dialplan logic) and to connect fixed handsets as well as softphones (conventional smart-phones with a SIP client app). The setup has been running fine for several months. Unfortunately the HT503 broke down and I replaced it with a more recent HT813. The 2 devices seem to be quite the same thing but I was unable to get a working FXO port with the HT813. In the mean time I also got a new HT503 from the after-sales service, which works like a charm.
To investigate why the HT813 FXO port and what exactly does not work, and for lack of specialized tools, I mounted both the HT503 and the HT813 “top to tail”, that is:

  • the HT503 “phone” port (FXS) connected to the HT813 FXO
  • the HT813 FXS port connected to the HT503 “line” port (FXO)
    I also modified the Asterisk sip.conf file to have all ports connected as SIP clients:
  • HT503 FXS on port 5060 (default)
  • HT503 FXO on port 5062 (default)
  • HT813 FXS on port 5064
  • HT813 FXO on port 5066
    I also modified the dialplan (extensions.conf file) to process incoming calls (unconditionnal call forward to VoIP parameter on Basic Settings page):
  • extension 2000 for HT503 FXO
  • extension 4000 for HT813 FXO
    These extensions dial the corresponding FXS port (on the same box) as well as the available softphones.
    There are also extensions to call a given softphone, the FXs ports, and to call an external number through one of the FXO port.
    With that set-up, I was able to mimic:
  • an incoming call to a FXO port, initiated from the other ATA’s FXS port.
  • a outgoing call to a FXO port, dispatched according to the dialed number sent as a DTMF sequence (in this case, a softphone) to the other ATA’s FXS port.
    Every call is monitored with Asterisk console.
    The results are as follows:
  • A call initiated from the HT813 FXS, forwarded to the HT503 FXO port (incoming call) rings and the call can be answered correctly.
  • A call initiated from the HT503 FXO (outgoing call), forwarded to the HT813 FXS, selects the right extension, makes it ring and the call can be answered correctly.
  • A call initiated from the HT503 FXS, forwarded to the HT813 FXO port (incoming) rings but none of the connected softphones does. However, if the SLIC setting of the HT503 FXS is set to USA instead of France (where I live and which is the setting I normally use), the phones ring and the call can be answered correctly.
  • A call initiated from the HT813 FXO (outgoing call) is immediately cancelled with a 403 (forbidden) response, whatever the SLIC setting (USA or France) of the HT503 FXS port.
    I also tried to retrieve the logs from the HT813 to an external syslog server, but they are quite cryptic for someone who does not know the inner workings of the beast.
    This definitely shows that the HT813 has a malfunctionning FXO port, which very probably stems from a firmware bug.
    I clarify below the various settings I used (they are the same for both ATAs), only for settings different form their default value:
  • Basic Settings:
    • Unconditional Call Forward to VOIP: see above, same SIP server, but different extension and port for both ATAs
    • Time Zone
  • Advanced Settings:
    • System Ring Cadence and Ring Tones set for France (1500/3500)
  • FXS Port:
    • SIP Account Active (see above)
    • Polarity Reversal: Yes (my PSTN uses it, does not change anything to problems mentionned above)
  • FXO Port:
    • SIP account active (see above)
    • Enable PSTN Disconnect Tone Detection: Yes (with adequate tone)
    • Enable Polarity Reversal: Yes
    • AC Termination Model: Country based, France
    • Number of Rings: 3
    • PSTN Ring Thru FXS: No
    • Stage Method (1/2): 1
      Firmware versions used: the latest available (1.0.16.3 for HT503, 1.0.1.2 for HT813).
      Thank you for your help.

#2

Sorry, but this seems overly complicated to determine the issue with why you have not been able to replace a 503 with an 813.

A 403 error is because there is something in the INVITE that the associated SIP server does not like and is therefore refusing to service the request.

You indicated - “HT813 FXO port (incoming) rings but none of the connected softphones does”, This would seem to indicate that if the call is seen at the Asterisk console monitoring the call, that the call reached the PBX and that the issue with why the softphones did not ring is at the PBX level. I guess I am not certain if the observation of getting a ring is being seen from within the HT status page or if the result of the INVITE reaching the console and seeing the ring there visually, but the softphone not ringing audibly.
This really needs a wireshark capture to determine why the call did not progress to your desire.

As I decipher the post, the issues appear to be:

  1. The HT813 FXO not passing the call to the softphones
  2. The HT813 FXO getting a 403 when a call is placed directly from the SIP server to same.

I am not saying that there are not some issues, but rather that it is difficult to follow when the scenario you are using is not really the one you intend to use.

I have a 813 that I just got in and I will play with it today to see if I can get the function to work on both the FXS and FXO ports. Will let you know.


#3

Thank you for your reply.
I must clarify my wording about “A call initiated from the HT503 FXS, forwarded to the HT813 FXO port (incoming) rings but none of the connected softphones does”. What is actually ringing is the calling phone (ring back tone). Nothing gets out of the FXO and reaches Asterisk, unless, as I said, the SLIC setting of the (HT503) FXS is set to USA instead of France.
I know my setup is a bit complicated, but when I initially mounted the original setup, I did not have to fiddle much with the HT503 settings nor the Asterisk configuration to get it working. In fact, before getting an ATA, I had a working Asterisk setup with softphones used as intercom.
So I was quite disappointed when I discovered that my HT813 was “deaf and dumb” with respect to the PSTN. As I don’t have an oscilloscope to watch what is exchanged on the phone line ahead of the FXO port, I came up with that setup.
As it is still up and running, if you want me to try things that I didn’t think of, just tell me.


#4

Hello jyf0008, something new ?


#5

Hello Ludovic,
Unfortunately, nothing new (I have not investigated any further either). I restored my original setup with a replaced HT503. Problem is in standby…


#6

Hi !
I have bought an HT813 device. I want to use this for making PSTN call via FXO to an Asterisk server on my office and be able to get an IVR and redirection call.
I have read that this device have issue for incoming and outgoing call with FXO.
Any solution will be made ?
Firmware Version 1.0.1.2
(sorry for my english)


#7

Hi Boris,
I you can see from my first post, there is indeed a problem using the HT813 FXO port. I presume GS is still working on it. Your use case is the same as mine: I run 2 setups with HT503 ATAs as gateways between the local network and the PSTN with an Asterisk server. As for the new HT813 I bought last December, I use only the FXS port to provide a 2nd local extension.
Unless you can find an old HT503, you have to wait for a firmware update, or switch to another equivalent device (e.g. OB110, although it seems more complicated to configure).


#8

Bonsoir à tous. Vu que personne ne fais l’effort de répondre dans la langue de Shakespeare autant parler celle de Molière.
Merci Jean-yves pour ton retour d’information. Ce qu’il y a détrange, ou alors c’est moi qui ai mal compris, c’est qu’il est normalement possible d’avoir un passthroug entre le FXS et FXO. Ce dernier fonctionne sans soucis quand il n’y a pas d’alimentation électrique mais ne fonctionne plus quand il y a du jus alors qu’il me semble que le téléphone doit sonner quand on appelle sur la ligne PSTN…
For users who want english translation use google :wink:


#9

Quelqu’un peut confirmer que le HT503 fonctionne derrière une Freebox ?
Someone can confirm that the HT503 work with Freebox ?


#10

Hi Boris,
Sorry for replying in English, but this forum should be readable by anybody.
The FXO to FXS pass-through is a fallback (= de secours) when the ATA is no longer powered or there is no longer a SIP connection to either port. In this mode the ATA is completely “dumb”.
As for the HT503 working behind a Freebox, the answer is YES. See this post. The author is English, but lives in France and his landline is provided by Free.


This post also provided me with the foundation for my setup.
My HT503s are connected to a Livebox and work perfectly.


#11

Hi,
Thanks for your reply. I have contact the support and open a ticket for this issue.
The support tell me that developpers teams are working around this issue but it can say me when the patch will be effective.
I hope this will be soon !

Salut,
Merci pour la réponse. J’ai contacté le support et ouvert un ticket pour ce bug.
Le support m’informe que les équipes de développeurs travaillent déjà sur ce problème mais qu’il ne peut pas me donner de date de résolution.
J’espère que ce sera rapide.


#12

Grandstream Developper’s team annonce that they have publish the firmware who make HT813 fully operative FXO input and output.

Poisson d’avril :face_with_symbols_over_mouth:


#13

FIrmware does not seem to be posted yet (even as beta).

Grandstream Support just suggested that perhaps I haven’t plugged the phone line into the FXO.

Run_Up_Kick_that_Ball_Charlie_Brown


#14

Hi! One question. On your home screen “http://yourHT503/cgi-bin/index” do you have FXO marked as Idle or it have an other Status ?
In my case I have FXO - Idle - Number - Registered.
Thanks for your reply.
Boris


#15

Hi Boris,
My HT503 (the device the FXO port of which is actually connected) says as you stated (“Idle”, “”, “Registered”). On my HT813, I only use the FXS port, so it says “Not Connected”, “”, “Not Registered”.


#16

Not connected mean that line is not recognized.


#17

Ok, can you send me your HT503 configuration with screen shot ?
Thanks.


#18

Hi Boris,
I won’t send you screenshots because they are too bulky. I will give you below hints to configure properly your HT503, and it happens to be quite easy because most of the default settings allow the device to run nearly ‘out of the box’.
First of all, if you intend to connect your HT503 to a PBX software, such as Asterisk (which is my case), you’d better configure a minimal dialplan and one or two smartphones with a SIP client app (Linphone or CSIPSimple both work fine) in order to have a working internal SIP telephony system before connecting the ATA. Then connect the FXS port (you should be able to call your fixed handset from a mobile and vice-versa), and finally connect the FXO to enable external connectivity.

Here is a summary of my settings (only non-default values are mentioned).

Basic settings

IP address: the IP address of the ATA on your local network (I personally use a static IP to make SIP client configuration easier in Asterisk). If you do so, take an address outside the range of dynamically allocated addresses by your box.
Network mask: depends on you local network, usually 255.255.255.0
Default router, DNS server: the IP address of your box

Time zone: depends on where you live (GMT+1 in France). Note that if you connect a DECT phone to the FXS port, its clock will be synchronized by the ATA. So if you want your phones to follow summer time, you need to change the time zone twice per year.

NAT/DHCP: Device mode: bridge, Reply to ICMP on WAN Port: yes (I have a cron job which regularly pings my servers to check if they are running), Enable LAN DHCP: no (bridge mode). But you can use the router feature of the ATA to create a sub-network inside your local network (but you won’t have IPv6 connectivity from this sub-network).

Unconditional Call Forward to VoIP: this is where you can force all incoming calls to be forwarded to your Asterisk server for further processing. The extension must exist in the context of the FXO port (file sip.conf) and the port be the one used to connect the FXS port.

Advanced Settings

Firmware upgrade and provisioning: http, firmware.grandstream.com
Always check for new firmware at boot

System Ring and tones: these settings MUST be consistent with the country the system is operated in. Also true for Asterisk, set coutry=France in the file indications.conf.

System Ring Cadence: c=1500/3500;
Dial Tone: f1=440@-10,f2=0@-10,c=0/0;
Ringback Tone: f1=440@-10,f2=0@-10,c=1500/3500;
Busy Tone: f1=440@-10,f2=0@-10,c=500/500;
Reorder Tone: f1=440@-10,f2=0@-10,c=50/50;
Confirmation Tone: f1=350@-11,f2=440@-11,c=100/100-100/100-100/100;
Call Waiting Tone: f1=440@-13,c=300/10000;
Prompt Tone: f1=350@-13,f2=440@-13,c=0/0;
Prompt Tone Access Code: empty

NTP Server: europe.pool.ntp.org
NTP Update Interval: 60 minutes

FXS Port

Account Active: Yes
Primary SIP server: the address of your Asterisk server

SIP Transport: UDP
NAT Traversal: No (not required since ATA and Asterisk server are on the same LAN)
SIP User ID: SIP user ID/password of the FXS port SIP account

SIP Registration: Yes
Unregister on reboot: No
Outgoing Call without Registration: Yes
Use Random Port: No
Hold Target Before Refer: Yes
Support SIP Instance ID: Yes

Send Hook Flash Event: No

SLIC Setting: France

Polarity Reversal: No
Loop Current Disconnect: Yes

FXO Port

Account Active: Yes
Primary SIP Server: the address of your Asterisk server
SIP Transport: UDP
SIP User ID: User ID/password of the FXO port SIP account

SIP Registration: Yes
Unregister On Reboot: No
Outgoing Call without Registration: Yes

Support SIP Instance ID: Yes

Anonymous Call Rejection: Yes (unidentified calls can nevertheless pass through)
Caller ID Scheme: Bellcore/Telcordia

FXO Termination
Enable Current Disconnect: Yes
Enable PSTN Disconnect Tone Detection: Yes (as a backstop)
PSTN Disconnect Tone: f1=440@-30,f2=440@-30,c=500/500;

AC Termination Model: Country based, France
Number of Rings: 3
PSTN Ring Thru FXS: No

Stage Method (1/2): 1

Notes

The “SLIC” (Subscriber’s Line Interface Circuit) setting must correspond to the country (impedance adaptation to limit echo).

For France, the AC load model is CTR21 (270 ohms + (750 ohms || 150 nF)
(see https://en.wikipedia.org/wiki/Two-wire_circuit and https://en.wikipedia.org/wiki/Loop_start) and also TBR21 (https://www.etsi.org/deliver/etsi_tbr/001_099/021/01_60/tbr_021e01p.pdf)

The “Loop Current Disconnect” (FXS) setting must be “Yes” as well as “Enable Current Disconnect” (FXO). They indicate the line pickup/hangup with the opening/closing of the current loop. This feature is standard on analog phone lines.

The “System Ring Cadence” (Advanced settings) MUST be c=1500/3500; for France. Otherwise a recent DECT phone stuffed with electronics connected to the FXS may not recognize the call.

For other countries, see

The ports used for your SIP accounts in Asterisk sip.conf file for the FXS and FXO ports MUST match the ones in the ATA settings (default 5060 for FXS, 5062 for FXO).

Good luck, and remember that Graham Miln (see post above) managed to sort all the complexity of Asterisk, SIP and ATA and get a running system in only 2 days!

PS: could a real guru from GS have a read at my prose and correct my possible mistakes? Thanks.