[asterisk-dev] Storing SIP Registrations in a Database

JR Richardson jmr.richardson at gmail.com
Wed Sep 3 11:28:19 CDT 2008


> The setup we are planning on using has, unsurprisingly, a primary and a
> secondary server.  When the primary server goes down, DNS switches to
> pointing at the secondary server, which allows the system to continue
> working as before.
>
> Unfortunately, when this switchover occurs, all the clients lose their
> registrations as the registration details are stored solely in memory on
> the primary server.  It then takes some time for the clients to
> reconnect to the secondary server, during which time they are unusable.
>
> A solution that we are considering is the storing of the SIP
> registrations within a database which would be replicated from the
> primary server to the secondary server.  This would allow Asterisk on
> the secondary server to use the registration details that were extant on
> the primary server.
>
This is really a discussion for asterisk-ha-clustering at lists.digium.com list.

What you are trying to accomplish has been done and the list archives
should give you examples.

Basically, you can setup 2 identical asterisk servers, run Ultramonkey
between them with a floating IP address and setup rsync to keep the
astdb, configs, vm current on both servers, so if the primary server
goes down, the secondary server will startup with the same IP address
of the primary and start asterisk with a current astdb that has all
the sip registrations.  It works fine albeit a bit tricky to get up
and running if you don't have any experience with linuxha.  The only
caution is do not allow auto switch over if the primary server comes
back on line.

I did manage to set this up in my lab over a year ago and was
impressed with the functionality, it worked great, even after many
switched between primary and secondary servers and the phones all
stayed registered and available for contact.

Hope this helps.

JR
-- 
---------------------
JR Richardson
Engineering for the Masses



More information about the asterisk-dev mailing list