[asterisk-ha-clustering] Load sharing between two asterisk servers
Johansson Olle E
oej at edvina.net
Wed Jan 9 03:46:45 CST 2008
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
More information about the asterisk-ha-clustering
mailing list