Extensions reconnecting after router/power reboot UDP

I have more than a few FreePBX servers, and a few hundred phones behind all kinds of routers and networks. One common issue I find is that at some places, when there’s a router reboot the phones don’t always come back right away - and sometimes never - unless we log into the phones and change the LOCAL SIP PORT.

We exclusively use Yealink phones and otherwise love them, but this happens to them, and also to some Polycoms we use.

We typically assign our phones random ports in the 8000-12000 range and are using PJSIP on our freepbx server. We are NOT having stability issues outside of this ‘the router rebooted’ issue - the phones themselves act fine - even come back generally OK if we have to reboot the FreePBX server itself or there is internet latency/timeouts.

Anyone have experience on this, and/or a tweak?

Here’s an example of of our config

account.1.auth_name = 100
account.1.display_name = 100 Mgr
account.1.dnd.off_code = *79
account.1.dnd.on_code = *78
account.1.enable = 1
account.1.label = 100 Mgr
account.1.missed_calllog = 0
account.1.session_timer.expires = 120
account.1.sip_server.1.port = 5260
account.1.sip_server.1.retry_counts = 10
account.1.sip_server.2.port = 5260
account.1.sip_server.2.retry_counts = 10
account.1.subscribe_mwi = 1
account.1.subscribe_mwi_to_vm = 1
account.1.subscribe_register = 1
account.1.user_name = 100

sip.listen_port = 11000

This trouble is usually caused by a ‘poisoned’ NAT association being kept alive by aggressive retries.

I don’t know what the provisioning parameter is called, but try setting SIP Registration Retry Timer to 600 (presumably longer than the UDP timeout in the problematic router).

Reboot router, wait 15 minutes and check for registration.

I don’t believe this is related to registration. If you want to re-register every two minutes, find the setting corresponding to Server Expires.

Great advice. I’m thinking it’s one of these two maybe? I’ve updated their values to being over 600 (as the most UDP timeout I’ve seen on a router has generally been 600)

account.1.nat.udp_update_time = 700
account.1.reg_fail_retry_interval = 700

I’m fairly sure that is correct. Give it a try.

If no luck, test by removing power from the phone for at least 10 minutes. If it won’t register when power is reapplied, my theory was wrong and you’ll need to investigate further.

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