<p>Hi Daniel,</p>

<p>This issue might be related to <a href="https://github.com/kamailio/kamailio/issues/679" class="issue-link js-issue-link" data-url="https://github.com/kamailio/kamailio/issues/679" data-id="161449355" data-error-text="Failed to load issue title" data-permission-text="Issue title is private">#679</a> and <a href="https://github.com/kamailio/kamailio/issues/752" class="issue-link js-issue-link" data-url="https://github.com/kamailio/kamailio/issues/752" data-id="172107970" data-error-text="Failed to load issue title" data-permission-text="Issue title is private">#752</a>. </p>

<p>On a "A endpoint" --- Kamailio ---- "B endpoint" scenario with track_cseq_updates enabled, I am having this issue:</p>

<ul>
<li><p><strong>A</strong> sends INVITE with CSeq 101, <strong>Kamailio</strong> forwards it and gets 407 from <strong>B</strong>.</p></li>
<li><p><strong>Kamailio</strong> makes the SIP Auth with CSeq 102 using <em>uac_auth</em>.</p></li>
<li><p><strong>A</strong> sends a within-dialog transaction with Cseq 102.</p></li>
<li><p><strong>Kamailio</strong> does not mangle the Cseq (although it adds P-K-CSeq-Refresh: 103 header).</p></li>
<li><p><strong>B</strong> sends 200 OK with Cseq 102.</p></li>
<li><p><strong>Kamailio</strong> mangles it and forwards it to <strong>A</strong> with Cseq 101 (that doesn't match the expected CSeq).</p></li>
</ul>

<p>I have tested both in master branch (commit <a href="https://github.com/kamailio/kamailio/commit/d150d5ae4be2e538ef5e53be9c1bc9df0fa407f8" class="commit-link"><tt>d150d5a</tt></a>) and 4.4 branch (commit <a href="https://github.com/kamailio/kamailio/commit/5a21952e45ae31e432bda357a6bc8cbe152610ad" class="commit-link"><tt>5a21952</tt></a>).</p>

<p>I send you a pcap to your gmail account so that you can see what I mean :)</p>

<p>Thank you and tell me please if you need more testing!</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/787">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AF36ZaCxXTeI4ro1R0ddxL39-hj_T28Yks5qrqHQgaJpZM4KAlOv">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AF36ZX2guLO-Xw_L6l_-c6GchJAlsYS-ks5qrqHQgaJpZM4KAlOv.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/kamailio/kamailio/issues/787"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/kamailio/kamailio","title":"kamailio/kamailio","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/kamailio/kamailio"}},"updates":{"snippets":[{"icon":"DESCRIPTION","message":"CSeqs following the auth transaction are not mangled properly (track_cseq_updates) (#787)"}],"action":{"name":"View Issue","url":"https://github.com/kamailio/kamailio/issues/787"}}}</script>