Multiple Asterisk servers with queues/conference bridges

I have an Asterisk cluster set up with all of the basic functionality working. I can make outbound and inbound calls, route calls between them, etc. This is a cluster set up in a way that I can spin up another Asterisk server trivially. The only thing I’m using in front of these is a basic load balancer (no SIP Proxy).

The next thing I’m trying to address is how to handle queues and conference bridges. Let’s say a user calls an external number for “Conference 1” and the load balancer sticks them on “Server A”. Then another user calls in for Conference 1 and the load balancer puts them on “Server B”.

What happens? Each individual server only knows about it’s own channels/bridges, so I’ll have two people connected to the “same” conference bridge but on separate servers so they won’t be able to talk.

How should this be handled? Do I need to track the fact that Conference 1 started on Server A, then route all future callers to that server? Do I need to somehow join the two conference bridges between servers?

Thanks!

i have done this before. Let me give you my setup so that maybe you can pick up whats relevant as your case might be different. I had 2 asterisk boxes(A and B) working together to create an automated teleconferencing solution, users would just decide on the pin e.g 12345 and dial the number conferencing 123456789, then the conference room would be setup using the pin 12345. Now there were scenarios were caller Y lands on box A and creates a conference room 12345, then caller X lands on server B and the conference room is not there as its on box A.
This is what i did. immediately when a call lands on any box, using AGI i did a script that checks the existence of a conference room with the pin that the users has requested. If the conference room exist in the other server, the call is moved to that server hosting the conference and the user joins that conference. Something like that.
So in you case you might need a database to store your conference rooms created and remove when the conference is done. Then use scripts on all servers to check all the databases for the conference rooms.
Let me know if you need further clarity.

I think this is your best shot,

We had done something similar in past using DUNDi where all our servers were interconnected through IAX.

From what I remember,
(1)Server A receives the first call for Conf1 and creates the conference
(2)Server B receives another call for Conf1. Server B creates the conference and uses DUNDi to see if same conference exists on any other server. If yes (as is the case in this example) then send an IAX call to that Server (Server A here) and bridge both the conferences.

This is the simplified explanation of our call flow but to let you know we were using a lot of AMI actions/events to control conferences.

–Satish Barot

@mshutis, @satish4asterisk:

Thanks for your examples! This is basically what I was figuring that we would have to do. It won’t be super difficult to set up, just couldn’t find any documentation on this and whether Asterisk could natively do this. They do have some multi-server stuff but it seems limited to basically just being able to put serverName in the log files.

yes, your scripts on all servers will be firstly checking if a conference room exist already on any of the servers. If it does exist calls will be forwarded to the new server. If not the conference will be created on that box in future.