Registration to SIP Trunk fail after network device restart

Hi everyone,

For a while, from time to time, the PBX was not able to re-register to external trunks until the PBX was rebooted.

Today I have been able to make tests and find out that when the router between Internet and the PBX is restarted, the PBX is not able to re-register. Whatever is tried, even restarting Asterisk do not work. The PBX must be rebooted to have it re-register.

The extensions works from both LAN and WAN.

Re-registration goes on every 60seconds without success until the PBX is rebooted. The same has been tested with 2 providers.

[2019-10-05 21:27:32] WARNING[1105]: res_pjsip_outbound_registration.c:796 schedule_retry: No response received from ‘sip:montreal7.voip.ms:5060’ on registration attempt to ‘sip:@montreal7.voip.ms:5060’, retrying in ‘60’
[2019-10-05 21:27:34] WARNING[1105]: res_pjsip_outbound_registration.c:796 schedule_retry: No response received from ‘sip:montreal7.voip.ms:5060’ on registration attempt to 'sip:
@montreal7.voip.ms:5060’, retrying in ‘60’
[2019-10-05 21:27:37] WARNING[1105]: res_pjsip_outbound_registration.c:796 schedule_retry: No response received from ‘sip:montreal7.voip.ms:5060’ on registration attempt to 'sip:***@montreal7.voip.ms:5060’, retrying in ‘60’
pbx
CLI> pjsip show registrations

<Registration/ServerURI…> <Auth…> <Status…>

voipms_***/sip:montreal7.voip.ms:5060 voipms_*** Rejected
voipms_***/sip:montreal7.voip.ms:5060 voipms_*** Rejected
voipms_***/sip:montreal7.voip.ms:5060 voipms_*** Rejected

Objects found: 3

Anyone have a solution that could fix this ? This is really a PITA… I actually have Zabbix monitoring “pjsip show registration” output and send alerts when trunks are down, but rebooting PBX should not be a solution…

I’m guessing that a ‘poisoned’ NAT association occurs during the network outage and the frequent retries keeps it alive. During the reboot, it times out. Try setting both General Retry Interval and Qualify Frequency for the trunk to 600.

If that doesn’t help, at the Asterisk console, type
pjsip set logger on
and cause the failure. If you see proper REGISTER requests going out and nothing coming back, use tcpdump to capture traffic to see whether it’s a firewall issue (the capture is before the firewall for inbound packets and after the firewall for outbound).

If neither pjsip nor the firewall are malfunctioning, please post:
ISP? Modem make/model? Separate router/firewall (if any) make/model/version? Any complex network config (multiple NICs, VLAN, VPN, etc.)?

If you have a static public IP address, you can make the system more robust by not using registration. I’m not a VoIP.ms customer, but believe that you can send incoming calls to a SIP URI, and that outgoing calls do not require registration. Also, for better security, set up the account for IP authentication.

So far with tests made during the weekend, as long as the registration do not happen during the outage, there is no problem. If the registration is tried during downtime, it then display the reject status until Asterisk is stopped for a random delay(between 10 and 20minutes). The trunks register immediately after a reboot…

We have some SIP software phones running from WAN side and they re-register as soon as the PBX get back online without any problems (both phones and trunks are PJSIP).

BTW, host of the trunk server is pingable from the PBX…

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