I'm using OpenSER 1.2.2. I can't get the dispatcher to do failover.

Here's my module parameters...

modparam("dispatcher", "list_file", "/etc/openser/dispatcher.list")
modparam("dispatcher", "flags", 2)
modparam("dispatcher", "dst_avp", "$avp(i:271)")
modparam("dispatcher", "grp_avp", "$avp(i:272)")
modparam("dispatcher", "cnt_avp", "$avp(i:273)")
modparam("dispatcher", "force_dst", 1)
modparam("tm","fr_timer",3)

Here's my dispatcher list file:
1 sip:119.42.149.76:5099
1 sip:119.42.149.79:5099

And, my routing logic is below.

The first thing that I don't understand is that when I print $avp(i:271) I get "sip:119.42.149.76:5099". Where did the other IP address form the list file go? When I print $avp(i:273), I get "2" which is supposed to be the count of the number of items in the list. Where's the other IP gone? I only see one.

The failover routing doesn't work. When OpenSER fails to connect to the first IP, it goes into failure_route(11) like it is supposed to, but it DOES NOT try the other IP address (the one that is missing from $avp(i:271)). I have confirmed this by running ngrep on port 5060.

So... question is... why is the dispatcher only loading one entry from the dispatcher list file into the avp?

Doug.


route[10] {
    xlog("L_INFO","Inbound Routing");
    t_on_failure("11");
    ds_select_dst("1","4");
    xlog("L_INFO","---> $avp(i:271) $avp(i:272) $avp(i:273)");
    forward();
    xlog("L_INFO","Trying first route $dd $od $rd $td $br");
    t_relay();
}

failure_route[11] {
    xlog("L_INFO","First route failed. Trying second");
    if(t_check_status("408") ){
        ds_next_dst();
        t_on_failure("12");
        t_relay();
    }
    else {
        t_reply("501", "Not Implemented");
    }
}

failure_route[12] {
    route(13);
}

route[13] {
    xlog("L_INFO","CRAP");
    return;
}





Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.