Good morning,
I’m setting up an asterisk server on ubuntu 24 using PJSIP, but I’m facing a problem that I can’t understand :
I’ve set "pjsip set logger on "
Each time a user try to register the asterisk console keep saying :
PJSIP Logging enabled
<--- Received SIP request (740 bytes) from UDP:10.10.10.249:57656 --->
REGISTER sip:192.255.255.251;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 10.10.10.249:57656;branch=z9hG4bK-524287-1---a4965a221872255f;rport
Max-Forwards: 70
Contact: <sip:vromain_endpoint@10.10.10.249:57656;rinstance=11419768bdec1fbb;transport=UDP>
To: <sip:vromain_endpoint@192.255.255.251;transport=UDP>
From: <sip:vromain_endpoint@192.255.255.251;transport=UDP>;tag=caf63217
Call-ID: hrRxLnS3O7emPXPjeTM9Ag..
CSeq: 1 REGISTER
Expires: 60
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Supported: replaces, norefersub, extended-refer, timer, sec-agree, outbound, path, X-cisco-serviceuri
User-Agent: Z 5.5.15 v2.10.19.5
Allow-Events: presence, kpml, talk, as-feature-event
Content-Length: 0
<--- Transmitting SIP response (533 bytes) to UDP:10.10.10.249:57656 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 10.10.10.249:57656;rport=57656;received=10.10.10.249;branch=z9hG4bK-524287-1---a4965a221872255f
Call-ID: hrRxLnS3O7emPXPjeTM9Ag..
From: <sip:vromain_endpoint@192.255.255.251>;tag=caf63217
To: <sip:vromain_endpoint@192.255.255.251>;tag=z9hG4bK-524287-1---a4965a221872255f
CSeq: 1 REGISTER
WWW-Authenticate: Digest realm="asterisk",nonce="1725111052/dd76d89ae075212458209e6c132925bd",opaque="5f91c66f76ffcf79",algorithm=MD5,qop="auth"
Server: Asterisk PBX 20.9.2
Content-Length: 0
<--- Received SIP request (1038 bytes) from UDP:10.10.10.249:57656 --->
REGISTER sip:192.255.255.251;transport=UDP SIP/2.0
Via: SIP/2.0/UDP 10.10.10.249:57656;branch=z9hG4bK-524287-1---42cbe424caa14219;rport
Max-Forwards: 70
Contact: <sip:vromain_endpoint@10.10.10.249:57656;rinstance=11419768bdec1fbb;transport=UDP>
To: <sip:vromain_endpoint@192.255.255.251;transport=UDP>
From: <sip:vromain_endpoint@192.255.255.251;transport=UDP>;tag=caf63217
Call-ID: hrRxLnS3O7emPXPjeTM9Ag..
CSeq: 2 REGISTER
Expires: 60
Allow: INVITE, ACK, CANCEL, BYE, NOTIFY, REFER, MESSAGE, OPTIONS, INFO, SUBSCRIBE
Supported: replaces, norefersub, extended-refer, timer, sec-agree, outbound, path, X-cisco-serviceuri
User-Agent: Z 5.5.15 v2.10.19.5
Authorization: Digest username="vromain",realm="asterisk",nonce="1725111052/dd76d89ae075212458209e6c132925bd",uri="sip:192.255.255.251;transport=UDP",response="0d1685885c15f52c2a082c39ce4d4648",cnonce="4cad997cf1ee8ac294202cfdcbc72770",nc=00000001,qop=auth,algorithm=MD5,opaque="5f91c66f76ffcf79"
Allow-Events: presence, kpml, talk, as-feature-event
Content-Length: 0
<--- Transmitting SIP response (384 bytes) to UDP:10.10.10.249:57656 --->
SIP/2.0 404 Not Found
Via: SIP/2.0/UDP 10.10.10.249:57656;rport=57656;received=10.10.10.249;branch=z9hG4bK-524287-1---42cbe424caa14219
Call-ID: hrRxLnS3O7emPXPjeTM9Ag..
From: <sip:vromain_endpoint@192.255.255.251>;tag=caf63217
To: <sip:vromain_endpoint@192.255.255.251>;tag=z9hG4bK-524287-1---42cbe424caa14219
CSeq: 2 REGISTER
Server: Asterisk PBX 20.9.2
Content-Length: 0
[Aug 31 13:30:53] **WARNING**[26008]: **res_pjsip_registrar.c**:**1166** **find_registrar_aor**: AOR '' not found for endpoint 'vromain_endpoint' (10.10.10.249:57656)
Here is the configuration I’m testing (I’ve been checking it with mistral AI which confirmed that the reference to the aor are properly set):
[general]
type=global
[transport-udp]
type=transport
protocol=udp ;udp,tcp,tls,ws,wss,flow
bind=0.0.0.0:5060
local_net=192.168.17.248/29
local_net=192.255.255.248/29
local_net=10.10.10.248/29
external_media_address=46.4.42.59
external_signaling_address=46.4.42.59
[registrar]
type=registrar
transport=transport-udp
[user_registration](!)
type=registration
server_uri=sip:192.1255.255.251
transport=transport-udp
[assistance_endpoint](!)
type=endpoint
transport=transport-udp
context=assistance
disallow=all
allow=ulaw,alaw,g722,gsm
rtp_symmetric=yes
force_rport=yes
rewrite_contact=yes
[assistance_auth](!)
type=auth
auth_type=userpass
[assistance_aor](!)
type=aor
max_contacts=1
remove_existing=yes
[commercial_endpoint](!)
type=endpoint
transport=transport-udp
context=commercial
disallow=all
allow=ulaw,alaw,g722,gsm
rtp_symmetric=yes
force_rport=yes
rewrite_contact=yes
[commercial_auth](!)
type=auth
auth_type=userpass
[commercial_aor](!)
type=aor
max_contacts=1
remove_existing=yes
;;;;;;;;;;;;;;;;;;;;
;DEFINITION MANUELLE DES UTILISATEURS
;;;;;;;;;;;;;;;;;;;;
[vromain_endpoint](assistance_endpoint)
auth=vromain_auth
aors=vromain_aor
[vromain_auth](assistance_auth)
username=vromain
password=test
[vromain_aor](assistance_aor)
contact=sip:vromain@192.168.2.34:5060
[vromain_registration](user_registration)
client_uri=sip:vromain@192.255.255.251
contact_user=vromain
outbound_auth=vromain_endpoint
[jandrena_endpoint](assistance_endpoint)
auth=jandrena_auth
aors=jandrena_aor
[jandrena_auth](assistance_auth)
username=jandrena
password=test
[jandrena_aor](assistance_aor)
contact=sip:jandrena@192.168.2.34:5060
[contact_endpoint](commercial_endpoint)
auth=contact_auth
aors=contact_aor
[contact_auth](commercial_auth)
username=contact
password=test
[contact_aor](commercial_aor)
contact=sip:contact@192.168.2.34:5060
The endpoints, auth and aors seems to be correctly set as they are recognized by asterisk and the console is able to display each of them :
obelix*CLI> pjsip show endpoints
Endpoint: <Endpoint/CID.....................................> <State.....> <Channels.>
I/OAuth: <AuthId/UserName...........................................................>
Aor: <Aor............................................> <MaxContact>
Contact: <Aor/ContactUri..........................> <Hash....> <Status> <RTT(ms)..>
Transport: <TransportId........> <Type> <cos> <tos> <BindAddress..................>
Identify: <Identify/Endpoint.........................................................>
Match: <criteria.........................>
Channel: <ChannelId......................................> <State.....> <Time.....>
Exten: <DialedExten...........> CLCID: <ConnectedLineCID.......>
==========================================================================================
Endpoint: contact_endpoint Not in use 0 of inf
InAuth: contact_auth/contact
Aor: contact_aor 1
Contact: contact_aor/sip:contact@192.168.2.34:5060 13734030c8 NonQual nan
Transport: transport-udp udp 0 0 0.0.0.0:5060
Endpoint: jandrena_endpoint Not in use 0 of inf
InAuth: jandrena_auth/jandrena
Aor: jandrena_aor 1
Contact: jandrena_aor/sip:jandrena@192.168.2.34:506 75c417a6f8 NonQual nan
Transport: transport-udp udp 0 0 0.0.0.0:5060
Endpoint: vromain_endpoint Not in use 0 of inf
InAuth: vromain_auth/vromain
Aor: vromain_aor 1
Contact: vromain_aor/sip:vromain@192.168.2.34:5060 8004a1d667 NonQual nan
Transport: transport-udp udp 0 0 0.0.0.0:5060
Objects found: 3
obelix*CLI> pjsip show registrations
<Registration/ServerURI..............................> <Auth....................> <Status.......>
==========================================================================================
vromain_registration/sip:192.1255.255.251 vromain_endpoint Rejected (exp. 676s ago)
Objects found: 1
obelix*CLI> pjsip show aors
Aor: <Aor..............................................> <MaxContact>
Contact: <Aor/ContactUri............................> <Hash....> <Status> <RTT(ms)..>
==========================================================================================
Aor: contact_aor 1
Contact: contact_aor/sip:contact@192.168.2.34:5060 13734030c8 NonQual nan
Aor: jandrena_aor 1
Contact: jandrena_aor/sip:jandrena@192.168.2.34:5060 75c417a6f8 NonQual nan
Aor: vromain_aor 1
Contact: vromain_aor/sip:vromain@192.168.2.34:5060 8004a1d667 NonQual nan
Objects found: 3
obelix*CLI> pjsip show auths
I/OAuth: <AuthId/UserName.............................................................>
==========================================================================================
Auth: contact_auth/contact
Auth: jandrena_auth/jandrena
Auth: vromain_auth/vromain
Objects found: 3
I don’t understand why asterisk cannot find any of the aor configured for my endpoints ?
I’m not setting it for external call yet.
Can somebody explain me and help me to configure it the right way please ?
PS : My English is not so good so please be comprehensive and forgive my mistakes
Cordially,