[asterisk-users] OpenSER for Asterisk Load balance

Edgar Guadamuz eguadamuz at gmail.com
Thu Nov 1 18:56:40 CDT 2007


Hi, guys

I´ve just seen thta OpenSER can be coupled with Asterisk for load
balance, with the dispatcher module, something like this:

dispatcher.cfg file

# group  sip addresses of your * units
1 sip:10.1.2.3:5060
1 sip:10.1.2.4:5060
1 sip:10.1.2.5:5060

the basic openser.cfg should be like:

loadmodule("dispatcher.so")

...

if ( method=="INVITE" ) {
# dst_select( "GROUP", "HASH METHOD")
 dst_select("1","4");
 sl_send_reply("100","Trying");
 forward(uri:host, uri:port);
 exit();
}

That´s OK, but what about failover, I mean, if a Asterisk box crashes,
the dispatcher module will continue sending requests for that IP and
in this case something like heartbeat had to be implemented to take
the failed IP, but it would be more efficient if we could have OpenSER
monitoring the Asterisk servers health, anyone knows how?



More information about the asterisk-users mailing list