<div dir="ltr">Generate in Stateful -> www_challenge or proxy_challenge?<div><a href="https://opensips.org/html/docs/modules/3.2.x/auth.html">https://opensips.org/html/docs/modules/3.2.x/auth.html</a><br></div><div><br></div><div>Is this what you are looking for?</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, May 3, 2022 at 3:50 AM Yannick LE COENT <<a href="mailto:yannick.lecoent@nexcom.fr">yannick.lecoent@nexcom.fr</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>
    Hello all,<br>
    <br>
    Could you tell if there is a way to enable 407 in stateful mode ?<br>
    <br>
    Thanks,<br>
    Yannick<br>
    <br>
    <div>Le 30/04/2022 à 18:14, Yannick LE COENT
      a écrit :<br>
    </div>
    <blockquote type="cite">
      
      Hello Ben,<br>
      <br>
      Thanks for your answer.<br>
      <br>
      This problem occurs when OpenSIPS is not in charge of
      authenticating the INVITE request, but this is done downstream.<br>
      I've sent this question to know if somebody has already solved
      this kind of problem.<br>
      <br>
      Best regards,<br>
      Yannick<br>
      <br>
      <div>Le 30/04/2022 à 16:15, Ben Newlin a
        écrit :<br>
      </div>
      <blockquote type="cite">
        
        
        
        
        <div>
          <p class="MsoNormal">I see. Apologies, I misunderstood the
            problem scenario.<u></u><u></u></p>
          <p class="MsoNormal"><u></u> <u></u></p>
          <p class="MsoNormal"><span style="color:black">Ben Newlin </span><u></u><u></u></p>
          <p class="MsoNormal"><u></u> <u></u></p>
          <div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(181,196,223);padding:3pt 0in 0in">
            <p class="MsoNormal" style="margin-bottom:12pt"><b><span style="font-size:12pt;color:black">From: </span></b><span style="font-size:12pt;color:black">Users <a href="mailto:users-bounces@lists.opensips.org" target="_blank"><users-bounces@lists.opensips.org></a>
                on behalf of Yannick LE COENT <a href="mailto:yannick.lecoent@nexcom.fr" target="_blank"><yannick.lecoent@nexcom.fr></a><br>
                <b>Date: </b>Saturday, April 30, 2022 at 5:46 AM<br>
                <b>To: </b>OpenSIPS users mailling list <a href="mailto:users@lists.opensips.org" target="_blank"><users@lists.opensips.org></a><br>
                <b>Subject: </b>Re: [OpenSIPS-Users] OpenSIPS : no 407
                retransmission<u></u><u></u></span></p>
          </div>
          <div>
            <div>
              <table cellpadding="0" border="0">
                <tbody>
                  <tr>
                    <td style="background:rgb(182,0,0);padding:0.75pt">
                      <p class="MsoNormal"><b><span style="font-size:12pt;color:white">EXTERNAL
                            EMAIL - Please use caution with links and
                            attachments <u></u><u></u></span></b></p>
                    </td>
                  </tr>
                </tbody>
              </table>
            </div>
            <p class="MsoNormal"><span style="font-size:9pt;font-family:Helvetica;color:black"><u></u> <u></u></span></p>
            <div class="MsoNormal" style="text-align:center" align="center">
              <hr width="100%" size="0" 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" target="_blank">
              https://opensips.org/pub/opensips/1.8.6/src/ChangeLog</a><u></u><u></u></p>
          <blockquote style="margin-top:5pt;margin-bottom:5pt">
            <p class="MsoNormal"><span>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><u></u><u></u></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>
            <u></u><u></u></p>
          <blockquote style="margin-top:5pt;margin-bottom:5pt">
            <pre>Yannick,<u></u><u></u></pre>
            <pre><u></u> <u></u></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.<u></u><u></u></pre>
            <pre><u></u> <u></u></pre>
            <pre>[1] <a href="https://www.opensips.org/Documentation/Script-Routes-2-4#toc3" target="_blank">https://www.opensips.org/Documentation/Script-Routes-2-4#toc3</a><u></u><u></u></pre>
            <pre><u></u> <u></u></pre>
            <pre>Ben Newlin<u></u><u></u></pre>
            <pre><u></u> <u></u></pre>
            <pre>From: Users <a href="mailto:users-bounces@lists.opensips.org" target="_blank"><users-bounces@lists.opensips.org></a> on behalf of Yannick LE COENT <a href="mailto:yannick.lecoent@nexcom.fr" target="_blank"><yannick.lecoent@nexcom.fr></a><u></u><u></u></pre>
            <pre>Date: Friday, April 29, 2022 at 6:44 PM<u></u><u></u></pre>
            <pre>To: <a href="mailto:users@lists.opensips.org" target="_blank">users@lists.opensips.org</a> <a href="mailto:users@lists.opensips.org" target="_blank"><users@lists.opensips.org></a><u></u><u></u></pre>
            <pre>Subject: [OpenSIPS-Users] OpenSIPS : no 407 retransmission<u></u><u></u></pre>
            <pre>EXTERNAL EMAIL - Please use caution with links and attachments<u></u><u></u></pre>
            <pre><u></u> <u></u></pre>
            <pre>Hello,<u></u><u></u></pre>
            <pre><u></u> <u></u></pre>
            <pre>I'm using OpenSIPS as a proxy in front of another proxy. The 2nd proxy<u></u><u></u></pre>
            <pre>is in charge of authenticating the request.<u></u><u></u></pre>
            <pre><u></u> <u></u></pre>
            <pre>This is the callflow:<u></u><u></u></pre>
            <pre><u></u> <u></u></pre>
            <pre>Alice           OpenSIPS          Proxy#2<u></u><u></u></pre>
            <pre>   | INVITE         |                |<u></u><u></u></pre>
            <pre>   |--------------->| INVITE         |<u></u><u></u></pre>
            <pre>   |      100 Tring |--------------->|<u></u><u></u></pre>
            <pre>   |<---------------|            407 |<u></u><u></u></pre>
            <pre>   |                |<---------------|<u></u><u></u></pre>
            <pre>   |                | ACK            |<u></u><u></u></pre>
            <pre>   |                |--------------->|<u></u><u></u></pre>
            <pre>   |            407 |                |<u></u><u></u></pre>
            <pre>   |     X<---------|                |<u></u><u></u></pre>
            <pre>   |                |                |<u></u><u></u></pre>
            <pre><u></u> <u></u></pre>
            <pre>Since OpenSIPS does not retransmit 401/407, the call setup gets stuck.<u></u><u></u></pre>
            <pre><u></u> <u></u></pre>
            <pre>What can I do ?<u></u><u></u></pre>
            <pre>If I set auto_100trying=1, that works, but this increases the number of<u></u><u></u></pre>
            <pre>INVITE retransmissions since 180Ringing are not received instantly.<u></u><u></u></pre>
            <pre><u></u> <u></u></pre>
            <pre>Do you have any suggestion ?<u></u><u></u></pre>
            <pre><u></u> <u></u></pre>
            <pre>Thanks,<u></u><u></u></pre>
            <pre>Yannick<u></u><u></u></pre>
          </blockquote>
        </div>
        <br>
        <fieldset></fieldset>
        <pre>_______________________________________________
Users mailing list
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
      </blockquote>
      <br>
      <br>
      <fieldset></fieldset>
      <pre>_______________________________________________
Users mailing list
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
    </blockquote>
    <br>
  </div>

_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</blockquote></div>