CANCEL on a Ringing Sip Dialog is not relayed

Johannes Westhuis via sr-users <[email protected]> Wed, 10 Jun 2026 07:26:25 -0000
Newsgroups gmane.comp.voip.ser
Message-ID <[email protected]>
Hi all,

I have an issue with Kamailio 6.1.3_bpo13 (installed from http://deb.kamailio.org/kamailio61 trixie/main amd64 Packages)

My Kamailio is acting as a proxy and is working very nicely. In certain circumstances (that i am not really able to grasp) a CANCEL request for a ringing call is not relayed as expected.

In the log, i can see, that the transaction matching fails.

The following messages are exchanged:

Client -> INVITE -> Kamailio (Via: SIP/2.0/TCP 192.168.179.124:49196;rport;branch=z9hG4bKPj32D404B5-C596-48B9-93B4-1FA14B659405;alias)
Client <- 100 Trying <- Kamailio
Client <- 183 Session Progress <- Kamailio
Client -> PRACK -> Kamailio
Client <- 200 OK (PRACK) <- Kamailio
Client <- 180 Ringing <- Kamailio
- 7 seconds pause -
Client -> CANCEL -> Kamailio (Via: SIP/2.0/TCP 82.xx.xxx.xxx:49196;rport;branch=z9hG4bKPj32D404B5-C596-48B9-93B4-1FA14B659405;alias)

The Via headers are send by the client, the second one contains the public ip of the clients nat.

The log snippet, that i think is relevant here:

2026-06-05T13:42:19.856635+00:00 proxy1 /usr/sbin/kamailio[5273]: DEBUG: {1 1067 CANCEL 591BDD7F-5779-42F8-BF33-4F801CCA02C0} nathelper [nhelpr_funcs.c:294]: get_contact_uri(): no Contact header
2026-06-05T13:42:19.856649+00:00 proxy1 /usr/sbin/kamailio[5273]: DEBUG: {1 1067 CANCEL 591BDD7F-5779-42F8-BF33-4F801CCA02C0} <core> [core/parser/sdp/sdp.c:865]: parse_sdp(): message body has length zero
2026-06-05T13:42:19.856664+00:00 proxy1 /usr/sbin/kamailio[5273]: DEBUG: {1 1067 CANCEL 591BDD7F-5779-42F8-BF33-4F801CCA02C0} htable [ht_api.c:248]: ht_get_table(): htable found [vtp]
2026-06-05T13:42:19.856679+00:00 proxy1 /usr/sbin/kamailio[5273]: DEBUG: {1 1067 CANCEL 591BDD7F-5779-42F8-BF33-4F801CCA02C0} tm [t_lookup.c:1045]: t_lookupOriginalT(): searching on hash entry 18213
2026-06-05T13:42:19.856696+00:00 proxy1 /usr/sbin/kamailio[5273]: DEBUG: {1 1067 CANCEL 591BDD7F-5779-42F8-BF33-4F801CCA02C0} tm [t_lookup.c:513]: matching_3261(): RFC3261 transaction matching failed - via branch [z9hG4bKPj32D404B5-C596-48B9-93B4-1FA14B659405]
2026-06-05T13:42:19.856710+00:00 proxy1 /usr/sbin/kamailio[5273]: DEBUG: {1 1067 CANCEL 591BDD7F-5779-42F8-BF33-4F801CCA02C0} tm [t_lookup.c:1142]: t_lookupOriginalT():  no CANCEL matching found! 
2026-06-05T13:42:19.856725+00:00 proxy1 /usr/sbin/kamailio[5273]: DEBUG: {1 1067 CANCEL 591BDD7F-5779-42F8-BF33-4F801CCA02C0} tm [t_lookup.c:1144]: t_lookupOriginalT(): lookup completed
2026-06-05T13:42:19.856741+00:00 proxy1 /usr/sbin/kamailio[5273]: DEBUG: {1 1067 CANCEL 591BDD7F-5779-42F8-BF33-4F801CCA02C0} tm [tm.c:1327]: ki_t_lookup_cancel_flags(): lookup_original: t_lookupOriginalT returned: (nil)

Is the IP in the Via used for matching the transaction?
What would be the right thing to do here?

Best regards,
Johannes
__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions -- [email protected]
To unsubscribe send an email to [email protected]
Important: keep the mailing list in the recipients, do not reply only to the sender!