<div dir="ltr">Hello again,<div><br></div><div>Related question: how to log destination ip/port of dispatcher set from <span style="color:rgb(170,55,49);font-weight:bold;background-color:rgb(245,245,245);font-family:"Droid Sans Mono",monospace,monospace,"Droid Sans Fallback";font-size:14px;white-space:pre">failure_route</span>?<br></div><div><br></div><div><span style="background-color:rgb(245,245,245);color:rgb(68,140,39);font-family:"Droid Sans Mono",monospace,monospace,"Droid Sans Fallback";font-size:14px;white-space:pre">$si:$sp</span> works as expected in <span style="background-color:rgb(245,245,245);color:rgb(170,55,49);font-family:"Droid Sans Mono",monospace,monospace,"Droid Sans Fallback";font-size:14px;font-weight:700;white-space:pre">onreply_route</span> block:</div><div><div style="color:rgb(51,51,51);background-color:rgb(245,245,245);font-family:"Droid Sans Mono",monospace,monospace,"Droid Sans Fallback";font-size:14px;line-height:19px;white-space:pre"><div><span style="color:rgb(170,55,49);font-weight:bold">onreply_route[</span><span style="color:rgb(156,93,39);font-weight:bold">MANAGE_REPLY</span><span style="color:rgb(170,55,49);font-weight:bold">]</span> {</div><div>  xlog(<span style="color:rgb(68,140,39)">"L_NOTICE"</span><span style="color:rgb(119,119,119)">,</span> <span style="color:rgb(68,140,39)">"$rr ($rs) [$cs] ($ci) $si:$sp - $ua</span><span style="color:rgb(119,119,119)">\n</span><span style="color:rgb(68,140,39)">"</span>)<span style="color:rgb(119,119,119)">;</span></div><div>  <span style="color:rgb(75,105,198)">if</span> ( t_check_status(<span style="color:rgb(68,140,39)">"(503)|(408)|(480)"</span>) ) {</div><div>    xlog(<span style="color:rgb(68,140,39)">"L_WARN"</span><span style="color:rgb(119,119,119)">,</span> <span style="color:rgb(68,140,39)">"Server will be blacklisted: $si:$sp ($rs)</span><span style="color:rgb(119,119,119)">\n</span><span style="color:rgb(68,140,39)">"</span>)<span style="color:rgb(119,119,119)">;</span></div><div>  }</div><div>}</div></div></div><div><br></div><div>I tried to use this example <a href="http://www.kamailio.org/wiki/cookbooks/5.2.x/pseudovariables#t_req_pv">http://www.kamailio.org/wiki/cookbooks/5.2.x/pseudovariables#t_req_pv</a>, but get <null>:</div><div><div style="color:rgb(51,51,51);background-color:rgb(245,245,245);font-family:"Droid Sans Mono",monospace,monospace,"Droid Sans Fallback";font-size:14px;line-height:19px;white-space:pre"><div><span style="color:rgb(170,55,49);font-weight:bold">failure_route[</span><span style="color:rgb(156,93,39);font-weight:bold">MANAGE_FAILURE</span><span style="color:rgb(170,55,49);font-weight:bold">]</span> {</div><br><div>  <span style="color:rgb(75,105,198)">if</span> ( <span style="color:rgb(119,119,119)">!</span>t_check_status(<span style="color:rgb(68,140,39)">"(503)|(408)|(480)"</span>) ) {</div><div>    <span style="color:rgb(170,55,49);font-weight:bold">exit</span><span style="color:rgb(119,119,119)">;</span></div><div>  }</div><br><div>  xlog(<span style="color:rgb(68,140,39)">"L_WARN"</span><span style="color:rgb(119,119,119)">,</span> <span style="color:rgb(68,140,39)">"Server will be blacklisted: $T_rpl($si):$T_rpl($sp)</span><span style="color:rgb(119,119,119)">\n</span><span style="color:rgb(68,140,39)">"</span>)<span style="color:rgb(119,119,119)">;</span></div><div>  ds_mark_dst(<span style="color:rgb(68,140,39)">"IP"</span>)<span style="color:rgb(119,119,119)">;</span> <span style="color:rgb(170,170,170);font-style:italic"># Set current server to probbing state</span></div></div></div><div><span style="background-color:rgb(245,245,245);color:rgb(68,140,39);font-family:"Droid Sans Mono",monospace,monospace,"Droid Sans Fallback";font-size:14px;white-space:pre">$si:$sp</span> without <span style="background-color:rgb(245,245,245);color:rgb(68,140,39);font-family:"Droid Sans Mono",monospace,monospace,"Droid Sans Fallback";font-size:14px;white-space:pre">T_rpl</span> returns address and port of client.</div><div><br></div><div>Marat</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">вт, 14 сент. 2021 г. в 14:09, Henning Westerholt <<a href="mailto:hw@skalatan.de">hw@skalatan.de</a>>:<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 lang="DE" style="overflow-wrap: break-word;">
<div class="gmail-m_2121872921752637789WordSection1">
<p class="MsoNormal"><span>Hello,<u></u><u></u></span></p>
<p class="MsoNormal"><span><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB">regarding your previous question:
</span><span lang="EN-GB"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB">“How can such cases be managed and how can they be logged?”<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB">If you want to log the case that a destination goes offline, as mentioned have a look to the dispatcher event routes at the bottom of the docs.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB">If you have another question, please elaborate.
</span><span lang="EN-GB" style="font-family:"Segoe UI Emoji",sans-serif">😊</span><span lang="EN-GB"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB">Cheers,<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB">Henning<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB">-- <u></u>
<u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB">Henning Westerholt –
</span><span><a href="https://skalatan.de/blog/" target="_blank"><span lang="EN-GB" style="color:rgb(5,99,193)">https://skalatan.de/blog/</span></a></span><span lang="EN-GB"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-GB">Kamailio services –
</span><span><a href="https://gilawa.com/" target="_blank"><span lang="EN-GB" style="color:rgb(5,99,193)">https://gilawa.com</span></a></span><span>
<span lang="EN-GB"><u></u><u></u></span></span></p>
<p class="MsoNormal"><span lang="EN-GB"><u></u> <u></u></span></p>
<div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(225,225,225);padding:3pt 0cm 0cm">
<p class="MsoNormal" style="margin-left:35.4pt"><b>From:</b> Marat Gareev <<a href="mailto:maratkin94@gmail.com" target="_blank">maratkin94@gmail.com</a>>
<br>
<b>Sent:</b> Tuesday, September 14, 2021 1:02 PM<br>
<b>To:</b> Henning Westerholt <<a href="mailto:hw@skalatan.de" target="_blank">hw@skalatan.de</a>><br>
<b>Cc:</b> Kamailio (SER) - Users Mailing List <<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a>><br>
<b>Subject:</b> Re: [SR-Users] Manage blacklisting on network errors<u></u><u></u></p>
</div>
<p class="MsoNormal" style="margin-left:35.4pt"><u></u> <u></u></p>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">Hello,<u></u><u></u></p>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">Thank you for replying, but I don't understand how it will help me.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">I already use ds_mark_dst() and know how it works. Problem is that I can't control network errors with like this:<u></u><u></u></p>
</div>
<div>
<div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt;line-height:14.25pt;background:whitesmoke">
<span style="font-size:10.5pt;font-family:"Courier New";color:rgb(75,105,198)">if</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(51,51,51)">
</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(119,119,119)">(</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(51,51,51)">network_error</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(119,119,119)">()</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(51,51,51)">
</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(119,119,119)">||</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(51,51,51)">
</span><b><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(170,55,49)">timeout</span></b><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(119,119,119)">()</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(51,51,51)">)
</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(119,119,119)">{</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(51,51,51)"><u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt;line-height:14.25pt;background:whitesmoke">
<span style="font-size:10.5pt;font-family:"Courier New";color:rgb(51,51,51)">    xlog</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(119,119,119)">("</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(68,140,39)">L_WARN</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(119,119,119)">"</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(51,51,51)">,
</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(119,119,119)">"</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(68,140,39)">Server
</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(119,119,119)">$</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(122,62,157)">si</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(68,140,39)">:</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(119,119,119)">$</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(122,62,157)">sp</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(68,140,39)">
 has network problems and will be blacklisted.\n</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(119,119,119)">");</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(51,51,51)"><u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt;line-height:14.25pt;background:whitesmoke">
