Questions About SIP From, P-Asserted-Id Fields And Diversion Headers ?

Home » Asterisk Users » Questions About SIP From, P-Asserted-Id Fields And Diversion Headers ?
Asterisk Users 6 Comments

Hi,

After a long discussion with a friend, I would like to ask here:

1.According SIP RFCs, is possible/recommended to have different values in From and P-Asserted-Id fields ?
For instance, From field showing 123456789 and P-Asserted-Id showing
987654321 (beside privacy considerations) ?

2. When Bob forwards to Cory a call coming from Alice, would expect Diversion/History-Info header to include Alice’s number ?

Best regards

6 thoughts on - Questions About SIP From, P-Asserted-Id Fields And Diversion Headers ?

  • Yes, most obviuos need for PAI is a call where anonimity is desired by caller. Set the From to anonymous@anonymous.invalid and PAI to a real user if the destination is trusted, any proxy that handles this message that doesn’t trust a destination will strip PAI thus ensuring privacy.

    No, diversion/history should contain Bob.

  • Possible? yes absolutely. Recommended? who knows? Implementations are all over the place. I’ve always thought of the From header as identifying the user agent making the request which kinda agrees with RFC3261. The PAI
    header should contain the identity of the original caller.

    No. The diversion header shows who the diverter is. https://tools.ietf.org/html/rfc5806

  • 2018-06-05 15:27 GMT+02:00 George Joseph :
    Thank you very much, George for replying.

    How would you then configure both headers, respectively ?

    From memory, in previous testings, whenever CALLERID was set to WHATEVER, P-Asserted-Id was also set to WHATEVER and vice versa, so that I inferred from this that P-Asserted-Id was meant for Privacy considerations and nothing else (see [1])

    [1]
    https://www.voip-info.org/p-asserted-identity-and-remote-party-id-header/

  • PAI should be used to indicate the calling party’s identification regardless of privacy concerns. In the dialplan you can use the CALLERPRES
    function to control privacy on a call by call basis.

  • 2018-06-05 20:29 GMT+02:00 George Joseph :

    I’m sorry but I still have a doubt … Let me re-phrase my question:

    My setup is:
    Asterisk <--- PJSIP ---> Bob

    For a reason, I want Bob’s phone to receive a call with the following headers:

    From: “Foo” ;tag=as75ee8c7c P-Asserted-Id: “Foo” >;whatever

    My dialplan is:
    same = n,Set(CALLERID(num)