Hi,<br><br>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.<br>
<br>- 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?<br>
<br>- 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.<br>
<br>How can I fix these issues?<br><br>Thanks,<br><br>--------------------<br>modparam("dispatcher", "db_url", "mysql://opensips:opensipsrw@localhost/opensips")<br>modparam("dispatcher", "table_name", "dispatcher")<br>
modparam("dispatcher", "setid_col", "setid")<br>modparam("dispatcher", "destination_col", "destination")<br>modparam("dispatcher", "flags_col", "flags")<br>
modparam("dispatcher", "flags", 3)<br>modparam("dispatcher", "force_dst", 1)<br>modparam("dispatcher", "ds_ping_method", "OPTIONS")<br>modparam("dispatcher", "ds_ping_from", "<a href="mailto:sip%3Adispatcher@10.210.154.201">sip:dispatcher@10.210.154.201</a>")<br>
modparam("dispatcher", "ds_ping_interval", 20)<br>modparam("dispatcher", "ds_probing_threshhold", 1)<br>modparam("dispatcher", "ds_probing_mode", 1)<br>#modparam("dispatcher", "use_default", 0) <br>
modparam("dispatcher", "dst_avp", "$avp(i:271)")<br>modparam("dispatcher", "grp_avp", "$avp(i:272)")<br>modparam("dispatcher", "cnt_avp", "$avp(i:273)")<br>
--------------------<br>t_on_failure("11"); <br> <br>ds_select_dst("1", "4");<br><br>xlog("L_INFO","ds_dispatcher $avp(i:271) $avp(i:272) $avp(i:273)");<br>xlog("L_INFO","ds_dispatcher Trying first route $dd $od $rd $td $br");<br>
<br>t_relay();<br>--------------------<br>failure_route[11] {<br> xlog("L_INFO","ds_dispatcher First route failed. Trying second");<br> if(t_check_status("408") ){<br> if (ds_next_dst()){<br>
xlog("L_INFO","ds_dispatcher $avp(i:271) $avp(i:272) $avp(i:273)");<br> t_on_failure("11");<br> t_relay();<br> } else {<br> xlog("L_INFO","ds_dispatcher Can not select the second one");<br>
}<br> } else if (t_check_status("486")) {<br> if (ds_next_dst()){<br> xlog("L_INFO","ds_dispatcher $avp(i:271) $avp(i:272) $avp(i:273)");<br> t_on_failure("11");<br>
t_relay();<br> } else {<br> xlog("L_INFO","ds_dispatcher Can not select the second one");<br> }<br> } else {<br> xlog("L_INFO","ds_dispatcher Run out of servers in dispatcher.list");<br>
}<br>}<br><br><br>