[asterisk-ha-clustering] Load sharing between two asterisk servers

Ricardo Carvalho rjcarvalho at gmail.com
Wed Jan 9 05:10:18 CST 2008


I thought that even working with realtime sip, SIP peers registration is
kept in astDB (as running memory for asterisk), because I have a problem
related to this - even with mysql databases synced with mysql replication,
when my standby machine assumes production, none of my phones are known by
the Asterisk running in the backup machine that assumes production, and so,
I had to make a script to reboot all phones when the standby machine enters
production so that they register with the backup server's Asterisk.

Can this be done some other way? Is it DUNDI, regexten or regcontext usefull
to avoid rebooting all phones so that they register again?

Thanks in advance,
Ricardo Carvalho.




On Jan 9, 2008 9:46 AM, Johansson Olle E <oej at edvina.net> wrote:

>
> 9 jan 2008 kl. 10.42 skrev Yehavi Bourvine +972-8-9489444:
>
> > Hello,
> >
> >  I know this is not a pure High Availability question, but I think
> > it is
> > related...
> >
> >  I would like to do  load balancing between two Asterisk servers and
> > allow the
> > phones to use the other server as backup. Asterisk is installed on
> > both
> > systems, the users (extensions) are defined in MySQL database
> > (realtime
> > Asterisk); the MySQL database is replicated on both systems.
> >
> >  What I see is that only the server to which the phone registered
> > knows about
> > its location. The other server doesn't know it, and thinks that the
> > phone is
> > offline (although I see its current address in the MySQL record).
> >
> > The realtime section of SIP.CONF is as follows:
> >
> > rtcachefriends=yes
> > rtsavesysname=yes
> > rtupdate=yes
> > rtautoclear=yes
> > ignoreregexpire=yes
> >
> > I tried setting rtsavesysname=no but it didn't change the behaviour.
> > Any idea
> > what I am doing wrong, or how to do it?
> >
> > BTW, I tried to code  the dialplan to check the sysname field in
> > MySQL; if it
> > finds that the phone is on the other server then to direct the call
> > to there.
> > However, it then fails authentication (even if I set bith servers to
> > be
> > "insecure") :-(
>
> This is why we have Dundi :-) and the regexten= parameter in channel
> drivers.
>
> I don't understand why you fail authentication between the servers,
> but that's propably just
> a configuration issue that you can solve.
>
> You can do a lookup in the Msyql table, since the server who receives
> the registration will store it in the database. In newer versions of
> Asterisk, you also have the option of storing the system name of the
> server, so that you can redirect the call through that server out to
> the client. With NAT, you have to send the call from the same IP
> address in order to reach the client.
>
> /O
>
> _______________________________________________
> --Bandwidth and Colocation Provided by http://www.api-digital.com--
>
> asterisk-ha-clustering mailing list
> To UNSUBSCRIBE or update options visit:
>   http://lists.digium.com/mailman/listinfo/asterisk-ha-clustering
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-ha-clustering/attachments/20080109/d4350237/attachment.htm 


More information about the asterisk-ha-clustering mailing list