[asterisk-commits] res pjsip session: Release media resources on session end qu... (asterisk[15])
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Aug 8 10:39:56 CDT 2017
Jenkins2 has submitted this change and it was merged. ( https://gerrit.asterisk.org/6168 )
Change subject: res_pjsip_session: Release media resources on session end quicker.
......................................................................
res_pjsip_session: Release media resources on session end quicker.
A change was made long ago where the session was kept around
until the underlying INVITE session had been destroyed. This
had the side effect of also keeping the underlying media resources
around for this time as well.
This change ensures that when we are told to terminate the
session we immediately release any media sessions associated
with it.
ASTERISK-27110
Change-Id: I643e431d5c3bf05cda220c1d39e824a505a29b82
---
M res/res_pjsip_session.c
1 file changed, 9 insertions(+), 0 deletions(-)
Approvals:
George Joseph: Looks good to me, but someone else must approve
Kevin Harwell: Looks good to me, approved
Jenkins2: Approved for Submit
diff --git a/res/res_pjsip_session.c b/res/res_pjsip_session.c
index bb349a4..31e2014 100644
--- a/res/res_pjsip_session.c
+++ b/res/res_pjsip_session.c
@@ -2396,6 +2396,15 @@
response = 603;
}
+ /* The media sessions need to exist for the lifetime of the underlying channel
+ * to ensure that anything (such as bridge_native_rtp) has access to them as
+ * appropriate. Since ast_sip_session_terminate is called by chan_pjsip and other
+ * places when the session is to be terminated we terminate any existing
+ * media sessions here.
+ */
+ SWAP(session->active_media_state, session->pending_media_state);
+ ast_sip_session_media_state_reset(session->pending_media_state);
+
switch (session->inv_session->state) {
case PJSIP_INV_STATE_NULL:
if (!session->inv_session->invite_tsx) {
--
To view, visit https://gerrit.asterisk.org/6168
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 15
Gerrit-MessageType: merged
Gerrit-Change-Id: I643e431d5c3bf05cda220c1d39e824a505a29b82
Gerrit-Change-Number: 6168
Gerrit-PatchSet: 2
Gerrit-Owner: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-commits/attachments/20170808/d3892fd3/attachment-0001.html>
More information about the asterisk-commits
mailing list