<span style="font-size:10.5pt;font-family:"Courier New";color:rgb(51,51,51)">    ds_mark_dst</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(119,119,119)">("</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(68,140,39)">IP</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(119,119,119)">");</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(51,51,51)"><u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt;line-height:14.25pt;background:whitesmoke">
<span style="font-size:10.5pt;font-family:"Courier New";color:rgb(119,119,119)">}</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(51,51,51)"><u></u><u></u></span></p>
</div>
</div>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">Marat<u></u><u></u></p>
</div>
</div>
<p class="MsoNormal" style="margin-left:35.4pt"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">вт, 14 сент. 2021 г. в 13:33, Henning Westerholt <<a href="mailto:hw@skalatan.de" target="_blank">hw@skalatan.de</a>>:<u></u><u></u></p>
</div>
<blockquote style="border-top:none;border-right:none;border-bottom:none;border-left:1pt solid rgb(204,204,204);padding:0cm 0cm 0cm 6pt;margin-left:4.8pt;margin-right:0cm">
<div>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">
Hello,<u></u><u></u></p>
<p class="MsoNormal" style="margin-left:35.4pt">
 <u></u><u></u></p>
<p class="MsoNormal" style="margin-left:35.4pt">
<span lang="EN-GB">you probably want to check the dispatcher module docs out for this ds_mark_dst(..) function. You find also some RPC commands to e.g. inspect on shell. You can also try the event-routes documented there to log some info.</span><u></u><u></u></p>
<p class="MsoNormal" style="margin-left:35.4pt">
<span lang="EN-GB"> </span><u></u><u></u></p>
<p class="MsoNormal" style="margin-left:35.4pt">
<span lang="EN-GB"><a href="https://kamailio.org/docs/modules/stable/modules/dispatcher.html#dispatcher.f.ds_mark_dst" target="_blank">https://kamailio.org/docs/modules/stable/modules/dispatcher.html#dispatcher.f.ds_mark_dst</a></span><u></u><u></u></p>
<p class="MsoNormal" style="margin-left:35.4pt">
<span lang="EN-GB"> </span><u></u><u></u></p>
<p class="MsoNormal" style="margin-left:35.4pt">
<span lang="EN-GB">Cheers,</span><u></u><u></u></p>
<p class="MsoNormal" style="margin-left:35.4pt">
<span lang="EN-GB"> </span><u></u><u></u></p>
<p class="MsoNormal" style="margin-left:35.4pt">
<span lang="EN-GB">Henning</span><u></u><u></u></p>
<p class="MsoNormal" style="margin-left:35.4pt">
<span lang="EN-GB"> </span><u></u><u></u></p>
<p class="MsoNormal" style="margin-left:35.4pt">
<span lang="EN-GB">-- </span><u></u><u></u></p>
<p class="MsoNormal" style="margin-left:35.4pt">
<span lang="EN-GB">Henning Westerholt – </span><a href="https://skalatan.de/blog/" target="_blank"><span lang="EN-GB" style="color:rgb(5,99,193)">https://skalatan.de/blog/</span></a><u></u><u></u></p>
<p class="MsoNormal" style="margin-left:35.4pt">
<span lang="EN-GB">Kamailio services – </span><a href="https://gilawa.com/" target="_blank"><span lang="EN-GB" style="color:rgb(5,99,193)">https://gilawa.com</span></a>
<u></u><u></u></p>
<p class="MsoNormal" style="margin-left:35.4pt">
<span lang="EN-GB"> </span><u></u><u></u></p>
<div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(225,225,225);padding:3pt 0cm 0cm">
<p class="MsoNormal" style="margin-left:70.8pt">
<b>From:</b> sr-users <<a href="mailto:sr-users-bounces@lists.kamailio.org" target="_blank">sr-users-bounces@lists.kamailio.org</a>>
<b>On Behalf Of </b>Marat Gareev<br>
<b>Sent:</b> Thursday, September 9, 2021 8:02 PM<br>
<b>To:</b> Kamailio (SER) - Users Mailing List <<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a>><br>
<b>Subject:</b> [SR-Users] Manage blacklisting on network errors<u></u><u></u></p>
</div>
<p class="MsoNormal" style="margin-left:70.8pt">
 <u></u><u></u></p>
