[OpenSIPS-Users] Asterisk Cluster Scenario

Stanisław Pitucha viraptor at gmail.com
Sun Sep 26 00:02:20 CEST 2010


On 25 September 2010 11:22, Stefano Sasso <stesasso at gmail.com> wrote:
> The single asterisks instances talk each-other with DUNDi/IAX2 to pass
> the calls from an op to another op registered on another server.
Not sure how do transfers work in such situations... but make sure you
check all your scenarios. Things like incoming call that gets
attended-transferred over SIP over IAX over SIP again to someone who
then blind transfers it, can get pretty interesting. Especially when
you're using loadbalancing with unpredictable routing. Also, do you
really want people registered directly on asterisks? If one of them
goes down, clients can't connect anymore (unless you're planning to do
some failover there too).

> We'll use a mysql database (NDB cluster) to avoid to have multiple
> sip.conf files with the registration informations (asterisk-rt).
Unless you've got previous experience with NDB, think about it again.
You can safely push thousands of queries per second to a single mysql.
You can use master-slave for reliability, or even master-master with
mysql-proxy (or haproxy) in front if you want to balance writes.
Everyone and their dog knows mysql replication. The only people who
really understand NDB (and no - the documentation is not enough) live
on #mysql-ndb on irc.freenet. If anything fails, they're going to
solve your problem, but only if you install newest version of mysql
from source ("yeah - that's a known problem, it may be fixed in
7.0.123421-experimental-alpha-can't-download-it-officially") and send
them your complete logs for analysis. Also corrupted data nodes can
halt writes for the whole cluster (at least they did for me in 5.1.2X
and 6.something). Crashing data nodes sometimes eat your data and
refuse synchronisation unless manually deleted (and resynchronised
later on).
You'll also learn that if your configuration fails to start, it's not
a bug (http://bugs.mysql.com/bug.php?id=28292)... And it's basically
impossible to monitor correctly (data node errors can be reported by
manager or frontend... try figuring out what exactly failed with 6
nodes online)
Sigh... sorry for the rant - maybe I did something wrong, but I read
the docs and made sure to follow pointers and... I wouldn't touch it
with a 10 foot pole anymore :(

> The SIP servers are behind NAT, because the customer want to use only
> one public IP address; every asterisk server will have a different RTP
> port range to avoid rtp conflicts.
As long as you're sure it's configured correctly...

> So, we started thinking about use OpenSIPS (formerly OpenSER) as a SIP
> load-balancer. (the customer has server hardware that could be used
> for this, and we will use VRRP for redundancy).
Good - it works quite well this way. If you want some
super-super-reliability and you're ok with paying for it, check with
Bogdan and voice-system.ro - you can get some nice possibilities which
are not offered by standard opensips.

> In the OpenSIPS features we read "load balancing with failover", but
> we could not find any useful and complete configuration example.
> Is OpenSIPS able to know if an asterisk server is UP or DOWN, or must
> we use a 3rd part tool, like mon?
You can mark the server as being down either from opensips itself
(when you receive an error in failure route), or externally.

> Anyone has experience in use OpenSIPS as SIP load balancer (not to
> work as "real" SIP proxy)?
It works ;) but I'm ok with dispatcher instead of full load-balancer.
Although for some scenarios it's easier to have it setup between PBX
and PSTN as well as between PBX and clients. This way clients don't
even know about Asterisks crashing (well... apart from calls dropping
of course) and all your registrations go to one place, instead of each
phone being configured differently.

In general - yeah - Opensips should work just fine in this case.

Regards,
Stanisław Pitucha



More information about the Users mailing list