Asterisk in cluster

I am currently running Asterisk 1.6 in just one machine and I would like to install it in another one to get a cluster with true load-balancing and high availability.

I am looking at DUNDi, but I am not sure if that’s what I need, because I want a dynamic load-balancing system and DUNDi seems to allow only some kind of static load-balancing.

Is there any way to achieve this?


You’ll have to provide a little more information on what type of services your asterisk server is going to be providing. Depending on what it will be doing and how it will be used will help dictate the best method for scaling out.

Thanks for your answer!

Asterisk will be providing internal SIP calls and external calls through several ISDN lines by using external hardware. Besides, there will be a few fax machines connected to analog phone lines through Asterisk. In that case, we will be using Linksys’ SPA3102 devices.

Other features would be desirable, but not critical, like voicemail.

We don’t expect to have more than 50-60 simultaneous calls and around 120 users.

Hope that’s enough information.

will asterisk be a pure SIP environment? i.e. will it be communicating with the “external hardware” using SIP?

(talking about the ISDN lines, not that fax machines)

Yes. It will be a 100% SIP system.

Each of your sub-systems will have it’s own challenges.

For your SIP to SIP calls, I would suggest something more along the lines of OpenSIPs or Kamailio (both a fork of OpenSER). Any of these running on decent hardware will be able to register 10s of thousands of users and setup hundreds (or thousands) of calls per second. They both do a much better job of NAT traversal than asterisk. The only hiccup would be if you needed asterisk to stay in the media path for call recording (or network issues). There is a media proxy component, but that would defeat the purpose as you would no longer have such a scalable SIP proxy if it was forced to process media.

Generally most people can get away with running a single OpenSER server with LinuxHA (heartbeat) for high-availability and failover.

OpenSER and asterisk are not mutually exclusive. You would still want to forward calls off to an asterisk server for voicemail purposes, and obviously your asterisk systems would still handle the FAX processing.

Once you insert OpenSER into your network, you have MUCH more control over where your calls terminate and how they reach their destination.

Thanks for your advise. I’ll take a look at OpenSIPs and LinuxHA.