DevSteven Services

Signalling

user=phone in the SIP From and P-Asserted-Identity headers

Some operator networks route or accept a call only if the identity headers are marked as telephone numbers. Asterisk could mark the request URI, but not From or P-Asserted-Identity. The usereqphonefrom option does that, and works the same whatever number the header carries.

The problem

RFC 3261 section 19.1.1 defines the user=phone parameter: it says that the user part of a SIP URI is a telephone number, not an arbitrary name. IMS and mobile cores use it to decide how to treat an address. If it is missing from From or P-Asserted-Identity (RFC 3325), some networks reject the call, apply the wrong routing or treat the caller as unidentified.

What stock Asterisk does

chan_sip has usereqphone, which adds ;user=phone to the request URI when it holds a valid phone number. It does nothing for the From and P-Asserted-Identity headers.

What we change

A new flag, usereqphonefrom, extends the existing option to both identity headers. It can be set globally or per peer, and it only acts when the header holds a valid phone number. Additional custom data can be added to the same headers on request.

; sip.conf
[mobile-core]
type=peer
sendrpid=pai
usereqphone=yes
usereqphonefrom=yes

Result on the wire

INVITE sip:+37360111222@ims.example.net;user=phone SIP/2.0
From: <sip:+37360000000@ims.example.net;user=phone>;tag=1c9
P-Asserted-Identity: <sip:+37360000000@ims.example.net;user=phone>

Checking it

The setting is visible per peer in sip show peer (User=PhonePAI) and in the manager interface (SIP-UserPhoneFrom), so you can verify it without a packet capture.

Stackchan_sip on Asterisk 16 LTS
StandardsRFC 3261 §19.1.1, RFC 3325, RFC 3966
SinceVersion 3.3.1

Related

Need this on your platform? Tell us the Asterisk version and the interconnect, and we reply within 24 hours.

Request a quote