<p>George Joseph <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/6652">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Richard Mudgett: Looks good to me, but someone else must approve
Sean Bright: Looks good to me, but someone else must approve
George Joseph: Looks good to me, approved; Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_pjsip_caller_id chan_sip: Comply to RFC 3323 values for privacy<br><br>Currently privacy requests are only granted if the Privacy header<br>value is exactly "id" (defined in RFC 3325). It ignores any other<br>possible value (or a combination there of). This patch reverses the<br>logic from testing for "id" to grant privacy, to testing for "none" and<br>granting privacy for any other value. "none" must not be used in<br>combination with any other value (RFC 3323 section 4.2).<br><br>ASTERISK-27284 #close<br><br>Change-Id: If438a21f31a962da32d7a33ff33bdeb1e776fe56<br>---<br>M channels/chan_sip.c<br>M res/res_pjsip_caller_id.c<br>2 files changed, 5 insertions(+), 5 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/channels/chan_sip.c b/channels/chan_sip.c<br>index 8a30e0c..62ff505 100644<br>--- a/channels/chan_sip.c<br>+++ b/channels/chan_sip.c<br>@@ -18127,7 +18127,7 @@<br> }<br> <br> ast_copy_string(privacy, sip_get_header(req, "Privacy"), sizeof(privacy));<br>- if (!ast_strlen_zero(privacy) && !strncmp(privacy, "id", 2)) {<br>+ if (!ast_strlen_zero(privacy) && strcasecmp(privacy, "none")) {<br> callingpres = AST_PRES_PROHIB_USER_NUMBER_NOT_SCREENED;<br> }<br> if (!cid_name) {<br>diff --git a/res/res_pjsip_caller_id.c b/res/res_pjsip_caller_id.c<br>index 470d90f..64191a7 100644<br>--- a/res/res_pjsip_caller_id.c<br>+++ b/res/res_pjsip_caller_id.c<br>@@ -149,12 +149,12 @@<br> }<br> <br> privacy = pjsip_msg_find_hdr_by_name(rdata->msg_info.msg, &privacy_str, NULL);<br>- if (privacy && !pj_stricmp2(&privacy->hvalue, "id")) {<br>- id->number.presentation = AST_PRES_PROHIB_USER_NUMBER_NOT_SCREENED;<br>- id->name.presentation = AST_PRES_PROHIB_USER_NUMBER_NOT_SCREENED;<br>- } else {<br>+ if (!privacy || !pj_stricmp2(&privacy->hvalue, "none")) {<br> id->number.presentation = AST_PRES_ALLOWED_USER_NUMBER_NOT_SCREENED;<br> id->name.presentation = AST_PRES_ALLOWED_USER_NUMBER_NOT_SCREENED;<br>+ } else {<br>+ id->number.presentation = AST_PRES_PROHIB_USER_NUMBER_NOT_SCREENED;<br>+ id->name.presentation = AST_PRES_PROHIB_USER_NUMBER_NOT_SCREENED;<br> }<br> <br> return 0;<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/6652">change 6652</a>. To unsubscribe, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/6652"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: If438a21f31a962da32d7a33ff33bdeb1e776fe56 </div>
<div style="display:none"> Gerrit-Change-Number: 6652 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: dtryba <daniel@tryba.nl> </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Richard Mudgett <rmudgett@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Sean Bright <sean.bright@gmail.com> </div>