Handling of extra 200 OK from forked INVITE

I am using Kamailio as a SIP Proxy in front of multiple Asterisk servers. I am using 13.11.2 with pjsip. Users can register with Kamailio from multiple devices and Kamailio is performing parallel forking of INVITEs sent to those users. Kamailio will CANCEL all but the first INVITE that receives a 200 OK. However, if two devices respond with a 200 OK at the same time, Kamailio forwards both 200 OKs to Asterisk. I believe Kamailio is required to do this so that a UAC can send an ACK+BYE for all but one of the 200 OKs.

What seems to be happening is that neither dialog is actually ended with a BYE, but the SDP answer from the second 200 OK is used, leaving the first one basically unusable. Is this known/expected behavior and is there any way to change it?

Thank you for your support!

This would be PJSIP level, so there’s nothing to change it besides changing the code most likely. I haven’t seen any issue reports about it so I’d suggest filing on the issue tracker[1].

[1] https://issues.asterisk.org/jira

Thank you for your response. I apologize for taking so long to act on this. Unfortunately I ran into some other more pressing issues in other areas. I have now logged this issue in JIRA: https://issues.asterisk.org/jira/browse/ASTERISK-26642

If there is anything I can do to provide additional information, please let me know.

Thanks!