[Home]

Summary:ASTERISK-29014: res_pjsip_session: Re-INVITE collisions aren't handled correctly
Reporter:George Joseph (gjoseph)Labels:
Date Opened:2020-07-30 08:09:21Date Closed:2020-09-14 09:27:47
Priority:MajorRegression?
Status:Closed/CompleteComponents:Resources/res_pjsip_session
Versions:13.35.0 GIT 16.12.0 17.6.0 Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:When both Asterisk and a UA send re-invites at the same time, both send 491 "Transaction in progress" responses to each other and back off a specified amount of time before retrying.   When Asterisk prepared to send its re-invite, it set up the session's pending media state with the new topology it wanted, then sent the re-invite.  When it received the re-invite from the UA, it partially processed the media in the re-invite and reset the pending media state _before_ sending the 491 losing the state it set in _its_ re-invite.   When the backoff timer expires and Asterisk it re-sends the re-invite it originally sent, the pending media state is empty and the re-invite's sdp shows the streams as dropped.

Asterisk needs to do 2 things...
* Respond with a 491 _before_ making any changes to the session and media state.
* Save the media state when it queues the retry.
Comments:By: Alexei Gradinari (alexei gradinari) 2020-08-14 11:52:41.822-0500

Is it related to ASTERISK-28865?

By: Joshua C. Colp (jcolp) 2020-08-14 11:57:46.391-0500

The change in question is not related to ASTERISK-28865, and probably wouldn't resolve that.

By: Alexei Gradinari (alexei gradinari) 2020-08-18 12:32:14.618-0500

I think it's related.
There is "Re-INVITE collision" and as result "the re-invite's sdp shows the streams as dropped" because "the pending media state is empty".



By: Joshua C. Colp (jcolp) 2020-08-18 12:43:22.309-0500

The pending media state being empty is due to the T.38 implementation. For session refresh it is not empty. If this change results in changes there then that'd be nice, but it is not a fix focused on that.

By: Friendly Automation (friendly-automation) 2020-09-14 09:27:48.686-0500

Change 14730 merged by George Joseph:
res_pjsip_session:  Handle multi-stream re-invites better

[https://gerrit.asterisk.org/c/asterisk/+/14730|https://gerrit.asterisk.org/c/asterisk/+/14730]

By: Friendly Automation (friendly-automation) 2020-09-14 09:28:05.151-0500

Change 14910 merged by George Joseph:
res_pjsip_session:  Handle multi-stream re-invites better

[https://gerrit.asterisk.org/c/asterisk/+/14910|https://gerrit.asterisk.org/c/asterisk/+/14910]

By: Friendly Automation (friendly-automation) 2020-09-14 09:28:17.647-0500

Change 14911 merged by George Joseph:
res_pjsip_session:  Handle multi-stream re-invites better

[https://gerrit.asterisk.org/c/asterisk/+/14911|https://gerrit.asterisk.org/c/asterisk/+/14911]

By: Friendly Automation (friendly-automation) 2020-09-14 09:28:28.643-0500

Change 14912 merged by George Joseph:
res_pjsip_session:  Handle multi-stream re-invites better

[https://gerrit.asterisk.org/c/asterisk/+/14912|https://gerrit.asterisk.org/c/asterisk/+/14912]

By: Friendly Automation (friendly-automation) 2020-09-14 09:28:39.931-0500

Change 14913 merged by George Joseph:
res_pjsip_session:  Handle multi-stream re-invites better

[https://gerrit.asterisk.org/c/asterisk/+/14913|https://gerrit.asterisk.org/c/asterisk/+/14913]

By: Friendly Automation (friendly-automation) 2020-09-15 14:30:06.680-0500

Change 14894 merged by George Joseph:
res_pjsip_session: Fix issue with COLP and 491

[https://gerrit.asterisk.org/c/asterisk/+/14894|https://gerrit.asterisk.org/c/asterisk/+/14894]

By: Friendly Automation (friendly-automation) 2020-09-15 14:30:20.443-0500

Change 14895 merged by George Joseph:
res_pjsip_session: Fix issue with COLP and 491

[https://gerrit.asterisk.org/c/asterisk/+/14895|https://gerrit.asterisk.org/c/asterisk/+/14895]

By: Friendly Automation (friendly-automation) 2020-09-15 14:30:31.724-0500

Change 14896 merged by George Joseph:
res_pjsip_session: Fix issue with COLP and 491

[https://gerrit.asterisk.org/c/asterisk/+/14896|https://gerrit.asterisk.org/c/asterisk/+/14896]

By: Friendly Automation (friendly-automation) 2020-09-15 14:30:49.353-0500

Change 14897 merged by George Joseph:
res_pjsip_session: Fix issue with COLP and 491

[https://gerrit.asterisk.org/c/asterisk/+/14897|https://gerrit.asterisk.org/c/asterisk/+/14897]

By: Friendly Automation (friendly-automation) 2020-09-15 14:31:03.241-0500

Change 14898 merged by George Joseph:
res_pjsip_session: Fix issue with COLP and 491

[https://gerrit.asterisk.org/c/asterisk/+/14898|https://gerrit.asterisk.org/c/asterisk/+/14898]