Sip trunk registration lost connection overnight

Hello,

The sip trunk lost connection last night at 12.30 pm (midnight) and the same happened exactly last Friday too at almost the same time. The provider UPC told me it’s possible that there is a short outage (maintenance work) during the night. What bothers me is why does FreePBX not reconnect?

The settings for the sip (legacy)
Registration Timeout: 30
Registration Attempts: 0
Registration Minimum Expiry: 60
Registration Maximum Expiry: 3600
Registration Default Expiry: 120

I believe Registration Attempts 0 means keep trying forever to register.

This morning when I looked at the Asterisk Info Reports for the registrar. It says “request sent” with an actual timestamp. So I assume that indeed FreePBX keeps trying to register. I also tried to look at the log in /var/log/asterisk. I do not see any registration attempt entry in the full.log. I see debug is on in log file settings.

Any idea why FreePBX might not re-register or how I can find a hint in the log?

Thanks

This sounds like you are using Chan-SIP to connect to your provider. If so, you can “upgrade” to PJ-SIP and solve the problem in one fell swoop. If not, please tell us more about your network and provider a /var/log/asterisk/full extract around the time the trunk fails so we can help you troubleshoot this.

When I had this kind of issue, it was due to the way PFSense handled the quick “disconnect-reconnect” during the ISP night maintenance.

I had to add the options “Kill all states on IP Change” and “Refuse DHCP lease from 192.168.100.1”

Might not be your case at all, I do not have enough information to tell.

Thanks - Upgrading to PJ-SIP works fine? So it means I create a new trunk with PJ-SIP? Can I use port 5060 too? I think that I can only use 5060 with the provider.

Since you are connecting via UDP, the port you use for PJ-SIP and the port your provider uses are unrelated. You can connect to their 5060 port by specifying the port number in the connection.

In modern FreePBX systems, your port 5060 is usually PJ-SIP, so even if they were related (and they aren’t, as we’ve just discussed) the connection should be simple enough to establish.

Okay many thanks I will try to change PJ-SIP over the weekend.

Hello - I configured PJ-SIP for the trunk. Let’s see how it works. The configuration was easy.

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