Unsupported URI Scheme

Hi Folks,
It’s been a while since I started using asterisk, I generally use chan_pjsip module to intercept calls and process them accordingly. But recently I came across registration based integration to accept incoming traffic. And along with that the client is sending request using the tel URI scheme.
Below is the pjsip configuration I am trying to use.

[global]
type=global
user_agent=Telephony
use_callerid_contact=true

[transport-udp]
type=transport
protocol=udp
bind=:5060

[orange-trunk]
type=endpoint
context=office
disallow=all
allow=alaw,ulaw
rewrite_contact=yes
media_address=
bind_rtp_to_media_address=yes
aors=orange-trunk
auth=orange-auth
from_user=
from_domain=
send_rpid=yes
direct_media=no

[trunk]
type=aor
contact=sip:

[auth]
type=auth
auth_type=userpass
username=
password=

[orange-trunk]
type=registration
outbound_auth=auth
server_uri=sip:
client_uri=sip:
retry_interval=60

[devtest]
type=endpoint
disallow=all
allow=alaw,ulaw
100rel=no
user_eq_phone=true
media_address=
bind_rtp_to_media_address=yes

And this is the INVITE that I am intercepting

Frame 1: 1404 bytes on wire (11232 bits), 1404 bytes captured (11232 bits)
Linux cooked capture v1
Internet Protocol Version 4, Src: IP, Dst: IP
User Datagram Protocol, Src Port: 5060, Dst Port: 5060
Session Initiation Protocol (INVITE)
Request-Line: INVITE sip:s@IP:5060 SIP/2.0
Message Header
Via: SIP/2.0/UDP IP:5060;branch=z9hG4bKpdj731827cjp2q1pw2oz3q83m;Role=3;Hpt=8ea2_36
Record-Route: sip:IP:5060;lr;Hpt=nw_8b_66cedf1c_de6b_ex_8ea2_16;CxtId=4;TRC=ffffffff-ffffffff;X-HwB2bUaCookie=19735
Call-ID: asbcojomonbtuiosnujb1ikoootunksso1rt@IP
[Generated Call-ID: asbcojomonbtuiosnujb1ikoootunksso1rt@IP]
From: "ID"tel:NUMBER;noa=subscriber;srvattri=national;phone-context=+2376;tag=ttivuous
To: sip:NUMBER@IP;transport=udp;user=phone
CSeq: 1 INVITE
Allow: INVITE,ACK,OPTIONS,BYE,CANCEL,INFO,PRACK,NOTIFY,MESSAGE,UPDATE
Contact: sip:IP:5060;Dsp=ea9a-200;Hpt=nw_8b_66cedf1c_de6b_ex_8ea2_16;CxtId=4;TRC=ffffffff-ffffffff
Max-Forwards: 66
Supported: timer,100rel,histinfo
Session-Expires: 1800
Min-SE: 600
P-Asserted-Identity: tel:NUMBER
P-Called-Party-ID: tel:NUMBER
P-Early-Media: supported,gated
Content-Length: 425
Content-Type: application/sdp
Message Body

Can someone please help me understand how this integration may work wether using chan_sip module or chan_pjsip, or is it completely not possible.

Asterisk version → 18.8.0

You’re using an old version of Asterisk 18 without tel URI support in PJSIP. You’d have to upgrade.

thanks for the quick response will try with latest version

Hi,

I recently upgraded to version 20.9.2, which successfully resolved the previous issue with unsupported URIs. However, I’m now encountering a problem where incoming calls are being rejected with an “Unauthorized” response, despite the trunk registration showing as successful. I’m providing the configuration details and network traces below. Any suggestions or insights would be greatly appreciated.

pjsip.conf

[global]
type=global
user_agent=Telephony
use_callerid_contact=true

[transport-udp]
type=transport
protocol=udp
bind=MY-SERVER-IP:5060

; Authentication details
[trunk_auth]
type=auth
auth_type=userpass
username=MSC-URI
password=SECRET

; AOR (Address of Record)
[trunk_aor]
type=aor
contact=sip:MSC-IP

; SIP endpoint
[trunk_endpoint]
type=endpoint
transport=transport-udp
context=office-phones ; INCOMING
disallow=all
allow=ulaw,alaw
aors=trunk_aor
auth=trunk_auth
direct_media=no
media_address=MY-SERVER-IP

; Registration for SIP trunk
[trunk_registration]
type=registration
transport=transport-udp
outbound_auth=trunk_auth
server_uri=sip:MSC-IP
client_uri=sip:MSC-URI
contact_user=MSC-USERNAME
retry_interval=60
expiration=3600

[devtest]
type=endpoint
context=office-phones ; OUT-DIAL
disallow=all
allow=alaw,ulaw
100rel=no
user_eq_phone=true
media_address=MY-SERVER-IP
bind_rtp_to_media_address=yes

You have no auth= for the endpoint. Registration is not about authentication, but rather about how to route incoming calls (although some ITSPs do use it as a precondition for outgoing calls).

but please see I already have auth=trunk_auth for my incoming endpoint, that’s the reason I am seeking help.

That will challenge the incoming INVITE for authentication, which based on the limited amount of output you’ve provided I’m guessing is what is happening. It is then up to the remote side to resend the INVITE with credentials.

If this doesn’t happen then the remote side probably doesn’t want to be challenged for authentication, and you’d remove the “auth” line. If what you already want is to authenticate on calls PLACED to the remote side, it would instead be “outbound_auth”.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.