hieppo wrote:Does anyone have any insight on what is happening and if there is any solution other than the manual method I have been doing?
I never have to reboot anything or switch proxy servers after recovering from an internet outage because my UDP timeouts have been adjusted correctly in my router for use with Freephoneline.
1. The next time the problem occurs, specify a new high random sip port in the ATA between 30000 and 60000.
Navigate to Line 1 (or whatever is being used for FPL)-->SIP settings, change SIP Port to a random number between 30000 and 60000.
Do not use the same random SIP port for any other Line. Always choose a different random local SIP port for each FPL account you're using.
Save setting. Reboot ATA.
If changing local SIP Port works, you were dealing with a corrupted NAT connection in your router.Possibly a NAT router connection was never disconnected or never timed out properly. And, then, the
ATA keeps the corrupted connection in a persistent state over and over again. (Credit goes to Mango for
this information). Possibly, this problem is due to the router's UDP timeout being in excess of the ATA's
Failure Retry timer. With FPL, that's 120 seconds.
Thanks to Mango, many of us now understand that in order for ATAs to remain registered and working properly with a VoIP SIP provider like Freephoneline, in particular after power failures, the following conditions must be met:UDP Unreplied Timeout (in your router) < NAT Keep-alive Interval (in your ATA; for Obihai ATAs this is X_KeepAliveExpires; for Grandstream, the setting is SIP OPTIONS Keep Alive Interval) < UDP Assured Timeout (in your router) < SIP Registration Failure Retry Wait Time (or RegisterRetryInterval in Obihai ATAs)
“<“ means less than.
When a modem leases a new IP address, a problem can arise where prior associations using the old IP address are maintained in the router. When the ATA attempts to communicate using the old IP address, the response is unreplied, and then if the UDP Unreplied timeout is greater than the Keep Alive Interval (and UDP Unreplied timeout is often set to 30 by default in consumer routers) a problem arises where the corrupted connection persists. If UDP Unreplied timeout is, for example, 15, and the NAT Keep Alive Interval is 20, then the corrupted connection will timeout or close. A new connection will be created, and everything will work fine.
Another problem can occur when the Keep-Alive interval is greater than UDP Assured Timeout (often 180 by default in consumer routers): the NAT hole will close due to the ATA not communicating frequently enough with the SIP server. In turn, incoming calls may, intermittently, not reach the ATA. Again, X_KeepAlivesExpires (SIP OPTIONS Keep Alive Interval) is supposed to be 20 with FPL.
Getting access to both UDP Unreplied Timeout and UDP Assured Timeout settings in consumer routers may be difficult, if not impossible.
Asuswrt-Merlin (I would avoid any model below/less powerful than an RT-AC68U), third party firmware for Asus routers, does offer easy access to these two settings, which are found under General–>Tools-->Other settings. My understanding is that third party Tomato firmware has these two settings as well. So if your router supports Tomato firmware, that may be another option. Note that I will not be held accountable any damage resulting from failed firmware updates. Apparently, Mikrotik routers also allow users to change both Assured and Unreplied UDP timeout settings as well:
https://forums.redflagdeals.com/recomme ... #p28059363.
Router firmware that allows users to adjust Assured and Unreplied UDP timeouts include
Asuswrt-Merlin
Ubiquiti
Mikrotik
pfSense
Tomato
DD-WRT
The keep alive interval for FPL is 20. The SIP Registration Failure Retry Wait Time is 120. I use 15 for UDP Unreplied Timeout and 115 for UDP Assured Timeout.
2. You mentioned an Asus router.
If Asuswrt-Merlin supports the router model being used, I would switch to Merlin: https://www.asuswrt-merlin.net/about. I will not be held responsible for failed firmware updates.
Afterwards, adjust UDP timeouts as described above.3. Double check the Registration timers.
a. Voice-->Line-->Proxy and Registration-->Register Expires needs to be 3600 seconds
b. Navigate to Voice-->SIP-->SIP Timer Values (sec). Ensure that Reg Retry Intvl is 120 seconds
c, Also, navigate to Voice-->SIP-->NAT Support Parameters. Ensure that NAT Keep Alive Interval is 20 seconds
These recommended settings can be found at
https://support.freephoneline.ca/hc/en- ... redentials.
If the ATA makes more than 5 registration attempts in 5 minutes (this limit may have changed; I don't want to test to find out),
you may end up being temporarily IP banned by the specific FPL server the ATA was sending
registration requests to.
If you're temporarily IP banned, you could then try switching ProxyServer
to a different FPL server than the one you were previously using (voip.freephoneline.ca,
voip2.freephoneline.ca, or voip4.freephoneline.ca:6060), unless you need to use
voip4.freephoneline.ca:6060 because you have SIP ALG forced on in your router. The purpose of
voip4.freephoneline.ca:6060 is to circumvent SIP ALG features in routers.
4. You can also try rebooting the modem–>router (wait for it to be fully up and transmitting
data)–>ATA (in that order). That is always proper device reboot order.