Actually this needs to be handled by the client side. If it has already answered with 200ok, should reject the CANCEL with a negative response. Kamailio is proxy and cannot generate requests on behalf o devices. This is a well known race and the resolution by SIP RFC is that in case of receiving 2 of 200ok, the proxy must send both to caller in order for the calling device to decide which call has the best attributes for communication (e.g., one may have video, the other not).

The two 200ok can happen also if the cancel is generated by the caller device itself. Think of a parallel forking to two devices that have auto-answer machine turned on. Both will just send 200ok immediately. Also, the caller can send the cancel before any device responds, kamailio forwards the cancel but at the same time called devices answer. The caller device should send the BYE for both 200ok.

If you are still not convinced, you can discuss on mailing lists or sip-implementors forum. This is not a bug in Kamailio anyhow.


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub