[SR-Users] load balancing redirect

Benjamin Lawetz benjaminlawetz at gmail.com
Thu Apr 15 23:04:33 CEST 2010


Hi,

 I'm trying to setup Kamailio to act as a load-balancer in front of
asterisk servers.

I want it to do the following:
- The UA sends an invite to Kamailio
- Kamailio sends a 30x redirect to the UA (dispatcher)
- The UA sends it's invite to the asterisk server

I've seen a couple of examples, but doesn't seem to work for me.

Here's the relevant config:

route{

  if (method=="REGISTER") {
  [...clip...]
  };
  if (method=="INVITE") {
    ds_select_domain("2","8");
    #ds_select_dst("2","8");
    sl_send_reply("300","Redirect");
    exit;
  };
}

What seems to happen is that Kamailio does send the redirect, but with
no indication of where to go. ds_select_domain (or ds_select_dst ... I
having trouble understanding the difference like many people it seems)
I'm guessing selects an appropriate uri, but doesn't put it the
contact for the redirect.

Is there anyway to see what was set by the ds_select_dst? what pv
would have this value?
What do I need to set prior to sending a redirect reply for it to be
properly forwarded?

BTW: using Kamailio 3.0.1

Thank you,
-- 
Benjamin




More information about the sr-users mailing list