Hello
I would start by looking at the logs when that happens. The gateway would
only get marked "ip" when there is no reply by the gateway or when it
replies with 500. Also OPTIONs not being replied promptly.
Maybe add some logging right before ds_mark_dst("ip").
Hope that helps,
Regards,
David Villasmil
email: david.villasmil.work(a)gmail.com
phone: +34669448337
On Wed, Sep 16, 2020 at 11:40 AM Sergio Charrua <sergio.charrua(a)voip.pt>
wrote:
Hello,
Using Kamailio 5.1.6 for load balancing & failover,
I noticed that from time to time, and very rarely, the dispatcher module
stops dispatching to the Asterisk servers.
I have to execute a "kamcmd dispatcher reload" for it to (re)start working.
This is my dispatcher.list :
1 sip:10.19.XXX.YYY:5060 0 1 duid=sipgw01;maxload=100
1 sip:10.19.XXX.YYY:5060 0 2 duid=sipgw02;maxload=100
1 sip:10.19.XXX.YYY:5060 0 3 duid=sipgw03;maxload=100
1 sip:10.19.XXX.YYY:5060 0 4 duid=sipgw04;maxload=100
This is my dispatch routes:
# Dispatch requests
route[DISPATCH] {
if(!ds_select_dst("1", "10","4"))
{
xlog("L_INFO","no destination selected from dispatcher
list!");
send_reply("404", "No destination");
exit;
}
xlog("L_INFO","going to <$ru> via <$du>\n");
t_on_failure("RTF_DISPATCH");
route(RELAY);
exit;
}
# Sample failure route
failure_route[RTF_DISPATCH] {
if (t_is_canceled()) {
exit;
}
xlog("L_INFO", "Media server $du failed to answer, selecting
other
one!");
# next DST - only for 500 or local timeout
if ( t_check_status("500") || (t_branch_timeout() &&
!t_branch_replied()) )
{
#mark the destination Inactive and Probing
ds_mark_dst("ip");
if(ds_next_dst())
{
t_on_failure("RTF_DISPATCH");
route(RELAY);
exit;
}
}
}
I suspect that the ds_mark_dst("ip") command in RTF_DISPACTH is the cause.
Is there any think I can improve on this? Or any know bug with the
dispatcher in Kamailio 5.1.6 version?
Thanks in advance,
*Sérgio Charrua*
_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users(a)lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users