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

Ricardo Carvalho rjcarvalho at gmail.com
Wed Jan 9 05:21:11 CST 2008


And should a synced AstDB database work to keep all phones registered in the
second server?
Wouldn't be preferred something like DUNDI or whatever?

Thanks,
Ricardo Carvalho.




On Jan 9, 2008 11:14 AM, Julian J. M. <julianjm at gmail.com> wrote:

> You can use DRBD for keeping a synced AstDB (/var/lib/asterisk/astdb)
> between both systems. Although you'll need heartbeat for mounting the
> DRBD partition when the standby machine becomes active.
>
> Julián J. M.
>
> On Jan 9, 2008 11:10 AM, Ricardo Carvalho <rjcarvalho at gmail.com> wrote:
> > 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
> > >
> >
> >
> > _______________________________________________
> > --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
> >
>
>
>
> --
> http://www.julianmenendez.es
>
> _______________________________________________
> --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/d31ecf2e/attachment.htm 


More information about the asterisk-ha-clustering mailing list