I want to build an asterisk cluster from 3 asterisk (13.x) nodes, one on US, one in Europe and one is Asia. Right now I have the 3 servers. Asterisk is using realtime infrastructure for sip/iax users, queues, cdr, cel, queue_logs. All users are using SIP and softphones.
Databases are replicated with a Master <==> Master solution so basically I have the “same” database on all locations and the datas are replicated realtime (1-2 minutes as the servers are far far away one from another).
Due to the fact that the queues table is replicated I have all queues on all locations, and this is the desired behavior as one server is backup for another.
What I want to accomplish is that no matter where a call is routed, to one of these 3 server the “system” should be able to find the available agents from that queue and ring to their device, no matter where the agent is logged in.
In order to replicate device states I have used Openfire XMPP, but here I have some discrepancies as often an user has different states in a specific queue on different servers.
ie. I have agent Adrian realtime IN_USE on one server where he is in call and realtime NOT_IN_USE on other server. The problem here is that if a calls arives in that queue in the second server this will try to place call to Adrian, not knowing that he is already in call. Due to this it will stress adrian as it will ring on 2nd line of softphone and the call is not going to other available agent.
I suspect that the issues are generated by the fact that I have all queues on all servers so that states are somehow altered by that.
I saw that there are setups where there is a dedicated queue server. Why is that ? to avoid this kind of issues or for load distribution ?
What is the recommended approach for asterisk clustering with a shared database scenario ?
Any thoughts on how can I achieve that ?
P.S. I have enabled callcounter in sip.com