FreePBX Hot Spare Sip Registration Issue

I have setup 2 freepbx servers in a hot spare configuration. Primary FreePBX server in Milwaukee and the Hot Spare in Phoenix. I use a DNS company to monitor my primary server and if necessary it fails over to the Pheonix server. Once this happens I have the phones setup to check for registration every 3 minutes so within 3 minutes it try’s to register can’t so it goes through a re-registration process including going out and getting the fail-over ip address from the DNS company and everything is great. Normally all the phones that were on the primary server now are automatically connected to the fail-over server within 3 minutes.

The problem is this. So now we have repaired the primary server and I would like all phones to go back to the primary server. I change the ip address at the DNS company back to the primary ip address and not all the phones go back to the primary server within the 3 minutes. Some do however most don’t. What I believe is happening here is that the phones that are connected to the Phoenix server look for registration every 3 minutes as they are programmed to do, and the phone is finding the server and registration is good so it is NOT going out and getting the new updated ip address.

So what I did to prove my theory was connect to the Phoenix server and I shutdown asterisk (fwconsole stop) and within 3 minutes every phone automatically re-registered to the Milwaukee server. So yes indeed if the phone is unable to get a good registration it goes out and updates the DNS record for the sip server’s url and gets the updated ip address.

My question is this … is their a Grandstream GXP2160 function / parameter that I can program within my basefile editor / Endpoint Manager that will force it to update the dns entry of the sip server every 3 minutes when it checks registration.

If I did not provide the proper details for you to assist me I apologize in advance, I thought the general overview of the situation was more important to understand the problem and question. Please feel free to ask for any details that you find necessary to assist with this.

I suggest you change your approach and try something like this:

  • Set up a simple cronjob on the server on Phoenix (or wherever your backup is) to run every 3 (?) minutes - or maybe once a minute.
  • Check to see if the “master IP” matches the local IP in DNS. If so, you are in backup mode and can stop since the backup is the primary.
  • Have the backup scan for connected phones (get a count of registered phones).
  • If there are registered phones, terminate the Asterisk process on the local server, sleep for 210 seconds, and restart the service.

This way, if you decide to switch to a different phone or the phones you have don’t do this specialized thing, your goal is still met.

There are a few things that are going to be critical to your success, the first of which is that your DNS provider cannot switch the service back until Asterisk is running.