[OpenSIPS-Users] Dispatcher module and virtual IP (Linux HA, heartbeat) problem

paul.degt at gmail.com paul.degt at gmail.com
Thu Jan 8 04:40:26 CET 2009


I have opensips 1.4.2 running under Centos 5 64 bit load balancing 
requests to 2 * boxes via dispatcher module.
Works just fine if I use fixed IP of the opensips box, but if I try to 
use virtual IP assigned by heartbeat daemon seems like 
ds_select_domain("1", "0") starts failing, I see
all request going to failure route with 408 status. I do see that 
opensisp listens to the virtual IP (by default it binds to all available).
What can be a problem? Is it a known limitation of ds_select_domain 
function or ...?
Here is my configuration:

route{

    if (is_method("INVITE")) {

              # replace domain part with first dispatcher target of group 1
             ds_select_domain("1", "0");

             # set fr_timer to 3 seconds (3 seconds for failover)
        #     avp_write("i:3", "$avp(fr_timer)");
             t_on_failure("1");       
              t_relay();
             exit;
 }

failure_route[1] {
    xlog("L_NOTICE", "----> failure_route[1] <----\n");

    if (t_was_cancelled()) {
        exit;
    }
   
    if (t_check_status("408")) {

    xlog("L_NOTICE", "----> failure_route: status 408 <----\n");

    # ds_mark_dst("P") ;

    # replace domain part with next dispatcher target
          if (ds_next_domain()) {
                t_relay();
                exit;
    }
    else {
        t_reply("503", "Service unavailable");
        exit;
    }         
   
}






More information about the Users mailing list