[Asterisk-code-review] res pjsip rfc3326: Order of 'Reason' headers break many endp... (asterisk[master])

Jenkins2 asteriskteam at digium.com
Thu Mar 8 10:16:03 CST 2018


Jenkins2 has submitted this change and it was merged. ( https://gerrit.asterisk.org/8460 )

Change subject: res_pjsip_rfc3326: Order of 'Reason' headers break many endpoints
......................................................................

res_pjsip_rfc3326: Order of 'Reason' headers break many endpoints

ASTERISK-27554

Change-Id: If61c7faab7d2fa1031c056ed6268fe928e2391cf
---
M res/res_pjsip_rfc3326.c
1 file changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/res/res_pjsip_rfc3326.c b/res/res_pjsip_rfc3326.c
index 6c02a17..5ac16f0 100644
--- a/res/res_pjsip_rfc3326.c
+++ b/res/res_pjsip_rfc3326.c
@@ -91,12 +91,12 @@
 {
 	char buf[20];
 
-	snprintf(buf, sizeof(buf), "Q.850;cause=%i", ast_channel_hangupcause(session->channel) & 0x7f);
-	ast_sip_add_header(tdata, "Reason", buf);
-
 	if (ast_channel_hangupcause(session->channel) == AST_CAUSE_ANSWERED_ELSEWHERE) {
 		ast_sip_add_header(tdata, "Reason", "SIP;cause=200;text=\"Call completed elsewhere\"");
 	}
+
+	snprintf(buf, sizeof(buf), "Q.850;cause=%i", ast_channel_hangupcause(session->channel) & 0x7f);
+	ast_sip_add_header(tdata, "Reason", buf);
 }
 
 static void rfc3326_outgoing_request(struct ast_sip_session *session, struct pjsip_tx_data *tdata)

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

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: If61c7faab7d2fa1031c056ed6268fe928e2391cf
Gerrit-Change-Number: 8460
Gerrit-PatchSet: 1
Gerrit-Owner: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Ross Beer <ross.beer at voicehost.co.uk>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180308/2d9ac817/attachment-0001.html>


More information about the asterisk-code-review mailing list