Can you add in kamailio.cfg:
``` log_prefix="{$mt $hdr(CSeq) $ci} " ```
Then reproduce the issue and grab again the log messages with debug=3. It will help to track better the messages printed for invite or cancel.
Would be a easy way that I can reproduce it easy without a need to build a complex testbed?