Distributed Asterisk?

While I understand that one cannot really load balance SIP, what about the PBX being in a distributed manner?

For example, I would build say two asterisk servers. Their config files, web server pages, voice mail, anything else which needs to be shared would be put onto shared storage. Then both machines would point to that share. Incoming SIP/RTP connections would be sent to either one of the boxes, sort of a flipping between boxes.

This would mean that SIP itself is not being balanced in any way, it comes in over a specific provider, is sent to a specific box on the network. The only twist is that there would be a front end which toggles between the back end servers.

I don’t see any need for worry about file locks or anything because any one user would only ever be on any one server. If that were a problem, I guess I could build them as part of a GFS cluster for example. Just don’t see any need for it.

The plus is that if one server went down, the other/s could keep serving up what ever is needed. The network paths for incoming and outgoing would never toggle so SIP/RTP should be fine.

Any thoughts on trying something like this? Basically, I want to achieve a high reliability in this setup.

Thanks for any input.

Mike

So far, I’ve split up much of the OS and the applications. Almost all of the config files, web directories structure, /var/lib/asterisk, /var/spool/asterisk are all working from remote storage.

The system seems to work fine in this manner. I won’t know about calls problems until I get to that point but at the very least, doing things this way would offload a server and allow for redundancy of various portions of one or many.

Will be trying to set up extensions/calls next.

Mike

I think using NFS for both boxes to the same location would work. You would really need to do some heavy testing. If you used real time for everything I think that would help out a lot.

Also if you wanted a second box just for fail over have a look at Heartbeat.

[quote=“Dovid”]I think using NFS for both boxes to the same location would work. You would really need to do some heavy testing. If you used real time for everything I think that would help out a lot.

Also if you wanted a second box just for fail over have a look at Heartbeat.[/quote]

Sharing the web apps isn’t much of a problem, even using LVS in front of a distributed setup is pretty simple. I’ve been testing taking the applications away from the server and it works fine, as it should.

The real issues are, when you have say three asterisk servers, each needs to know the status of an extension for example. So, where on the system does it get this information from? My guess is that each system also needs to know about this so that an extension can not only be authenticated but allowed to make/take calls. Where is that status mechanism?

What do you mean by the status of an extension ?

Since I would have say three pbx servers, sharing config files, etc, each one would need to know the status of an extension, meaning, authenticated, making a call, receiving one, getting a message, things of that nature, so that any of the servers can handle these things for that extension.

Mike

As far as making calls just have all the dialplans be the same. For status like if they are on the phone or not Dundi may help but I am not 100% sure. Some creative AGI’s should help to an extent.

They would definitely all have the same dial plans as they are all sharing the config files. Basically, I don’t care to load balance SIP or anything, just centralize multiple servers for better reliability.

If you just want fail over I would stick to one server with a second set up with heart beat.

I pretty much just want fail over, some redundancy so that there’s no down time. My understanding is that first, sip cannot be load balanced, it must take a static connection so this is what would first happen. If a server went down, that server would no longer be sent connections but those folks on their phones would lose their call and have to reestablish it.

This is what I am trying to avoid. The second part was that I was hoping to make the phone systems VM’s so that it would be easier to keep backups and snapshots along with development copies. This is much harder to do with physical machines.

I would then go with NFS, Heartbeat and OpenSIPs. This should work out the best for you. If one server fails then heartbeat on the second box would kick in. All the registrations would still be in mysql from OpenSIPs and you would have access to all of the sound files via NFS.

I use slightly different ways but the idea is the same. I have looked at the opensips project, just found it a couple of days ago actually.

Thanks for the input.

Mike

Np Mike. Good luck.