[asterisk-users] Extensions routing

David Klaverstyn david at klaverstyn.com.au
Sat May 19 03:13:55 CDT 2012


The way I accomplish this is by having an active/passive cluster.  The two or more servers have individual IP addresses and running heartbeat creates a clustered IP address.  The active server uses the cluster IP address.  If the active server should fail then the cluster IP address moves to another server.  Each handset and peer uses the clustered IP address to communicate to the server.  This way all devices only communicate to a single server and you don’t have the problem of having different devices connected to different servers.

I have created a Wiki page based on this which may help you. http://www.klaverstyn.com.au/david/wiki/index.php?title=Cluster

The wiki mentions a script file to copy files between servers to keep the data consistent.  To do this more efficiently DRDB should be used but the scripts works well in my situation.



From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Mikhail Lischuk
Sent: Saturday, 19 May 2012 5:48 PM
To: asterisk-users at lists.digium.com
Subject: [asterisk-users] Extensions routing


Greetings!

I've been playing around with "clustering" some Asterisk servers for sake of fail-over and load balancing with DNS round-robin, and came to one problem.

If I have, say, 2 servers, and clients register either on 1 or 2, how can I route extensions between them? I mean, if today user with extension 101 is registered on server1, and tomorrow he will register with server2 - how would any of servers know where to route it?

As some examples, if I have only 2 servers, things are not so bad. I can use Dial(SIP/101&SIP/server2/101) on server1 and vice versa. OR, I can check the hungup code, and if it's 34 (or whatever I get when I try to dial unavailable peer) - try it on another server.

But I guess things get tricky when you have 3 or more servers, and besides maybe this solution is not the best one. Could you share some knowledge on this, please?

--
With Best Regards
Mikhail Lischuk<mailto:mlischuk at itx.com.ua>




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20120519/082822bf/attachment.htm>


More information about the asterisk-users mailing list