VoIP ATA cannot register (sometimes)

Report wireless and/or network connectivity problems in this forum.

Moderator: Moderators

fifonik
Posts: 96
Joined: Fri Dec 02, 2016 3:52 am
Location: Brisbane, AU

VoIP ATA cannot register (sometimes)

Postby fifonik » Wed Jun 19, 2019 11:11 pm

I have VoIP ATA in local network behind VDSL bridged modem + gargoyle router (version 1.11.0 installed).
Usually everything works fine. However, sometimes the ATA cannot register and the only way to fix it is to reboot the router.

WAN IP is static.
Router to ATA connection is wired.
All IPs (including the ATA's IP) are from the router's DHCP.
Port 5060 forwarded to the ATA.
When this happen there is no issue with internet. I can browse, use skype, etc.
I can connect to the ATA's Web UI from within LAN with no issues.
Rebooting the ATA does not help (still cannot register after reboot).
When the router rebooted the ATA successfully registered in a seconds.

This happens not often, with router up time more than a month.

Could you advice, what should I check when this happen again? (ping ATA from router? from machine in WAN? issue some command on router to check that the port forwarding is still active? force the router somehow to re-initiate WAN connection? try to reboot bridged modem? what else should I try?)

Thanks.

User avatar
RomanHK
Posts: 349
Joined: Sat May 04, 2013 4:18 pm
Location: Czech Republik

Re: VoIP ATA cannot register (sometimes)

Postby RomanHK » Thu Jun 20, 2019 1:41 am

Try the latest build from @ispyisail from here: viewtopic.php?f=14&t=12034
Turris Omnia with Gargoyle 1.11.x
Linksys WRT3200ACM with Gargoyle 1.11.x
TL-WR1043ND v2 with Gargoyle 1.10.0

Lantis
Moderator
Posts: 4994
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: VoIP ATA cannot register (sometimes)

Postby Lantis » Thu Jun 20, 2019 6:21 am

This is usually due to the keep-alive packets not being returned to the correct device. This is a pretty common problem with SIP services behind NAT.

Does your device have a keep-alive setting? Setting this below the timeout threshold of both TCP and UDP (i think 180s minimum?) should help.

Additionally, the keep alive packets are usually in a defined port range (usually 10000-11000ish range). Forwarding these as well would probably solve the issue if you know what range your particular service uses.
Routers: Various ar71xx/mvebu/x86-64
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases

User avatar
RomanHK
Posts: 349
Joined: Sat May 04, 2013 4:18 pm
Location: Czech Republik

Re: VoIP ATA cannot register (sometimes)

Postby RomanHK » Thu Jun 20, 2019 7:21 am

I would still look into the log, there could be a written reason for disconnecting it and not connecting it back. (run logread via ssh or via plugin "logread for Gargoyle")

Such an idea:
if you want to ping ATA and try to re-initialize WAN, try the "Ping Watchdog" plugin.
Turris Omnia with Gargoyle 1.11.x
Linksys WRT3200ACM with Gargoyle 1.11.x
TL-WR1043ND v2 with Gargoyle 1.10.0

fifonik
Posts: 96
Joined: Fri Dec 02, 2016 3:52 am
Location: Brisbane, AU

Re: VoIP ATA cannot register (sometimes)

Postby fifonik » Thu Jun 20, 2019 7:30 am

Thanks for reply.

> Does your device have a keep-alive setting?

Yes, it's Grandstream HT802 with million of settings.

"Keep-alive Interval" - 20 sec (default).
"SIP Transport" - UDP
"SIP OPTIONS/NOTIFY Keep Alive Interval" - 30 sec (default) with re-registration after 3 lost keep-alive packets.
"NAT traversal" was OFF. Changed it to 'Keep-Alive'. Not sure if this is needed as port 5060 forwarded to the ATA.

On gargoyle TCP timeout 600, UDP - 180.

> Additionally, the keep alive packets are usually in a defined port range (usually 10000-11000ish range)

Unfortunately, I'm not aware of any other ports. It was not mentioned on ISP settings and the only other port mentioned in the ATA settings is "Local RTP Port".

Anyway, if the keep-alive was the issue, would not ATA reboot help?

fifonik
Posts: 96
Joined: Fri Dec 02, 2016 3:52 am
Location: Brisbane, AU

Re: VoIP ATA cannot register (sometimes)

Postby fifonik » Thu Jun 20, 2019 7:37 am

> I would still look into the log

Thanks. Installed the log reader. Will check log as well. Today this happened at 5:30AM when I was leaving, so I did not have time to think.

> if you want to ping ATA and try to re-initialize WAN, try the "Ping Watchdog" plugin.

Should I ping the SIP port (5060)? I can access ATA's GUI (https).
How should I re-initialize WAN? Just pressing Save button on Connection | Basic page?

User avatar
RomanHK
Posts: 349
Joined: Sat May 04, 2013 4:18 pm
Location: Czech Republik

Re: VoIP ATA cannot register (sometimes)

Postby RomanHK » Thu Jun 20, 2019 7:54 am

fifonik wrote:Should I ping the SIP port (5060)?

Ping is always given to the IP address, not to the port (IP address behind WAN port).
Turris Omnia with Gargoyle 1.11.x
Linksys WRT3200ACM with Gargoyle 1.11.x
TL-WR1043ND v2 with Gargoyle 1.10.0

Lantis
Moderator
Posts: 4994
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: VoIP ATA cannot register (sometimes)

Postby Lantis » Thu Jun 20, 2019 8:01 am

To confirm the issue, you can temporarily DMZ the device. If it remains connected, it is a NAT traversal/port forwarding issue.
Routers: Various ar71xx/mvebu/x86-64
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases

pythonic
Posts: 21
Joined: Mon Mar 11, 2019 5:47 am
Location: Australia

Re: VoIP ATA cannot register (sometimes)

Postby pythonic » Thu Jun 20, 2019 9:03 am

Just for the record, I'm running a Yealink SIP telephone behind a Gargoyle 1.11 gateway without using any port forwards or DMZ. My longest gateway uptime is almost 50 days with no issue. The phone is configured with 2 lines - each line is with a different VSP. I've previously run a Cisco SPA-122 ATA with the same 2 lines behind a Netgear router with factory firmware, also without port forwards or DMZ, and that was with a CG-NAT internet connection (so effectively double NATted).

If you can, I would suggest trying without the port forwards and the ATA configured as close to default as you can.

Things I have found out over time about SIP:
- some SIP ALG implementations are troublesome and need to be disabled (e.g. Huawei Hilink 4g dongles IME) though this isn't an issue with Gargoyle or OpenWrt
- if the SIP device will register at least part of the time, the issues are likely to be related to NAT problems - either the keepalives aren't making it back through the NAT table in time to keep the connection open or there is something confusing the NAT implementation (e.g. devices changing IP address or devices using identical ports on different IP addresses)
- if there are multiple SIP devices (even multiple extension registrations on the one device) each device registering an extension should use different port numbers for each extension (more info here).

fifonik
Posts: 96
Joined: Fri Dec 02, 2016 3:52 am
Location: Brisbane, AU

Re: VoIP ATA cannot register (sometimes)

Postby fifonik » Sun Jun 23, 2019 9:40 pm

Thanks four you replies.

For now I disabled the port forwarding and everything still looks OK (ATA register). I do remember that I tried without port forwarding and could not make it work. Probably one of the ATA FW update fixed previously existed issue.


> To confirm the issue, you can temporarily DMZ the device.

Thanks for advice, but to be honest, it's a bit scary to put the ATA in DMZ. It would be exposed to wild for 30+ days while testing. So this would the the last thing to try on the list.


> If you can, I would suggest trying without the port forwards and the ATA configured as close to default as you can.

It's almost default.
Anyway, I'll try to reset it and re-configure from the scratch.


> if the SIP device will register at least part of the time, the issues are likely to be related to NAT problems - either the keepalives aren't making it back through the NAT table in time to keep the connection open or there is something confusing the NAT implementation (e.g. devices changing IP address

The ATA gets IP from gargoyle's DHCP (statically assigned there). Is it possible the device change IP in this scenario?
Even if the IP lease somehow expires and temporary re-assigned to something else, when I restart the ATA, it got the correct IP. However, it still cannot register.
This is my main concern and I'd like to find out how to check what is causing the issue: ATA, router or SIP server.


> devices using identical ports on different IP addresses

This is very interesting. Never thought about this scenario. uPnP active so is it possible for other devices to get port 5060 while the port is manually forwarded? Will try to double check. Still, with configured port forwarding I'd expect issues with other devices.


> if there are multiple SIP devices...

Single SIP device only.


Return to “Network / Wireless Issues”

Who is online

Users browsing this forum: No registered users and 1 guest