<div dir="ltr">Hi <br>thx for answer<br>But still the same<br>I tried to use thids flag in case if answer not 401 or 407 in failure route but ACK still incrased by kamailio.<br>route[HANDLE_FAILURE] {<br><div><br>if (t_check_status("401|407")) {</div><div>   </div><div>        uac_auth();</div><div>        t_on_failure("HANDLE_FAILURE"); </div><div>        t_relay();</div><div>        exit;</div><div><br></div><div>    }</div><div>    else {</div><div><br></div><div>        if (t_check_status("40[02-689]|4[1-9][0-9]|5[0-9][0-9]") || (t_branch_timeout() && !t_branch_replied())) {</div><div><br></div><div>            msg_iflag_reset("UAC_AUTH");<br>            <getting VM addr here><br>            t_relay();<br>            exit;<br>        }<br>}<br><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2018-07-16 14:42 GMT+03:00 Daniel-Constantin Mierla <span dir="ltr"><<a href="mailto:miconda@gmail.com" target="_blank">miconda@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    <p>Hello,</p>
    <p>when you re-route to a new destination, can you try resetting the
      internal flag with:</p>
    <p>msg_iflag_reset("UAC_AUTH");</p>
    <p>Cheers,<br>
      Daniel<br>
    </p><div><div class="h5">
    <br>
    <div class="m_-5448190622325983035moz-cite-prefix">On 16.07.18 10:31, Yuriy Gorlichenko
      wrote:<br>
    </div>
    </div></div><blockquote type="cite"><div><div class="h5">
      
      <div dir="ltr">Hi. I found some additional scenario when kamailio
        works incorrect with ACK Cseq after succesfull auth with
        uac_auth but unsuccesfull call:<br>
        <br>
        1.Caller via kamailio as proxy (Cseq 1)<br>
        2.Kamailio resends call to provider with Auth method (Cseq 1)<br>
        3. Provider answers 401/407 (Cseq 1)<br>
        4. Kamailio inrases Cseq and sends invite with credentians
        (dialog track_cseq_updates = 1, uac_auth()) (Cseq 2)<br>
        5. Provider says - 404. not found (Cseq 2)<br>
        6. Kamailio resends INVITE to another server (lets say VM). It
        contans not tracked yet Cseq (Cseq 1)<br>
        7. VM server says 200 (Cseq 1)<br>
        8. Kamailio resends 200 to the caller (Сseq 1)<br>
        9. Caller says ACK (Cseq 1)<br>
        10. Kamailio incrases CSeq of ACK and resends t VM server (Сseq
        2)<br>
        <br>
        So in this case kamialio tries to track Sceq because thining
        that this ACK belongs to the dialog that was made to the auth
        server<br>
        <br>
        So as I see here is a misunderstanding on the dialog module<br>
        Any suggestions how to avoid it or exclude resent INVITE from
        the dialog module tracking?<br>
        <br>
      </div>
      <br>
      <fieldset class="m_-5448190622325983035mimeAttachmentHeader"></fieldset>
      <br>
      </div></div><pre>______________________________<wbr>_________________
Kamailio (SER) - Users Mailing List
<a class="m_-5448190622325983035moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a>
<a class="m_-5448190622325983035moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" target="_blank">https://lists.kamailio.org/<wbr>cgi-bin/mailman/listinfo/sr-<wbr>users</a><span class="HOEnZb"><font color="#888888">
</font></span></pre><span class="HOEnZb"><font color="#888888">
    </font></span></blockquote><span class="HOEnZb"><font color="#888888">
    <br>
    <pre class="m_-5448190622325983035moz-signature" cols="72">-- 
Daniel-Constantin Mierla -- <a class="m_-5448190622325983035moz-txt-link-abbreviated" href="http://www.asipto.com" target="_blank">www.asipto.com</a>
<a class="m_-5448190622325983035moz-txt-link-abbreviated" href="http://www.twitter.com/miconda" target="_blank">www.twitter.com/miconda</a> -- <a class="m_-5448190622325983035moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda" target="_blank">www.linkedin.com/in/miconda</a>
Kamailio World Conference -- <a class="m_-5448190622325983035moz-txt-link-abbreviated" href="http://www.kamailioworld.com" target="_blank">www.kamailioworld.com</a></pre>
  </font></span></div>

</blockquote></div><br></div>