Problem with asterisk

i have been having issues with my asterisk 23.3 installing on kali linux and i have installed everything and i have sip fully registered now at first i was having issues with installing the modules but when i am trying to install the soft phone to start initiating a test call i am having technical difficulties trying to register the soft phone this is the problem i am facing at the moment

REGISTER sip:192.158.1.101 SIP/2.0 Via: SIP/2.0/UDP 192.158.1.114:10320;rport;branch=z9hG4bK-5p8277033733250769560r From: sip:[email protected];tag=4g4150400649333317860m To: sip:[email protected] Call-ID: 2e8171647296301881951k41991rmwp CSeq: 13749 REGISTER Max-Forwards: 70 Contact: sip:[email protected]:10320 Expires: 90 Authorization: Digest username=“3000”,realm=“asterisk”,nonce=“1780986495/b6b6958346d82941d36df581f6958ab4”,uri=“sip:192.158.1.101”,response=“d730d352e03142a13363f164ad9b24b8”,opaque=“041538522a60d13c”,cnonce=“1987434186083278816”,nc=00000001,qop=auth,algorithm=MD5 User-Agent: MizuDroid/4.4.25060 Supported: replaces Allow: ACK,PRACK,BYE,CANCEL,INVITE,UPDATE,MESSAGE,INFO,OPTIONS,SUBSCRIBE,NOTIFY,REFER Allow-Events: presence,refer,telephone-event,keep-alive,dialog Accept: application/sdp,application/dtmf-relay,text/plain Content-Length: 0 jean*CLI> [Jun 8 19:26:32] WARNING[328310]: res_pjsip_registrar.c:1239 find_registrar_aor: AOR ‘’ not found f[Jun 9 02:29:27] NOTICE[358999]: res_pjsip/pjsip_distributor.c:688 log_failed_request: Request ‘REGISTER’ from ‘sip:[email protected]’ failed for ‘192.158.1.114:10320’ (callid: 2e8171647296301881951k41991rmwp) - Failed to authenticate jean*CLI> [Jun 8 19:26:32] WARNING[328310]: res_pjsip_registrar.c:1239 find_registrar_aor: AOR ‘’ not found f<— Transmitting SIP response (522 bytes) to UDP:192.158.1.114:10320 —> SIP/2.0 401 Unauthorized Via: SIP/2.0/UDP 192.158.1.114:10320;rport=10320;received=192.158.1.114;branch=z9hG4bK-5p8277033733250769560r Call-ID: 2e8171647296301881951k41991rmwp From: sip:[email protected];tag=4g4150400649333317860m To: sip:[email protected];tag=z9hG4bK-5p8277033733250769560r CSeq: 13749 REGISTER WWW-Authenticate: Digest realm=“asterisk”,nonce=“1780986567/57cedefbdca3db860ad9cdf33cd82199”,opaque=“7c603dbd02948654”,algorithm=MD5,qop=“auth” Server: Asterisk PBX 22.9.0 Content-Length: 0

i dont know why i keep getting these errors above

[global]
type=global

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

; =========================
; EXTENSION 3000 (PHONE)
; =========================

[3000]
type=endpoint
transport=transport-udp
context=from-internal
disallow=all
allow=ulaw,alaw,opus
auth=3000_auth
aors=aor_3000
dtmf_mode=rfc4733
rtp_symmetric=yes
force_rport=yes
rewrite_contact=yes
direct_media=no

[3000_auth]
type=auth
auth_type=userpass
username=3000
password=test

[aor_3000]
type=aor
max_contacts=1
remove_existing=yes

[4000]
type=endpoint
transport=transport-udp
context=from-internal
disallow=all
allow=ulaw,alaw
auth=4000_auth
aors=4000_aor
dtmf_mode=rfc4733
rtp_symmetric=yes
force_rport=yes
rewrite_contact=yes
direct_media=no

[4000_auth]
type=auth
auth_type=userpass
username=4000
password=test22617

[4000_aor]
type=aor
max_contacts=1
remove_existing=yes

[4000_identify]
type=identify
endpoint=4000
match=192.158.1.114/32

these are the pjsip settings aswell

i tried reloading dialplan , and pjsip

asterisk is lisening on udp 5060

pjsip show endpoint 3000 shows endpoint 3000 loaded.

pjsip show auth auth_3000 shows username 3000 and the expected password

pjsip show aor aor_3000 shows the aor exists

pjsip show transports shows transport-udp bound tp 0.0.0.0:5060

i tested multiple clients (portsip,mzudroid,linphone) client and the server are on the same local area network 192.158.1.x)

and aswell rewrite_contact=yes, force_report=yes, and rtp_symmetric= yes are enabled

the register reaches asterisk, but authentication always fails

register contains Autherization: Digest username=“3000”, realm=“asterisk”

Warning: find_registar_aor: AOR "not found for endpoint ‘3000’

which is confusing because endpoint 3000 exists auth auth_3000 exits and aor_3000 exists

pjsip show endpoint 3000 shows:

auth= auth_3000

aors= aors_3000

Has anyone seen asterisk 22 reject valid regist requests whilde also logging “AOR” not found for endpoint" ? WHat would be the next commands or debug steps to identify whether this is an auth issue, or pjsip configuration problem?

asterisk -rx “pjsip show endpoints 3000_auth”

asterisk -rx :

Please do not delete all the newlines from your SIP logs. This is not forum damage; the raw version is also lacking the newlines. It makes reading the logs very difficult.

You are asking to register the address of record sip:3000@domain, but don’t have such an AOR; the one you have would only match sip:aors_3000@domain.

Either the log is incomplete, or the phone does not have a password configured.

Also, why are you asking on the FreePBX forum. I don’t think FreePBX would make the first mistake, unless you provided a completely custom configuration.

Thanks for the reply. Just to clarify, the AOR is present and correctly defined (3000_aor), and the endpoint is also properly linked to it.

From the Asterisk logs, the REGISTER request reaches the server and receives a 401 challenge, and the client responds with a valid Digest Authorization header. However, Asterisk still rejects authentication with “Failed to authenticate”.

So the issue does not appear to be a missing AOR or registration URI mismatch, but rather a digest authentication validation failure inside Asterisk.

I’ve already verified:

Single Asterisk instance running
Endpoint, auth, and AOR are correctly linked
Password matches the SIP client
REGISTER + Digest flow is correct

At this point I am investigating PJSIP identity/auth resolution behavior (identify_by and runtime endpoint matching).

The AOR that is being registered to is in the REGISTER request itself, and that has to match the name of the AOR in the configuration. As @david55 stated - it doesn’t. Change the name of your AOR to 3000 in the configuration.

Your logs show your endpoint using “3000” as the AOR. The AOR in a REGISTER is the To header URI. Strictly speaking it is the complete URI, although Asterisk only looks at the user part.

Either you have the wrong AOR name in pjsip.conf, or you have the wrong name in the phone. Given the values used, I’d say it is almost certainly wrong in pjsip.conf.

The garbled formatting made it difficult to see that there was an Authorization header in the requst, and therefore the missing bit of the log is the beginning, not the end. Without the 401 challenge, I can’t check even the cleartext parts of the authentication.