<p></p>
<h3>Description</h3>
<p>CSeq fails to increment on CANCEL in v5.4.3.  Possible regression of problem fixed in issue <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="199361438" data-permission-text="Title is private" data-url="https://github.com/kamailio/kamailio/issues/918" data-hovercard-type="issue" data-hovercard-url="/kamailio/kamailio/issues/918/hovercard" href="https://github.com/kamailio/kamailio/issues/918">#918</a>.  Not reproducible in v5.3.8, nor in v5.5 nightly debian package.</p>
<p><em>Note:  I have another (production) system running v.5.4.1 that does not exhibit this behavior, so it's possible it broke in 5.4.2 or 5.4.3 specifically.</em></p>
<h3>Troubleshooting</h3>
<p>Compared behavior of 5.4.3 with 5.3.8 and 5.5 nightly Debian packages.</p>
<h4>Reproduction:</h4>
<p>Using <code>track_cseq_updates</code> parameter in the Dialog module, the CSeq offset should be automatically tracked if the UAC module is performing authentication.</p>
<h4>Log Messages</h4>
<p>Provided as attachment.</p>
<h4>SIP Traffic</h4>
<p>Full SIP Dialog will be provided as attachment, but here is the call ladder from  v5.4.3 illustrating that the Cseq in Frames 12, 14, 15, and 16 do not increment downstream after authentication.  They should match the Cseq from the re-INVITE in frame 7.  In v5.3.8 and v5.5-nightly, using the same configuration file the Cseq in frame 12 is 2, matching the Cseq in the re-INVITE, and the downstream party then recognizes the transaction and responds to the cancel.</p>
<pre><code>213.173.185.50:5060         10.0.0.4:5060               65.254.44.194:5060
─────┬─────────────       ─────────┬────────           ──────────┬─────────
#1   │    INVITE (SDP) Cseq:1      │                             │         
     │ ──────────────────────────> │                             │         
#2   │  100 trying -- your call is │                             │         
     │ <────────────────────────── │                             │         
#3   │                             │    INVITE (SDP) Cseq:1      │         
     │                             │ ──────────────────────────> │         
#4   │                             │         100 Trying          │         
     │                             │ <────────────────────────── │         
#5   │                             │  407 Proxy Authentication R │         
     │                             │ <────────────────────────── │         
#6   │                             │             ACK             │         
     │                             │ ──────────────────────────> │         
#7   │                             │    INVITE (SDP) Cseq:2      │         
     │                             │ ──────────────────────────> │         
#8   │                             │         100 Trying          │         
     │                             │ <────────────────────────── │         
#9   │                             │  183 Session Progress (SDP) │         
     │                             │ <────────────────────────── │         
#10  │  183 Session Progress (SDP) │                             │         
     │ <────────────────────────── │                             │         
#11  │       CANCEL Cseq:1         │                             │         
     │ ──────────────────────────> │                             │         
#12  │                             │       CANCEL  Cseq:1        │         
     │                             │ ──────────────────────────> │         
#13  │        200 canceling        │                             │         
     │ <────────────────────────── │                             │         
#14  │                             │       CANCEL  Cseq:1        │         
     │                             │ ────────────────────────>>> │         
#15  │                             │       CANCEL  Cseq:1        │         
     │                             │ ────────────────────────>>> │         
#16  │                             │       CANCEL  Cseq:1        │         
     │                             │ ────────────────────────>>> │         

</code></pre>
<h3>Possible Solutions</h3>
<p>This matches the description from issue <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="199361438" data-permission-text="Title is private" data-url="https://github.com/kamailio/kamailio/issues/918" data-hovercard-type="issue" data-hovercard-url="/kamailio/kamailio/issues/918/hovercard" href="https://github.com/kamailio/kamailio/issues/918">#918</a>.</p>
<h3>Additional Information</h3>
<ul>
<li><strong>Kamailio Version</strong> - output of <code>kamailio -v</code></li>
</ul>
<pre><code>version: kamailio 5.4.3 (x86_64/linux)
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED
ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: unknown
compiled with gcc 8.3.0
</code></pre>
<ul>
<li><strong>Operating System</strong>:</li>
</ul>

<p>uname -a :</p>
<pre><code>Linux aarenet-sipdir1 4.19.0-13-cloud-amd64 #1 SMP Debian 4.19.160-2 (2020-11-28) x86_64 GNU/Linux
</code></pre>
<p>lsb_release -a:</p>
<pre><code>No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 10 (buster)
Release:        10
Codename:       buster
</code></pre>

<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/2637">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZPXW4KFNVJODSMW753S7BQHXANCNFSM4XTXV4FA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABO7UZNW5VOE2RXZ7DUSC23S7BQHXA5CNFSM4XTXV4FKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4MBKJV7Q.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/issues/2637",
"url": "https://github.com/kamailio/kamailio/issues/2637",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>