[Asterisk-code-review] res pjsip refer: Handle compact Refer-To header. (asterisk[13])

George Joseph asteriskteam at digium.com
Fri Dec 30 09:17:21 CST 2016


George Joseph has uploaded a new change for review. ( https://gerrit.asterisk.org/4684 )

Change subject: res_pjsip_refer:  Handle compact Refer-To header.
......................................................................

res_pjsip_refer:  Handle compact Refer-To header.

refer_incoming_refer_request needed to look for the "r" header as well
as the "Refer-To" header.

ASTERISK-26655 #close
patches:
	refer_compact_fix.diff	submitted by JoshE (license 6075)

Change-Id: I610410a99b02427ea5db887aeb454d5f12c2259f
---
M res/res_pjsip_refer.c
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/84/4684/1

diff --git a/res/res_pjsip_refer.c b/res/res_pjsip_refer.c
index 99295d5..3101c36 100644
--- a/res/res_pjsip_refer.c
+++ b/res/res_pjsip_refer.c
@@ -1006,6 +1006,7 @@
 	int response;
 
 	static const pj_str_t str_refer_to = { "Refer-To", 8 };
+	static const pj_str_t str_refer_to_s = { "r", 1 };
 	static const pj_str_t str_replaces = { "Replaces", 8 };
 
 	if (!session->channel) {
@@ -1024,7 +1025,7 @@
 	}
 
 	/* A Refer-To header is required */
-	refer_to = pjsip_msg_find_hdr_by_name(rdata->msg_info.msg, &str_refer_to, NULL);
+	refer_to = pjsip_msg_find_hdr_by_names(rdata->msg_info.msg, &str_refer_to, &str_refer_to_s, NULL);
 	if (!refer_to) {
 		pjsip_dlg_respond(session->inv_session->dlg, rdata, 400, NULL, NULL, NULL);
 		ast_debug(3, "Received a REFER without Refer-To on channel '%s' from endpoint '%s'\n",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I610410a99b02427ea5db887aeb454d5f12c2259f
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: George Joseph <gjoseph at digium.com>



More information about the asterisk-code-review mailing list