[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openser-users
Subject:    Re: [SR-Users] handling of locally generated 478 errors
From:       Henning Westerholt <hw () skalatan ! de>
Date:       2020-11-27 19:28:33
Message-ID: AM0PR05MB6595F468D1397E2E4E20936FC5F80 () AM0PR05MB6595 ! eurprd05 ! prod ! outlook ! com
[Download RAW message or body]

Hi Daniel,

thank you for the reply. Yes, I also thought about the return value of the =
t_relay(). Will give it a try for this scenario.
Thanks for the hint regarding disabling the internal reply.

Cheers,

Henning

--
Henning Westerholt - https://skalatan.de/blog/
Kamailio services - https://gilawa.com<https://gilawa.com/>

From: Daniel-Constantin Mierla <miconda@gmail.com>
Sent: Friday, November 27, 2020 2:08 PM
To: Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.org>; Henn=
ing Westerholt <hw@skalatan.de>
Cc: Kamailio (SER) - Development Mailing List <sr-dev@lists.kamailio.org>
Subject: Re: [SR-Users] handling of locally generated 478 errors



On 27.11.20 14:05, Daniel-Constantin Mierla wrote:

Hello,

you should be able to disable sending internal replies inside tm in case of=
 t_relay() failure with:

  * https://www.kamailio.org/docs/modules/stable/modules/tm.html#tm.f.t_set=
_disable_internal_reply

The to handling in the IF branch of t_relay() execution if it returns false=
. There is no need to use event_route from sl module in this case.

^^^ above, somehow, parts got removed, was supposed to be:

Then do error handling in the ...

Cheers,
Daniel
On 27.11.20 09:41, Henning Westerholt wrote:
Hello,

any comment on this topic? Would be great to get an opinion at least on the=
 first question, then I could document it or open an issue for it.

Thanks,

Henning

--
Henning Westerholt - https://skalatan.de/blog/
Kamailio services - https://gilawa.com<https://gilawa.com/>

From: Henning Westerholt
Sent: Wednesday, November 25, 2020 6:53 PM
To: Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.org><mailt=
o:sr-users@lists.kamailio.org>
Cc: Kamailio (SER) - Development Mailing List <sr-dev@lists.kamailio.org><m=
ailto:sr-dev@lists.kamailio.org>
Subject: handling of locally generated 478 errors

Hello,

I want to ask for your opinion on the best approach regarding the handling =
of locally generated 478 errors.

To give an example, like the ones generated from TM during t_relay() on an =
unresolvable destination.

Nov 25 17:40:13 kamailio[19345]: ERROR: {28607414 INVITE bba500ac-a9df-1239=
-6693-00505682c04d} tm [ut.h:286]: uri2dst2(): failed to resolve "invalid.s=
kalatan.de" :unresolvable A or AAAA request (-7)
Nov 25 17:40:13 kamailio[19345]: ERROR: {28607414 INVITE bba500ac-a9df-1239=
-6693-00505682c04d} tm [t_fwd.c:1738]: t_forward_nonack(): failure to add b=
ranches
Nov 25 17:40:13 kamailio[19345]: CRITICAL: {28607414 INVITE bba500ac-a9df-1=
239-6693-00505682c04d} rtpengine [../../core/parser/../ip_addr.h:658]: ip_a=
ddr2sbuf(): unknown address family 0

These errors will not show up in onreply or failure_route.  A long time ago=
 this was discussed on the list [1], as some functionality were phased out =
out that support these scenarios.

Kamailio will try to generate a 478 with TM, this will obviously fail as we=
ll, and then generate a 478 with SL.

Question 1)

Is this intentional that the internally generated 478 is not showing up in =
the failure_route, like for for 408? This has been tested several times, bu=
t it is a complicated configuration.

Question 2)

Are there any other (better) ideas how to handle that besides using a "even=
t_route[sl:local-response]" to catch this, e.g. to tear down otherwise stal=
e rtpengine sessions etc..? As a side note, event_route[tm:local-response] =
seems not to work as well because of the tm failure.

Thanks,

Henning

[1] https://lists.kamailio.org/pipermail/sr-users/2011-June/069020.html

