mirror of
https://github.com/asterisk/asterisk.git
synced 2026-07-03 13:26:58 -07:00
00dc2630aa
When a confirmed session is being terminated while an outgoing in-dialog INVITE transaction is still outstanding, the BYE is delayed until the outstanding transaction terminates. If that INVITE has already received a provisional response and the final response is malformed and rejected before transaction processing, the transaction can remain outstanding and the delayed BYE can keep the session, media state, RTP instance, and PJPROJECT pools referenced after the channels are gone. When a BYE is delayed behind an outstanding UAC INVITE, set a PJPROJECT transaction timeout on that INVITE so the delayed cleanup path has a bounded wait. If PJPROJECT terminates the dialog as a result of the timeout, discard the delayed BYE instead of sending a duplicate BYE. Fixes: #1965