[asterisk-commits] res pjsip session: Don't end session when receiving a 500 on... (asterisk[15])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Sep 25 12:23:59 CDT 2017


Joshua Colp has submitted this change and it was merged. ( https://gerrit.asterisk.org/6568 )

Change subject: res_pjsip_session: Don't end session when receiving a 500 on a reinvite
......................................................................

res_pjsip_session: Don't end session when receiving a 500 on a reinvite

During a reinvite, if a remote endpoint error occurs and it returns a 500 the
session would end. This patch makes it so the session is not terminated, but
continues as it was.

The reason for this is because some endpoints may send non session terminating
"server errors" like a failed codec negotiation. So in this case instead of
ending the call it can hopefully continue. In the case of a real server error
the session is already "doomed", will be known soon enough and appropriately
ended by Asterisk later.

Change-Id: Ifeedae86b8cb44b92d52c79046522ec5f0aff1d5
---
M res/res_pjsip_session.c
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Joshua Colp: Looks good to me, but someone else must approve; Approved for Submit
  Richard Mudgett: Looks good to me, approved



diff --git a/res/res_pjsip_session.c b/res/res_pjsip_session.c
index b587457..c974e48 100644
--- a/res/res_pjsip_session.c
+++ b/res/res_pjsip_session.c
@@ -3468,8 +3468,8 @@
 							ast_sip_session_send_request_with_cb(session, tdata, cb);
 							return;
 						}
-						if (tsx->status_code != 488) {
-							/* Other reinvite failures (except 488) result in destroying the session. */
+						if (tsx->status_code != 488 && tsx->status_code != 500) {
+							/* Other reinvite failures (except 488 and 500) result in destroying the session. */
 							if (pjsip_inv_end_session(inv, 500, NULL, &tdata) == PJ_SUCCESS
 								&& tdata) {
 								ast_sip_session_send_request(session, tdata);

-- 
To view, visit https://gerrit.asterisk.org/6568
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 15
Gerrit-MessageType: merged
Gerrit-Change-Id: Ifeedae86b8cb44b92d52c79046522ec5f0aff1d5
Gerrit-Change-Number: 6568
Gerrit-PatchSet: 1
Gerrit-Owner: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-commits/attachments/20170925/fc8d1595/attachment-0001.html>


More information about the asterisk-commits mailing list