<div dir="ltr"><div dir="ltr"><br></div>Hi Sergio,<br><br>Make sure your dispatcher probing parameters are set correctly. (reply codes as well).<br><br><div>And if it happens again you can catch OPTIONS traffic with sngrep "CSeq: [0-9]+ OPTIONS"<br>and see what happens on this level.<br>Whether Kamailio does send pings, whether replies from gw are the same as expected, etc. <div><br></div><div><br></div><div>Regards,</div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Sep 16, 2020 at 5:55 PM David Villasmil <<a href="mailto:david.villasmil.work@gmail.com">david.villasmil.work@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hello <div><br></div><div>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.</div><div>Maybe add some logging right before ds_mark_dst("ip").</div><div><br></div><div>Hope that helps,</div><div><br></div><div>Regards,<br></div><div><div><div dir="ltr"><div dir="ltr"><div><br></div>David Villasmil<div>email: <a href="mailto:david.villasmil.work@gmail.com" target="_blank">david.villasmil.work@gmail.com</a></div><div>phone: +34669448337</div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Sep 16, 2020 at 11:40 AM Sergio Charrua <<a href="mailto:sergio.charrua@voip.pt" target="_blank">sergio.charrua@voip.pt</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Hello,<div><br></div><div>Using Kamailio 5.1.6 for load balancing & failover, </div><div>I noticed that from time to time, and very rarely, the dispatcher module stops dispatching to the Asterisk servers. </div><div>I have to execute a "kamcmd dispatcher reload" for it to (re)start working.</div><div><br></div><div>This is my dispatcher.list :</div><div><div>1 sip:10.19.XXX.YYY:5060 0 1 duid=sipgw01;maxload=100</div><div>1 sip:10.19.XXX.YYY:5060 0 2 duid=sipgw02;maxload=100</div><div>1 sip:10.19.XXX.YYY:5060 0 3 duid=sipgw03;maxload=100</div><div>1 sip:10.19.XXX.YYY:5060 0 4 duid=sipgw04;maxload=100</div></div><div><br></div><div>This is my dispatch routes:</div><div><div># Dispatch requests</div><div>route[DISPATCH] {</div><div> </div><div> if(!ds_select_dst("1", "10","4"))</div><div> {</div><div> xlog("L_INFO","no destination selected from dispatcher list!");</div><div> send_reply("404", "No destination");</div><div> exit;</div><div> }</div><div><br></div><div> xlog("L_INFO","going to <$ru> via <$du>\n");</div><div><br></div><div> t_on_failure("RTF_DISPATCH");</div><div> route(RELAY);</div><div><br></div><div> exit;</div><div><br></div><div>}</div></div><div><br></div><div><div># Sample failure route</div><div>failure_route[RTF_DISPATCH] {</div><div> if (t_is_canceled()) {</div><div> exit;</div><div> }</div><div> xlog("L_INFO", "Media server $du failed to answer, selecting other one!");</div><div> # next DST - only for 500 or local timeout</div><div> if ( t_check_status("500") || (t_branch_timeout() && !t_branch_replied()) )</div><div> {</div><div> #mark the destination Inactive and Probing</div><div> ds_mark_dst("ip");</div><div> if(ds_next_dst())</div><div> {</div><div> t_on_failure("RTF_DISPATCH");</div><div> route(RELAY);</div><div> exit;</div><div> }</div><div> }</div><div>}</div></div><div><br></div><div>I suspect that the ds_mark_dst("ip") command in RTF_DISPACTH is the cause. </div><div>Is there any think I can improve on this? Or any know bug with the dispatcher in Kamailio 5.1.6 version?</div><div><br></div><div>Thanks in advance,</div><div><br></div><div><b style="color:rgb(0,0,0);font-family:Calibri,sans-serif"><span style="font-family:Arial,sans-serif">Sérgio Charrua</span></b><br></div><div><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><p style="font-size:11pt;color:rgb(0,0,0);margin:0px;font-family:Calibri,sans-serif;background-color:rgb(253,253,253)"><br></p></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote></div>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Arsen Semenov<br></div><div><br></div></div></div></div></div></div>