summaryrefslogtreecommitdiff
path: root/res
diff options
context:
space:
mode:
authorRoss Beer <ross.beer@voicehost.co.uk>2018-03-06 19:31:01 +0000
committerJoshua Colp <jcolp@digium.com>2018-03-07 10:08:09 -0600
commit88cef40f6e27c61aac2eaed8a7cef807d22282b2 (patch)
treec2a54c7200dd0f9740aab6ff5391ffda95d929c8 /res
parent91a8c7a28114dd4d64dd5216a7cffd0f36d35bab (diff)
res_pjsip_rfc3326: Order of 'Reason' headers break many endpoints
ASTERISK-27554 Change-Id: If61c7faab7d2fa1031c056ed6268fe928e2391cf
Diffstat (limited to 'res')
-rw-r--r--res/res_pjsip_rfc3326.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/res/res_pjsip_rfc3326.c b/res/res_pjsip_rfc3326.c
index 6c02a176c..5ac16f024 100644
--- a/res/res_pjsip_rfc3326.c
+++ b/res/res_pjsip_rfc3326.c
@@ -91,12 +91,12 @@ static void rfc3326_add_reason_header(struct ast_sip_session *session, struct pj
{
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)