When Asterisk 20 is sending an outbound call using PJSIP, with send_pai and trust_id_outbound both set to yes, and when your dialplan don’t add any custom P-Asserted-Identity header, is it possible to observe different values in From and P-Asserted-Identity headers (beside Privacy: id or Privacy: none presence in P-Asserted-Identity) within outbound INVITE messages ?
If the from_user / from_domain options were set then From would be different. PAI can also be updated throughout the lifetime of a call, while From can not.
From CAN be set using from_user / from_domain for cases where it is needed. P-Asserted-Identity and Remote-Party-ID can be set using CALLERID() or CONNECTEDLINE() depending on the channel (caller vs called) and situation.
What I have in mind is Stir/Shaken compliance for outbound calling.
I read one frequent source of non-compliance calls, arise when From/PAI values are different and Attestation/Verification are done on different headers.
I somehow took for granted that, as I don’t customize my SIP trunks from_user / from_domain settings and don’t use PJSIP_HEADER to build any P-Asserted-Identity header, I should be immune to verification issues by the receiving Telco, even for anonymous calls or for forwarded calls.
My reasoning is:
even if the inbound call I have to forward to the PSTN, features different or missing values in from/PAI/whatever headers, Asterisk selects a single value the one being returned by ${CALLERID(num)},
as I explicitly normalize this value (to +E164 format) with a Set(CALLERID(num)=)
then I should be assured that my outbound call to the PSTN will have identical values in From and PAI headers
when Asterisk implicitly builds the Identity header for Stir/Shaken using From value (if I’m not mistaken), then this Identity will also “match” the PAI
receiving telco that is required to verify Identity should be happy.