Hello,
On an Asterisk 20 instance, I’m required to add a “phone-context=+1” or equivalent to SIP URIs when dialing out to the PSTN.
This phone-context is required to distinguish non-E164 domestic numbers (special-toll, short numbers, …) from E164 ones.
The PSTN trunk I’m using is set with user_eq_phone=yes.
When using Dial(PJSIP/12345@mytrunk), the outbound INVITE includes SIP URI like
12345@1.2.3.4;user=phone for request URI
<+123456799@9.8.7.6;user=phone> in From header
<12345@1.2.3.4;user=phone> in To header
When using Dial(PJSIP/123456;phone-context=+1@mytrunk), the outbound INVITE includes SIP URI like
12345;phone-context=+1@1.2.3.4 for request URI
<+123456799@9.8.7.6;user=phone> in From header
<12345;phone-context=+1@1.2.3.4;user=phone> in To header
When a ‘;phone-context=+1’ is appended at the end of a phone number, one may understand that this number is not a pure phone number anymore so ‘;user=phone’ must be removed
at the end of related SIP URIs (request and To URIs).
Symmetrically, the ‘;phone-context=+1’ can be considered a simple phone number attribute, so that ‘;user=phone’ still deserves its presence.
My questions are:
- Would you expect user=phone to be present or absent when a phone-context parameter is added like this at the end of dialed number ?
- How can I get my user=phone parameter back ?
Best regards