### Description
CSeq fails to increment on CANCEL in v5.4.3. Possible regression of problem fixed in issue #918. Not reproducible in v5.3.8, nor in v5.5 nightly debian package.
_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._
### Troubleshooting
Compared behavior of 5.4.3 with 5.3.8 and 5.5 nightly Debian packages.
#### Reproduction: Using `track_cseq_updates` parameter in the Dialog module, the CSeq offset should be automatically tracked if the UAC module is performing authentication.
#### Log Messages
Provided as attachment.
#### SIP Traffic
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. ``` 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 │ │ │ ────────────────────────>>> │
```
### Possible Solutions
This matches the description from issue #918.
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
``` 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 ```
* **Operating System**:
<!-- Details about the operating system, the type: Linux (e.g.,: Debian 8.4, Ubuntu 16.04, CentOS 7.1, ...), MacOS, xBSD, Solaris, ...; Kernel details (output of `uname -a`) -->
uname -a : ``` Linux aarenet-sipdir1 4.19.0-13-cloud-amd64 #1 SMP Debian 4.19.160-2 (2020-11-28) x86_64 GNU/Linux ```
lsb_release -a: ``` No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux 10 (buster) Release: 10 Codename: buster ```
Config, Log, and SIP messaging attached. The config file is simplified as much as I could for the purpose of reproducing this issue.
[kamailio_5.4.3.log](https://github.com/kamailio/kamailio/files/5978808/kamailio_5.4.3.log)
[SIP_Messages_noCseqIncrementOnCancel.txt](https://github.com/kamailio/kamailio/files/5978805/SIP_Messages_noCseqIncrem...)
[kamailio.cfg.txt](https://github.com/kamailio/kamailio/files/5978811/kamailio.cfg.txt)
Closed #2637.
Hi Ben, thanks for the report. It is already fixed in commit 88d1eb7a79acd6afecb3d6760889433f69646b5b. You can run 5.4.3 with this fix (as we are doing) fine, or wait for the 5.4.4 in a next days.