[Asterisk-code-review] res pjsip caller id: Anonymize 'From' when caller id present... (asterisk[13])

Walter Doekes asteriskteam at digium.com
Fri Feb 26 02:30:08 CST 2016


Walter Doekes has posted comments on this change.

Change subject: res_pjsip_caller_id: Anonymize 'From' when caller id presentation is prohibited
......................................................................


Patch Set 1: Code-Review+1

(3 comments)

I can't vouch for the pjsip code itself, but the code reads as if the behaviour is implemented as expected.

Just one question below which you can probably dismiss as invalid.

https://gerrit.asterisk.org/#/c/2293/1/res/res_pjsip_caller_id.c
File res/res_pjsip_caller_id.c:

Line 696: 	/* We need to add pai/rpid before anonymizing From */
        : 	add_id_headers(session, tdata, &connected_id);
*Do* we need to do this before?

I'm not intimate with chan_pjsip at all. But that comment implies to me that a future PAI/RPID send in an already established dialog (reINVITE) would suddently provide anonymized values.

But that can't be correct, can it?


Line 700: 		/* Only change the From header on the initial outbound INVITE. Switching it
        : 		 * mid-call might confuse some UAs.
Yes, I cannot find this explicit limitation in RFC 3261:

    19.3 Tags

    The "tag" parameter is used in the To and From header fields of SIP
    messages.  It serves as a general mechanism to identify a dialog,
    which is the combination of the Call-ID along with two tags, one from
    each participant in the dialog.

But in RFC 2543 you can read it between the lines:

    10.1.1 Requests
    
    [...] If the From header, including any tag value, matches the value
    for an existing call [...] Otherwise, it is a new request [...] a new
    call leg is created.

Ergo, you're not supposed to alter the From header. I know that OpenSIPS
and other proxies rely on this limitation.


Line 715: 			/* Regardless of whether fromuser was specified or we trust the peer, if presentation
        : 			 * is prohibited, we're going to anonymize From.
+1 for expected behaviour.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I2c82a5ca1413c2c00fb62ea95b0ae8e97af54dc9
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: George Joseph <george.joseph at fairview5.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Jonathan Rose <jrose at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>
Gerrit-Reviewer: Walter Doekes <walter+asterisk at wjd.nu>
Gerrit-HasComments: Yes



More information about the asterisk-code-review mailing list