is there a way to get asterisk to Not convert E164 numbers in originating and terminating fields into digits only?
one of my upstream ITSPs wants numbers in both the orig and dest tn fields of the identity header to be E164 format. from what I can see, asterisk is converting these numbers after its out of my control in the dialplan. despite setting the caller ID number to E164.. and I see it makes it into the PAI and the FROM: fields correctly as E164, it ends up in the orig tn field of the identity header stripped of its ‘+’.
the result is the upstream provider wont verify the call despite the attestation level sent through for the originating tn.
running Asterisk 22.4.1
example of the payload below. sanitized.
{
"attest": "A",
"dest": {
"tn": ["16125551212"]
},
"iat": 1748795242,
"orig": {
"tn": "16135551234"
},
"origid": "some-id-here"
}
example of a portion of the invite here. (sanitized).
INVITE sip:16125551212@1.1.1.1 SIP/2.0
Via: SIP/2.0/UDP 1.1.1.2:5060;rport;branch=z9hG4bKPj3398aaa0
From: "Test" <sip:+16135551234@10.0.5.121>;tag=c516f97d-2
To: <sip:16125551212@1.1.1.1>
Contact: <sip:asterisk@1.1.1.2:5060>
Call-ID: 4329721d-
CSeq: 20381 INVITE
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, INFO, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub, histinfo
Session-Expires: 1800
RFC-8224 section 8.3 Telephone Number Canonicalization Procedures states:
Implementations MUST drop any "+"s, internal dashes, parentheses,
or other non-numeric characters, except for the "#" or "*" keys
used in some special service numbers (typically, these will appear
only in the To header field value). This MUST result in an ASCII
string limited to "#", "*", and digits without whitespace or
visual separators.
Can you give me an example of a number in the format they want? Is it just the ‘+’ at the front that’s the issue?
thanks for the reply.. I literally was on the phone with the provider when your message came through.. apparently the person I had talked to last week was mistaken in stating that the PASSPort needed the E164 formats.. its simply the TO: , FROM:, and the PAI that need phone numbers in the E164 format..
every ietf document I have read showed the orig tn and dest tn in standard 1NPANXXXXXX format…
furthermore I should get the “dufus” hat on this one as + signs arent directly supported in JWT anyway.. at least ive always understood that top be the case.. so I believe asterisk is doing it correctly in Canonicalizing the numbers going into the JWT of the PASSPoRT
This has been Solved ..
solution ended up being upstream provider gave me wrong info previously but wants FROM, TO, and PAI headers to contain phone numbers in E164 format or they will not even an attempt to Verify the Identity header sent..
thanks for the reply, and sorry to waste everyone’s time.