--
Henning Westerholt - https://skalatan.de/blog/
Kamailio services - https://gilawa.com<https://gilawa.com/>




_______________________________________________

Kamailio (SER) - Users Mailing List

sr-users@lists.kamailio.org<mailto:sr-users@lists.kamailio.org>

https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

--

Daniel-Constantin Mierla -- www.asipto.com<http://www.asipto.com>

www.twitter.com/miconda<http://www.twitter.com/miconda> -- www.linkedin.com=
/in/miconda<http://www.linkedin.com/in/miconda>

Funding: https://www.paypal.me/dcmierla

--

Daniel-Constantin Mierla -- www.asipto.com<http://www.asipto.com>

www.twitter.com/miconda<http://www.twitter.com/miconda> -- www.linkedin.com=
/in/miconda<http://www.linkedin.com/in/miconda>

Funding: https://www.paypal.me/dcmierla

[Attachment #3 (text/html)]

<html xmlns:v="urn:schemas-microsoft-com:vml" \
xmlns:o="urn:schemas-microsoft-com:office:office" \
xmlns:w="urn:schemas-microsoft-com:office:word" \
xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" \
xmlns="http://www.w3.org/TR/REC-html40"> <head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
	{font-family:Consolas;
	panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	font-size:11.0pt;
	font-family:"Calibri",sans-serif;
	mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:#0563C1;
	text-decoration:underline;}
pre
	{mso-style-priority:99;
	mso-style-link:"HTML Vorformatiert Zchn";
	margin:0cm;
	font-size:10.0pt;
	font-family:"Courier New";
	mso-fareast-language:DE;}
span.HTMLVorformatiertZchn
	{mso-style-name:"HTML Vorformatiert Zchn";
	mso-style-priority:99;
	mso-style-link:"HTML Vorformatiert";
	font-family:Consolas;
	mso-fareast-language:EN-US;}
span.E-MailFormatvorlage22
	{mso-style-type:personal-reply;
	font-family:"Calibri",sans-serif;
	color:windowtext;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-size:10.0pt;}
@page WordSection1
	{size:612.0pt 792.0pt;
	margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
	{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="DE" link="#0563C1" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">Hi Daniel,<o:p></o:p></p>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal"><span lang="EN-GB">thank you for the reply. Yes, I also thought \
about the return value of the t_relay(). Will give it a try for this scenario. \
<o:p></o:p></span></p> <p class="MsoNormal"><span lang="EN-GB">Thanks for the hint \
regarding disabling the internal reply.<o:p></o:p></span></p> <p \
class="MsoNormal"><span lang="EN-GB"><o:p>&nbsp;</o:p></span></p> <p \
class="MsoNormal"><span lang="EN-GB">Cheers,<o:p></o:p></span></p> <p \
class="MsoNormal"><span lang="EN-GB"><o:p>&nbsp;</o:p></span></p> <p \
class="MsoNormal"><span lang="EN-GB">Henning<o:p></o:p></span></p> <p \
class="MsoNormal"><span lang="EN-GB"><o:p>&nbsp;</o:p></span></p> <div>
<p class="MsoNormal"><span lang="EN-GB">-- <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">Henning Westerholt &#8211; </span><a \
href="https://skalatan.de/blog/"><span \
lang="EN-GB">https://skalatan.de/blog/</span></a><span \
lang="EN-GB"><o:p></o:p></span></p> <p class="MsoNormal"><span lang="EN-GB">Kamailio \
services &#8211; </span><a href="https://gilawa.com/"><span \
lang="EN-GB">https://gilawa.com</span></a> <span lang="EN-GB"><o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span lang="EN-GB"><o:p>&nbsp;</o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="margin-left:35.4pt"><b><span \
style="mso-fareast-language:DE">From:</span></b><span \
style="mso-fareast-language:DE"> Daniel-Constantin Mierla &lt;miconda@gmail.com&gt; \
<br> <b>Sent:</b> Friday, November 27, 2020 2:08 PM<br>
<b>To:</b> Kamailio (SER) - Users Mailing List &lt;sr-users@lists.kamailio.org&gt;; \
Henning Westerholt &lt;hw@skalatan.de&gt;<br> <b>Cc:</b> Kamailio (SER) - Development \
Mailing List &lt;sr-dev@lists.kamailio.org&gt;<br> <b>Subject:</b> Re: [SR-Users] \
handling of locally generated 478 errors<o:p></o:p></span></p> </div>
</div>
<p class="MsoNormal" style="margin-left:35.4pt"><o:p>&nbsp;</o:p></p>
<p style="margin-left:35.4pt"><span \
style="mso-fareast-language:DE"><o:p>&nbsp;</o:p></span></p> <div>
<p class="MsoNormal" style="margin-left:35.4pt">On 27.11.20 14:05, Daniel-Constantin \
Mierla wrote:<o:p></o:p></p> </div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p style="margin-left:35.4pt">Hello,<o:p></o:p></p>
<p style="margin-left:35.4pt">you should be able to disable sending internal replies \
inside tm in case of t_relay() failure with:<o:p></o:p></p> <p \
style="margin-left:35.4pt">&nbsp; * <a \
href="https://www.kamailio.org/docs/modules/stable/modules/tm.html#tm.f.t_set_disable_internal_reply">
 https://www.kamailio.org/docs/modules/stable/modules/tm.html#tm.f.t_set_disable_internal_reply</a><o:p></o:p></p>
 <p style="margin-left:35.4pt">The to handling in the IF branch of t_relay() \
execution if it returns false. There is no need to use event_route from sl module in \
this case.<o:p></o:p></p> </blockquote>
<p style="margin-left:35.4pt">^^^ above, somehow, parts got removed, was supposed to \
be:<o:p></o:p></p> <p style="margin-left:35.4pt">Then do error handling in the \
...<o:p></o:p></p> <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p style="margin-left:35.4pt">Cheers,<br>
Daniel<o:p></o:p></p>
<div>
<p class="MsoNormal" style="margin-left:35.4pt">On 27.11.20 09:41, Henning Westerholt \
wrote:<o:p></o:p></p> </div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal" style="margin-left:35.4pt">Hello,<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:35.4pt">&nbsp;<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-GB">any comment on \
this topic? Would be great to get an opinion at least on the first question, then I \
could document it or open an issue for it.</span><o:p></o:p></p> <p class="MsoNormal" \
style="margin-left:35.4pt"><span lang="EN-GB">&nbsp;</span><o:p></o:p></p> <p \
class="MsoNormal" style="margin-left:35.4pt"><span \
lang="EN-GB">Thanks,</span><o:p></o:p></p> <p class="MsoNormal" \
style="margin-left:35.4pt"><span lang="EN-GB">&nbsp;</span><o:p></o:p></p> <p \
class="MsoNormal" style="margin-left:35.4pt"><span \
lang="EN-GB">Henning</span><o:p></o:p></p> <p class="MsoNormal" \
style="margin-left:35.4pt"><span lang="EN-GB">&nbsp;</span><o:p></o:p></p> <div>
<p class="MsoNormal" style="margin-left:35.4pt"><span lang="EN-GB">-- \
</span><o:p></o:p></p> <p class="MsoNormal" style="margin-left:35.4pt"><span \
lang="EN-GB">Henning Westerholt &#8211; </span><a \
href="https://skalatan.de/blog/"><span \
lang="EN-GB">https://skalatan.de/blog/</span></a><o:p></o:p></p> <p class="MsoNormal" \
style="margin-left:35.4pt"><span lang="EN-GB">Kamailio services &#8211; </span><a \
href="https://gilawa.com/"><span lang="EN-GB">https://gilawa.com</span></a> \
<o:p></o:p></p> </div>
<p class="MsoNormal" style="margin-left:35.4pt"><span \
lang="EN-GB">&nbsp;</span><o:p></o:p></p> <div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="margin-left:70.8pt"><b><span \
style="mso-fareast-language:DE">From:</span></b><span \
style="mso-fareast-language:DE"> Henning Westerholt <br>
<b>Sent:</b> Wednesday, November 25, 2020 6:53 PM<br>
<b>To:</b> Kamailio (SER) - Users Mailing List <a \
href="mailto:sr-users@lists.kamailio.org"> \
&lt;sr-users@lists.kamailio.org&gt;</a><br> <b>Cc:</b> Kamailio (SER) - Development \
Mailing List <a href="mailto:sr-dev@lists.kamailio.org"> \
&lt;sr-dev@lists.kamailio.org&gt;</a><br> <b>Subject:</b> handling of locally \
generated 478 errors</span><o:p></o:p></p> </div>
</div>
<p class="MsoNormal" style="margin-left:70.8pt">&nbsp;<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:70.8pt">Hello,<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:70.8pt">&nbsp;<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:70.8pt"><span lang="EN-GB">I want to ask for \
your opinion on the best approach regarding the handling of locally generated 478 \
errors.</span><o:p></o:p></p> <p class="MsoNormal" style="margin-left:70.8pt"><span \
lang="EN-GB">&nbsp;</span><o:p></o:p></p> <p class="MsoNormal" \
style="margin-left:70.8pt"><span lang="EN-GB">To give an example, like the ones \
generated from TM during t_relay() on an unresolvable \
destination.</span><o:p></o:p></p> <p class="MsoNormal" \
style="margin-left:70.8pt"><span lang="EN-GB">&nbsp;</span><o:p></o:p></p> <p \
class="MsoNormal" style="margin-left:70.8pt"><span lang="EN-GB" \
style="font-size:10.5pt">Nov 25 17:40:13 kamailio[19345]: ERROR: {28607414 INVITE \
bba500ac-a9df-1239-6693-00505682c04d} tm [ut.h:286]: uri2dst2(): failed to resolve \
&quot;invalid.skalatan.de&quot; :unresolvable  A or AAAA request (-7)<br>
Nov 25 17:40:13 kamailio[19345]: ERROR: {28607414 INVITE \
bba500ac-a9df-1239-6693-00505682c04d} tm [t_fwd.c:1738]: t_forward_nonack(): failure \
to add branches<br> Nov 25 17:40:13 kamailio[19345]: CRITICAL: {28607414 INVITE \
bba500ac-a9df-1239-6693-00505682c04d} rtpengine [../../core/parser/../ip_addr.h:658]: \
ip_addr2sbuf(): unknown address family 0</span><o:p></o:p></p> <p class="MsoNormal" \
style="margin-left:70.8pt"><span lang="EN-GB">&nbsp;</span><o:p></o:p></p> <p \
class="MsoNormal" style="margin-left:70.8pt"><span lang="EN-GB">These errors will not \
show up in onreply or failure_route. &nbsp;A long time ago this was discussed on the \
list [1], as some functionality were phased out out that support these \
scenarios.</span><o:p></o:p></p> <p class="MsoNormal" \
style="margin-left:70.8pt"><span lang="EN-GB">&nbsp;</span><o:p></o:p></p> <p \
class="MsoNormal" style="margin-left:70.8pt"><span lang="EN-GB">Kamailio will try to \
generate a 478 with TM, this will obviously fail as well, and then generate a 478 \
with SL.</span><o:p></o:p></p> <p class="MsoNormal" style="margin-left:70.8pt"><span \
lang="EN-GB">&nbsp;</span><o:p></o:p></p> <p class="MsoNormal" \
style="margin-left:70.8pt"><span lang="EN-GB">Question 1)</span><o:p></o:p></p> <p \
class="MsoNormal" style="margin-left:70.8pt"><span \
lang="EN-GB">&nbsp;</span><o:p></o:p></p> <p class="MsoNormal" \
style="margin-left:70.8pt"><span lang="EN-GB">Is this intentional that the internally \
generated 478 is not showing up in the failure_route, like for for 408? This has been \
tested several times, but it is a complicated configuration.</span><o:p></o:p></p> <p \
class="MsoNormal" style="margin-left:70.8pt"><span \
lang="EN-GB">&nbsp;</span><o:p></o:p></p> <p class="MsoNormal" \
style="margin-left:70.8pt"><span lang="EN-GB">Question 2)</span><o:p></o:p></p> <p \
class="MsoNormal" style="margin-left:70.8pt"><span \
lang="EN-GB">&nbsp;</span><o:p></o:p></p> <p class="MsoNormal" \
style="margin-left:70.8pt"><span lang="EN-GB">Are there any other (better) ideas how \
to handle that besides using a &#8220;event_route[sl:local-response]&#8221; to catch \
this, e.g. to tear down otherwise stale rtpengine sessions etc..? As a side note,  \
event_route[tm:local-response] seems not to work as well because of the tm \
failure.</span><o:p></o:p></p> <p class="MsoNormal" style="margin-left:70.8pt"><span \
lang="EN-GB">&nbsp;</span><o:p></o:p></p> <p class="MsoNormal" \
style="margin-left:70.8pt"><span lang="EN-GB">Thanks,</span><o:p></o:p></p> <p \
class="MsoNormal" style="margin-left:70.8pt"><span \
lang="EN-GB">&nbsp;</span><o:p></o:p></p> <p class="MsoNormal" \
style="margin-left:70.8pt"><span lang="EN-GB">Henning</span><o:p></o:p></p> <p \
class="MsoNormal" style="margin-left:70.8pt"><span \
lang="EN-GB">&nbsp;</span><o:p></o:p></p> <p class="MsoNormal" \
style="margin-left:70.8pt"><span lang="EN-GB">[1] <a \
href="https://lists.kamailio.org/pipermail/sr-users/2011-June/069020.html"> \
https://lists.kamailio.org/pipermail/sr-users/2011-June/069020.html</a></span><o:p></o:p></p>
 <p class="MsoNormal" style="margin-left:70.8pt"><span \
lang="EN-GB">&nbsp;</span><o:p></o:p></p> <p class="MsoNormal" \
style="margin-left:70.8pt"><span lang="EN-GB">-- </span><o:p></o:p></p> <p \
class="MsoNormal" style="margin-left:70.8pt"><span lang="EN-GB">Henning Westerholt \
&#8211; </span><a href="https://skalatan.de/blog/"><span \
lang="EN-GB">https://skalatan.de/blog/</span></a><o:p></o:p></p> <p class="MsoNormal" \
style="margin-left:70.8pt"><span lang="EN-GB">Kamailio services &#8211; </span><a \
href="https://gilawa.com/"><span lang="EN-GB">https://gilawa.com</span></a> \
<o:p></o:p></p> <p class="MsoNormal" style="margin-left:70.8pt"><span \
lang="EN-GB">&nbsp;</span><o:p></o:p></p> </div>
<p class="MsoNormal" style="margin-left:35.4pt"><span \
style="mso-fareast-language:DE"><br> <br>
<o:p></o:p></span></p>
<pre style="margin-left:35.4pt">_______________________________________________<o:p></o:p></pre>
 <pre style="margin-left:35.4pt">Kamailio (SER) - Users Mailing List<o:p></o:p></pre>
<pre style="margin-left:35.4pt"><a \
href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a><o:p></o:p></pre>
 <pre style="margin-left:35.4pt"><a \
href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><o:p></o:p></pre>
 </blockquote>
<pre style="margin-left:35.4pt">-- <o:p></o:p></pre>
<pre style="margin-left:35.4pt">Daniel-Constantin Mierla -- <a \
href="http://www.asipto.com">www.asipto.com</a><o:p></o:p></pre> <pre \
style="margin-left:35.4pt"><a \
href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a \
href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a><o:p></o:p></pre>
 <pre style="margin-left:35.4pt">Funding: <a \
href="https://www.paypal.me/dcmierla">https://www.paypal.me/dcmierla</a><o:p></o:p></pre>
 </blockquote>
<pre style="margin-left:35.4pt">-- <o:p></o:p></pre>
<pre style="margin-left:35.4pt">Daniel-Constantin Mierla -- <a \
href="http://www.asipto.com">www.asipto.com</a><o:p></o:p></pre> <pre \
style="margin-left:35.4pt"><a \
href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a \
href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a><o:p></o:p></pre>
 <pre style="margin-left:35.4pt">Funding: <a \
href="https://www.paypal.me/dcmierla">https://www.paypal.me/dcmierla</a><o:p></o:p></pre>
 </div>
</body>
</html>



_______________________________________________
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

--===============2007879769==--


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic