I am configuring a Asterisk SIP server. I am able to receive incoming and send outgoing calls. I am worried about more traffic or emergency situations. Please answer the following
How can I configure two or more Asterisk SIP servers to load balance between them?
1a) Right now I configure all users as userA@sipserver1addr.com . If I am load balancing how should I determine the next available asterisk SIP server ? Is there any existing framework or library or configuration available?
You can use Opensips as a load balancer. It will act as a SIP proxy which sends calls to one of 2 asterisk boxes. If one fails, Opensips sends calls only to one which is alive. It works, but has disadvantages:
You have to install Opensips on other server, so You will need 3;
For asterisk Opensips is a one peer, so I couldn’t figure out how to make unique settings for every peer that send to Opensips, eg. different codecs order.
You have to make some tests;
and others…but I use this solution and it works well without any issue for about 6 months.
Yes, load balancing in Opensips is quite well described. I don’t know the number of exact calls, but now it’s about 3000 calls divided into 2 asterisk servers, 1500 per each of them.