<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)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:Helvetica;
        panose-1:0 0 0 0 0 0 0 0 0 0;}
@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:"Times New Roman \(Body CS\)";
        panose-1:2 11 6 4 2 2 2 2 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:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;}
span.EmailStyle21
        {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:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
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="EN-US" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">I see. Apologies, I misunderstood the problem scenario.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="color:black">Ben Newlin </span><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span style="font-size:12.0pt;color:black">From:
</span></b><span style="font-size:12.0pt;color:black">Users <users-bounces@lists.opensips.org> on behalf of Yannick LE COENT <yannick.lecoent@nexcom.fr><br>
<b>Date: </b>Saturday, April 30, 2022 at 5:46 AM<br>
<b>To: </b>OpenSIPS users mailling list <users@lists.opensips.org><br>
<b>Subject: </b>Re: [OpenSIPS-Users] OpenSIPS : no 407 retransmission<o:p></o:p></span></p>
</div>
<div>
<div>
<table class="MsoNormalTable" border="0" cellpadding="0">
<tbody>
<tr>
<td style="background:#B60000;padding:.75pt .75pt .75pt .75pt">
<p class="MsoNormal"><b><span style="font-size:12.0pt;color:white">EXTERNAL EMAIL - Please use caution with links and attachments
<o:p></o:p></span></b></p>
</td>
</tr>
</tbody>
</table>
</div>
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:Helvetica;color:black"><o:p> </o:p></span></p>
<div class="MsoNormal" align="center" style="text-align:center">
<hr size="0" width="100%" align="center">
</div>
</div>
<p class="MsoNormal">Hello Ben,<br>
<br>
The 407 is sent upstream, but when it is lost, it is not retransmitted by OpenSIPS.<br>
I do not have this problem with other negative status codes (e.g. 486).<br>
<br>
This is clearly explained in <a href="https://opensips.org/pub/opensips/1.8.6/src/ChangeLog">
https://opensips.org/pub/opensips/1.8.6/src/ChangeLog</a><o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span style="font-family:"Courier New"">2012-03-21 18:36:58  Bogdan-Andrei Iancu, <bogdan at opensips dot org>
</span><br>
<span style="font-family:"Courier New"">    * [8811] :</span><br>
<br>
<span style="font-family:"Courier New"">    TM will no longer do retransmission for the 407/401 replies (if no ACK is received) for both local or proxied replies.</span><br>
<br>
<span style="font-family:"Courier New"">    According to RFC 3261, retransmitting 407s/401s is probably a bad idea:</span><br>
<br>
<span style="font-family:"Courier New"">    26.3.2.4 DoS Protection</span><o:p></o:p></p>
</blockquote>
<p class="MsoNormal">At the moment, my only solution is to use forward() instead of t_relay() in order to use the stateless mode.<br>
<br>
Yannick<br>
<br>
<br>
<o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<pre>Yannick,<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>The default behavior of OpenSIPS is to relay any received responses back upstream. If it is not doing that it would have to be because you are stopping it in the script. Take a look at the documentation for failure_route [1] which explains this. Check your own failure_route in your script; you must be doing something there that is telling OpenSIPS not to relay the 401/407 back upstream.<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>[1] <a href="https://www.opensips.org/Documentation/Script-Routes-2-4#toc3">https://www.opensips.org/Documentation/Script-Routes-2-4#toc3</a><o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>Ben Newlin<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>From: Users <a href="mailto:users-bounces@lists.opensips.org"><users-bounces@lists.opensips.org></a> on behalf of Yannick LE COENT <a href="mailto:yannick.lecoent@nexcom.fr"><yannick.lecoent@nexcom.fr></a><o:p></o:p></pre>
<pre>Date: Friday, April 29, 2022 at 6:44 PM<o:p></o:p></pre>
<pre>To: <a href="mailto:users@lists.opensips.org">users@lists.opensips.org</a> <a href="mailto:users@lists.opensips.org"><users@lists.opensips.org></a><o:p></o:p></pre>
<pre>Subject: [OpenSIPS-Users] OpenSIPS : no 407 retransmission<o:p></o:p></pre>
<pre>EXTERNAL EMAIL - Please use caution with links and attachments<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>Hello,<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>I'm using OpenSIPS as a proxy in front of another proxy. The 2nd proxy<o:p></o:p></pre>
<pre>is in charge of authenticating the request.<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>This is the callflow:<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>Alice           OpenSIPS          Proxy#2<o:p></o:p></pre>
<pre>   | INVITE         |                |<o:p></o:p></pre>
<pre>   |--------------->| INVITE         |<o:p></o:p></pre>
<pre>   |      100 Tring |--------------->|<o:p></o:p></pre>
<pre>   |<---------------|            407 |<o:p></o:p></pre>
<pre>   |                |<---------------|<o:p></o:p></pre>
<pre>   |                | ACK            |<o:p></o:p></pre>
<pre>   |                |--------------->|<o:p></o:p></pre>
<pre>   |            407 |                |<o:p></o:p></pre>
<pre>   |     X<---------|                |<o:p></o:p></pre>
<pre>   |                |                |<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>Since OpenSIPS does not retransmit 401/407, the call setup gets stuck.<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>What can I do ?<o:p></o:p></pre>
<pre>If I set auto_100trying=1, that works, but this increases the number of<o:p></o:p></pre>
<pre>INVITE retransmissions since 180Ringing are not received instantly.<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>Do you have any suggestion ?<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>Thanks,<o:p></o:p></pre>
<pre>Yannick<o:p></o:p></pre>
</blockquote>
</div>
</body>
</html>