Help in restoring SIP registration


I have two asterisk boxes connected using SIP registration.

Everything works fine except when the internet connection drops, although the internet connection restored the registration does not get resorted automatically, it shows “Request Sent”

Host dnsmgr Username Refresh State Reg.Time N jedpbx 105 Request Sent Wed, 05 Dec 2012 21:20:18
1 SIP registrations.

The registration stays like that till I reboot the system, reload sip or restart astererisk do not restore the registration.

Any help how to restore the registration automatically when the internet drops and restored?

Sounds like a firewall or routing issue. If you have fail2ban running, that may be causing your problem as it may see the retries for registration while the network is down as “too many SIP packets too frequently” and end up blocking. There may also be other router or firewall problems, it’s hard to tell since you haven’t described the actual network setup. It sounds like you know enough about what you’re doing to have command line access though, so next time it fails instead of rebooting the entire server try restarting fail2ban (if in use), or iptables.


Many thanks.
I do not use fail2ban, but I will try to restart iptables next time.

I am using only asterisk no FreePBX.

This is a FreePBX forum. You might have better luck trying the Asterisk forum.

The short answer is that it should re-register without difficulty in accordance with the various timers that are set by Asterisk.

Given the problem that you are describing it is very likely a firewall problem. Since you can reproduce the problem fairly easily, I’d start by inducing the problem and then rebooting your hardware firewall. If that solves the problem, then it is your hardware firewall that is the problem. If that doesn’t solve the problem, then it is likely a firewall that you’ve involved on the computer that is running Asterisk, and since you’re not running FreePBX, I have no idea what to suggest…

What version of FreePBX are you using? Is it a distro or installed by hand? The distro installs fail2ban for you so you might be using it and not know it.