summaryrefslogtreecommitdiff
path: root/channels/chan_sip.c
diff options
context:
space:
mode:
authorDaniel Tryba <daniel@pocos.nl>2017-10-02 14:48:41 +0200
committerdtryba <daniel@tryba.nl>2017-10-05 07:53:03 -0500
commit59b6e8467a399b5654e640455c0f5683ce029cd6 (patch)
treefec2c68910199a5e2f46097b8b0f9e206de38cf8 /channels/chan_sip.c
parent3ef6834c3b6fb9cb73164dcc56a10820026a63c5 (diff)
res_pjsip_caller_id chan_sip: Comply to RFC 3323 values for privacy
Currently privacy requests are only granted if the Privacy header value is exactly "id" (defined in RFC 3325). It ignores any other possible value (or a combination there of). This patch reverses the logic from testing for "id" to grant privacy, to testing for "none" and granting privacy for any other value. "none" must not be used in combination with any other value (RFC 3323 section 4.2). ASTERISK-27284 #close Change-Id: If438a21f31a962da32d7a33ff33bdeb1e776fe56
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r--channels/chan_sip.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 8a30e0c00..62ff505fc 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -18127,7 +18127,7 @@ static int get_pai(struct sip_pvt *p, struct sip_request *req)
}
ast_copy_string(privacy, sip_get_header(req, "Privacy"), sizeof(privacy));
- if (!ast_strlen_zero(privacy) && !strncmp(privacy, "id", 2)) {
+ if (!ast_strlen_zero(privacy) && strcasecmp(privacy, "none")) {
callingpres = AST_PRES_PROHIB_USER_NUMBER_NOT_SCREENED;
}
if (!cid_name) {