[OpenSIPS-Users] 1.5.2 dispatcher module behaviour

Taner Sener tanersener at gmail.com
Fri Aug 7 10:44:01 CEST 2009


Hi,

I'm using Opensips 1.5.2 to distribute incoming calls to my clients using
dispatcher module. I'm keeping my gateway list in db_mysql and use
ds_select_dst("1", "4"); to select a gateway using round-robin algorithm. I
have a few issues about the module behaviour.

- The first one is about pinging. I've configured dispatcher to send ping
requests every 20 seconds. But if destination is not available, ping
requests are repeated every 4 seconds. I guess there is another module which
repeats the unresponded sip messages. How can I prevent this and change the
repeat timeout about this?

- The second issue is about selecting gateways. When I receive busy from one
of the destinations I'm calling ds_next_dst() and this returns me a
destination which is not alive and does not respond to ping requests. I'm
expecting to have only destinations which are alive, and don't understand
why it is returned. Another issue here is: I'm sending INVITE request to
this dead destination and dead host is not responding as expected. After
that, every 4 seconds INVITE request is repeated for this dead destination.

How can I fix these issues?

Thanks,

--------------------
modparam("dispatcher", "db_url", "mysql://opensips:opensipsrw@localhost
/opensips")
modparam("dispatcher", "table_name", "dispatcher")
modparam("dispatcher", "setid_col", "setid")
modparam("dispatcher", "destination_col", "destination")
modparam("dispatcher", "flags_col", "flags")
modparam("dispatcher", "flags", 3)
modparam("dispatcher", "force_dst", 1)
modparam("dispatcher", "ds_ping_method", "OPTIONS")
modparam("dispatcher", "ds_ping_from",
"sip:dispatcher at 10.210.154.201<sip%3Adispatcher at 10.210.154.201>
")
modparam("dispatcher", "ds_ping_interval", 20)
modparam("dispatcher", "ds_probing_threshhold", 1)
modparam("dispatcher", "ds_probing_mode", 1)
#modparam("dispatcher", "use_default", 0)
modparam("dispatcher", "dst_avp", "$avp(i:271)")
modparam("dispatcher", "grp_avp", "$avp(i:272)")
modparam("dispatcher", "cnt_avp", "$avp(i:273)")
--------------------
t_on_failure("11");

ds_select_dst("1", "4");

xlog("L_INFO","ds_dispatcher $avp(i:271) $avp(i:272) $avp(i:273)");
xlog("L_INFO","ds_dispatcher Trying first route $dd $od $rd $td $br");

t_relay();
--------------------
failure_route[11] {
    xlog("L_INFO","ds_dispatcher First route failed. Trying second");
    if(t_check_status("408") ){
         if (ds_next_dst()){
             xlog("L_INFO","ds_dispatcher $avp(i:271) $avp(i:272)
$avp(i:273)");
             t_on_failure("11");
             t_relay();
        } else {
                xlog("L_INFO","ds_dispatcher Can not select the second
one");
        }
    } else if (t_check_status("486")) {
         if (ds_next_dst()){
             xlog("L_INFO","ds_dispatcher $avp(i:271) $avp(i:272)
$avp(i:273)");
             t_on_failure("11");
             t_relay();
        } else {
                xlog("L_INFO","ds_dispatcher Can not select the second
one");
        }
    } else {
        xlog("L_INFO","ds_dispatcher Run out of servers in
dispatcher.list");
    }
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20090807/cf8449e7/attachment.htm 


More information about the Users mailing list