summaryrefslogtreecommitdiff
path: root/channels/chan_sip.c
diff options
context:
space:
mode:
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r--channels/chan_sip.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 80417ef16..f4ed077ec 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -12119,8 +12119,9 @@ static void initreqprep(struct sip_request *req, struct sip_pvt *p, int sipmetho
if ((ast_party_id_presentation(&p->owner->connected.id) & AST_PRES_RESTRICTION) == AST_PRES_ALLOWED) {
l = p->owner->connected.id.number.valid ? p->owner->connected.id.number.str : NULL;
n = p->owner->connected.id.name.valid ? p->owner->connected.id.name.str : NULL;
- } else if (!ast_test_flag(&p->flags[0], SIP_SENDRPID)) {
- /* if we are not sending RPID and user wants his callerid restricted */
+ } else {
+ /* Even if we are using RPID, we shouldn't leak information in the From if the user wants
+ * their callerid restricted */
l = CALLERID_UNKNOWN;
n = l;
d = FROMDOMAIN_INVALID;