[SR-Users] Kamailio w/ external routing server

Daniel Tryba d.tryba at pocos.nl
Fri Aug 7 10:50:58 CEST 2015


On Wednesday 05 August 2015 10:08:05 Eric Babcock wrote:
> The reason I tried using dispatch, is because I have multiple routing
> servers I would like to load balance across or even failover if one goes
> down. 

Like Alex mentioned, that is a correct way to handle calls.
The way I do it is to have a dispatcher on in the kamailio server pointing to 
the redirectors/routing servers. The routing server has multiple dispatchers, 
1 per vendor. If the vendor has multiple servers, they are just part of the 
dispatcher. The redirector knows which targets are up and running.

The dispatcher logic on the kamailio server is the "standard" kamailio config 
logic.

The redirector has the following logic:

//businesslogic setting $var(dispatcherid

if(!ds_select_domain($var(dispatcherid), 4))
{
   send_reply("503", "No dispatchers available");
   exit;
}

send_reply("302", "Redirect");
exit;

Alternative logic might be to implement all dispatchers targets on the 
kamailio server and have the redirector communicate which one to use, in the 
"failure route" of the 302, reset the dispatcher with the info from the 
redirector.

If you can't get it to work, use xlog and packet captures to debug the 
problem.



More information about the sr-users mailing list