<div>
<p class="MsoNormal" style="margin-left:70.8pt">
Hello!<u></u><u></u></p>
<div>
<p class="MsoNormal" style="margin-left:70.8pt">
 <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:70.8pt">
I have a simple config for routing requests with failover and blacklisting on 408, 480 and 503 codes from servers.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:70.8pt">
 <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:70.8pt">
This is a part of config:<u></u><u></u></p>
</div>
<div>
<div>
<div>
<p class="MsoNormal" style="margin-left:70.8pt;line-height:14.25pt;background:whitesmoke">
<i><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(170,170,170)"># Wrapper for relaying requests</span></i><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:70.8pt;line-height:14.25pt;background:whitesmoke">
<b><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(170,55,49)">route[</span></b><b><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(156,93,39)">RELAY</span></b><b><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(170,55,49)">]</span></b><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(51,51,51)">
 {</span><u></u><u></u></p>
</div>
<p class="MsoNormal" style="margin-left:70.8pt;line-height:14.25pt;background:whitesmoke">
<span style="font-size:10.5pt;font-family:"Courier New";color:rgb(51,51,51)"> </span><u></u><u></u></p>
<div>
<p class="MsoNormal" style="margin-left:70.8pt;line-height:14.25pt;background:whitesmoke">
<span style="font-size:10.5pt;font-family:"Courier New";color:rgb(51,51,51)">  </span><i><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(170,170,170)"># the base event routes</span></i><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:70.8pt;line-height:14.25pt;background:whitesmoke">
<span style="font-size:10.5pt;font-family:"Courier New";color:rgb(51,51,51)">  t_on_branch(</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(68,140,39)">"MANAGE_BRANCH"</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(51,51,51)">)</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(119,119,119)">;</span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:70.8pt;line-height:14.25pt;background:whitesmoke">
<span style="font-size:10.5pt;font-family:"Courier New";color:rgb(51,51,51)">  t_on_reply(</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(68,140,39)">"MANAGE_REPLY"</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(51,51,51)">)</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(119,119,119)">;</span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:70.8pt;line-height:14.25pt;background:whitesmoke">
<span style="font-size:10.5pt;font-family:"Courier New";color:rgb(51,51,51)">  t_on_failure(</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(68,140,39)">"MANAGE_FAILURE"</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(51,51,51)">)</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(119,119,119)">;</span><u></u><u></u></p>
</div>
<p class="MsoNormal" style="margin-left:70.8pt;line-height:14.25pt;background:whitesmoke">
<span style="font-size:10.5pt;font-family:"Courier New";color:rgb(51,51,51)"> </span><u></u><u></u></p>
<div>
<p class="MsoNormal" style="margin-left:70.8pt;line-height:14.25pt;background:whitesmoke">
<span style="font-size:10.5pt;font-family:"Courier New";color:rgb(51,51,51)">  </span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(75,105,198)">if</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(51,51,51)"> (</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(119,119,119)">!</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(51,51,51)">t_relay())
 {</span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:70.8pt;line-height:14.25pt;background:whitesmoke">
<span style="font-size:10.5pt;font-family:"Courier New";color:rgb(51,51,51)">    sl_reply_error()</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(119,119,119)">;</span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:70.8pt;line-height:14.25pt;background:whitesmoke">
<span style="font-size:10.5pt;font-family:"Courier New";color:rgb(51,51,51)">  }</span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:70.8pt;line-height:14.25pt;background:whitesmoke">
<span style="font-size:10.5pt;font-family:"Courier New";color:rgb(51,51,51)">  </span><b><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(170,55,49)">exit</span></b><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(119,119,119)">;</span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:70.8pt;line-height:14.25pt;background:whitesmoke">
<span style="font-size:10.5pt;font-family:"Courier New";color:rgb(51,51,51)">}</span><u></u><u></u></p>
</div>
<p class="MsoNormal" style="margin-left:70.8pt;line-height:14.25pt;background:whitesmoke">
<span style="font-size:10.5pt;font-family:"Courier New";color:rgb(51,51,51)"> </span><u></u><u></u></p>
<div>
<p class="MsoNormal" style="margin-left:70.8pt;line-height:14.25pt;background:whitesmoke">
<i><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(170,170,170)"># Manage incoming replies</span></i><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:70.8pt;line-height:14.25pt;background:whitesmoke">
<b><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(170,55,49)">onreply_route[</span></b><b><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(156,93,39)">MANAGE_REPLY</span></b><b><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(170,55,49)">]</span></b><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(51,51,51)">
 {</span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:70.8pt;line-height:14.25pt;background:whitesmoke">
<span style="font-size:10.5pt;font-family:"Courier New";color:rgb(51,51,51)">  xlog(</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(68,140,39)">"L_NOTICE"</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(119,119,119)">,</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(51,51,51)">
</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(68,140,39)">"$rr ($rs) [$cs] ($ci) $si:$sp - $ua</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(119,119,119)">\n</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(68,140,39)">"</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(51,51,51)">)</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(119,119,119)">;</span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:70.8pt;line-height:14.25pt;background:whitesmoke">
<span style="font-size:10.5pt;font-family:"Courier New";color:rgb(51,51,51)">  </span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(75,105,198)">if</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(51,51,51)"> ( t_check_status(</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(68,140,39)">"(503)|(408)|(480)"</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(51,51,51)">)
 ) {</span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:70.8pt;line-height:14.25pt;background:whitesmoke">
<span style="font-size:10.5pt;font-family:"Courier New";color:rgb(51,51,51)">    xlog(</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(68,140,39)">"L_WARN"</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(119,119,119)">,</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(51,51,51)">
</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(68,140,39)">"Server will be blacklisted: $si:$sp ($rs)</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(119,119,119)">\n</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(68,140,39)">"</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(51,51,51)">)</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(119,119,119)">;</span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:70.8pt;line-height:14.25pt;background:whitesmoke">
<span style="font-size:10.5pt;font-family:"Courier New";color:rgb(51,51,51)">  }</span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:70.8pt;line-height:14.25pt;background:whitesmoke">
<span style="font-size:10.5pt;font-family:"Courier New";color:rgb(51,51,51)">}</span><u></u><u></u></p>
</div>
<p class="MsoNormal" style="margin-left:70.8pt;line-height:14.25pt;background:whitesmoke">
<span style="font-size:10.5pt;font-family:"Courier New";color:rgb(51,51,51)"> </span><u></u><u></u></p>
<div>
<p class="MsoNormal" style="margin-left:70.8pt;line-height:14.25pt;background:whitesmoke">
<i><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(170,170,170)"># Manage failure routing cases</span></i><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:70.8pt;line-height:14.25pt;background:whitesmoke">
<b><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(170,55,49)">failure_route[</span></b><b><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(156,93,39)">MANAGE_FAILURE</span></b><b><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(170,55,49)">]</span></b><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(51,51,51)">
 {</span><u></u><u></u></p>
</div>
<p class="MsoNormal" style="margin-left:70.8pt;line-height:14.25pt;background:whitesmoke">
<span style="font-size:10.5pt;font-family:"Courier New";color:rgb(51,51,51)"> </span><u></u><u></u></p>
<div>
<p class="MsoNormal" style="margin-left:70.8pt;line-height:14.25pt;background:whitesmoke">
<span style="font-size:10.5pt;font-family:"Courier New";color:rgb(51,51,51)">  </span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(75,105,198)">if</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(51,51,51)"> (
</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(119,119,119)">!</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(51,51,51)">t_check_status(</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(68,140,39)">"(503)|(408)|(480)"</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(51,51,51)">)
 ) {</span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:70.8pt;line-height:14.25pt;background:whitesmoke">
<span style="font-size:10.5pt;font-family:"Courier New";color:rgb(51,51,51)">    </span>
<b><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(170,55,49)">exit</span></b><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(119,119,119)">;</span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:70.8pt;line-height:14.25pt;background:whitesmoke">
<span style="font-size:10.5pt;font-family:"Courier New";color:rgb(51,51,51)">  }</span><u></u><u></u></p>
</div>
<p class="MsoNormal" style="margin-left:70.8pt;line-height:14.25pt;background:whitesmoke">
<span style="font-size:10.5pt;font-family:"Courier New";color:rgb(51,51,51)"> </span><u></u><u></u></p>
<div>
<p class="MsoNormal" style="margin-left:70.8pt;line-height:14.25pt;background:whitesmoke">
<span style="font-size:10.5pt;font-family:"Courier New";color:rgb(51,51,51)">  ds_mark_dst(</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(68,140,39)">"IP"</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(51,51,51)">)</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(119,119,119)">;</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(51,51,51)">
</span><i><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(170,170,170)"># blacklist</span></i><u></u><u></u></p>
</div>
<p class="MsoNormal" style="margin-left:70.8pt;line-height:14.25pt;background:whitesmoke">
<span style="font-size:10.5pt;font-family:"Courier New";color:rgb(51,51,51)"> </span><u></u><u></u></p>
<div>
<p class="MsoNormal" style="margin-left:70.8pt;line-height:14.25pt;background:whitesmoke">
<span style="font-size:10.5pt;font-family:"Courier New";color:rgb(51,51,51)">  </span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(75,105,198)">if</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(51,51,51)"> (t_is_canceled())
</span><b><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(170,55,49)">exit</span></b><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(119,119,119)">;</span><u></u><u></u></p>
</div>
<p class="MsoNormal" style="margin-left:70.8pt;line-height:14.25pt;background:whitesmoke">
<span style="font-size:10.5pt;font-family:"Courier New";color:rgb(51,51,51)"> </span><u></u><u></u></p>
<div>
<p class="MsoNormal" style="margin-left:70.8pt;line-height:14.25pt;background:whitesmoke">
<span style="font-size:10.5pt;font-family:"Courier New";color:rgb(51,51,51)">  </span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(75,105,198)">if</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(51,51,51)"> (</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(119,119,119)">!</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(51,51,51)">ds_next_domain())
 {</span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:70.8pt;line-height:14.25pt;background:whitesmoke">
<span style="font-size:10.5pt;font-family:"Courier New";color:rgb(51,51,51)">    send_reply(</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(68,140,39)">"503"</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(119,119,119)">,</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(51,51,51)">
</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(68,140,39)">"Service Unavailable"</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(51,51,51)">)</span><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(119,119,119)">;</span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:70.8pt;line-height:14.25pt;background:whitesmoke">
<span style="font-size:10.5pt;font-family:"Courier New";color:rgb(51,51,51)">    </span>
<b><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(170,55,49)">exit</span></b><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(119,119,119)">;</span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:70.8pt;line-height:14.25pt;background:whitesmoke">
<span style="font-size:10.5pt;font-family:"Courier New";color:rgb(51,51,51)">  }</span><u></u><u></u></p>
</div>
<p class="MsoNormal" style="margin-left:70.8pt;line-height:14.25pt;background:whitesmoke">
<span style="font-size:10.5pt;font-family:"Courier New";color:rgb(51,51,51)"> </span><u></u><u></u></p>
<div>
<p class="MsoNormal" style="margin-left:70.8pt;line-height:14.25pt;background:whitesmoke">
<span style="font-size:10.5pt;font-family:"Courier New";color:rgb(51,51,51)">  </span><b><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(170,55,49)">route(</span></b><b><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(156,93,39)">RELAY</span></b><b><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(170,55,49)">)</span></b><span style="font-size:10.5pt;font-family:"Courier New";color:rgb(119,119,119)">;</span><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:70.8pt;line-height:14.25pt;background:whitesmoke">
<span style="font-size:10.5pt;font-family:"Courier New";color:rgb(51,51,51)">}</span><u></u><u></u></p>
</div>
</div>
</div>
<div>
<p class="MsoNormal" style="margin-left:70.8pt">
 <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:70.8pt">
If there is a timeout or network error on the server side, it is blacklisted. How can such cases be managed and how can they be logged?<br>
I didn't find this on the module page:<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:70.8pt">
<a href="https://www.kamailio.org/docs/modules/stable/modules/tm.html" target="_blank">https://www.kamailio.org/docs/modules/stable/modules/tm.html</a><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:70.8pt">
 <u></u><u></u></p>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>

</blockquote></div>