Skip to content
Snippets Groups Projects
Commit 88cef40f authored by Ross Beer's avatar Ross Beer Committed by Joshua Colp
Browse files

res_pjsip_rfc3326: Order of 'Reason' headers break many endpoints

ASTERISK-27554

Change-Id: If61c7faab7d2fa1031c056ed6268fe928e2391cf
parent 91a8c7a2
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment