[Asterisk-code-review] PJSIP: only send sips Contact header, if URI contains sips URI (asterisk[master])

Sebastian Damm asteriskteam at digium.com
Tue May 10 10:22:11 CDT 2016


Sebastian Damm has uploaded a new change for review.

  https://gerrit.asterisk.org/2799

Change subject: PJSIP: only send sips Contact header, if URI contains sips URI
......................................................................

PJSIP: only send sips Contact header, if URI contains sips URI

Change-Id: I5ae57d6531ce940b5fc64d5cd2673e60db0f9ba2
---
M res/res_pjsip_outbound_registration.c
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/99/2799/1

diff --git a/res/res_pjsip_outbound_registration.c b/res/res_pjsip_outbound_registration.c
index f85996e..815432d 100644
--- a/res/res_pjsip_outbound_registration.c
+++ b/res/res_pjsip_outbound_registration.c
@@ -1096,7 +1096,7 @@
 	contact->ptr = pj_pool_alloc(pool, PJSIP_MAX_URL_SIZE);
 	contact->slen = pj_ansi_snprintf(contact->ptr, PJSIP_MAX_URL_SIZE,
 		"<%s:%s@%s%.*s%s:%d%s%s%s%s>",
-		(pjsip_transport_get_flag_from_type(type) & PJSIP_TRANSPORT_SECURE) ? "sips" : "sip",
+		((pjsip_transport_get_flag_from_type(type) & PJSIP_TRANSPORT_SECURE) && PJSIP_URI_SCHEME_IS_SIPS(uri)) ? "sips" : "sip",
 		user,
 		(type & PJSIP_TRANSPORT_IPV6) ? "[" : "",
 		(int)local_addr.slen,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5ae57d6531ce940b5fc64d5cd2673e60db0f9ba2
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Sebastian Damm <damm at sipgate.de>



More information about the asterisk-code-review mailing list