Stir/Shaken attestation with +E164


I’ve got a trunk with an ITSP that historically, required us, for CallerID data (From, P-Asserted-Id, …), to use +E164 numbering in outbound calls .

As TNs require E164, is there a way with Pre-Dial handlers or anything else, to adapt to this ?

Best regards

Currently, Asterisk does the following…

  • The channel’s callerid is copied and canonicalized to remove the ‘+’ (among other things). The canonicalized value is use to look up the TN in the stir_shaken config and is used in the field in the outgoing Identity header. The original un-canonicalized value is still used for the PAI header.


  • The received callerid from PAI or From, etc. is copied and canonicalized before comparing it to the in the received Identity header.

So, Asterisk->Asterisk calls should work even with a ‘+’ prefix in the callerid. HOWEVER… Although Asterisk canonicalizes the value from the incoming PAI header before comparing it to the incoming Identity field, other implementations may not. This may result in them marking the call as unverified.

Thanks for replying.

In my tests with two different trunks, I could positively send outbound calls with +E164 identification (both caller and callee).

Maybe this precedence between canonicalization and comparison could be tested in a SIPit session, or even better, specified in a related IETF norm.

The Asterisk team does participate in OpenSIPIt. If it’s held this year, we’ll bring this up.

I’ll look through the various RFCs and ATIS requirements and see if anything is said about doing the comparison.

1 Like