Pjzip configuration is only allowing one extension to authenticate

I have an unusual situation here. I am using pjsip.conf any entry with an * is working as expected i.e. authentication, call routing etc. However I needed to add more extensions. I copied the configuration for [horace_cellphone] which works and then change the parameters for the new phone I wanted to add. Reloaded pjsip and the new extension(s) will not authenticate, I receive a 401 error. I have done this on tablet, desktop, and another cell phone. I have confirmed the correct username and passwords are being used. I have confirmed that the client response from the client matches the challenge by the server so authentication should be happening. However Asterisk is saying it can not locate the extension. I am absolutely stumped at this point. The extension show up in pjsip show endpoints, all traffic is utilizing the same infrastructure and configuration. They are all using the same client software but only the one cell phone [horace_cellphone] will authenticate. Is anyone else having this issue or know how to solve it? Oh my server is ast 16, client is Samsung s23 Ultra, amazon tablet running fire os 3.0 and is up to date. The tablet was authenticating when configure to use sip.conf, but I only want to use pjsip.conf for everything and it will not authenticate at all now.
*[general]
allowoverlap = no

;[omsip_user]
;transport = ws,wss

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Non mapped elements end
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
–;
*[transport-wss]
type=transport
protocol=wss
bind=0.0.0.0

[transport-udp]
type = transport
protocol = udp
bind = 0.0.0.0:5060
local_net=127.0.0.1
external_media_address=98.174.244.232
external_signaling_address=98.174.244.232

*[transport-tcp]
type = transport
protocol = tcp
bind = 0.0.0.0:5061

*[omsip_user]
type = aor
max_contacts = 1
maximum_expiration = 43200

*[omsip_user]
type = auth
username = omsip_user
password = password

*[omsip_user]
type = endpoint
context = rooms-omsip
allow = !all,ulaw,opus,vp8
force_rport = yes
rewrite_contact = yes
ice_support = yes
direct_media = no
use_avpf = yes
auth = omsip_user
outbound_auth = omsip_user
aors = omsip_user

*[voipms]
type = registration
transport = transport-udp
outbound_auth = voipms
client_uri = sip:123456@sanjose2.voip.ms:5060 ; (one of our multiple servers, you can choose the one closer to your location)
server_uri = sip:sanjose2.voip.ms:5060 ; (one of our multiple servers, you can choose the one closer to your location)

*[voipms]
type = auth
auth_type = userpass
username = 123456 ; (Replace with your 6 digit Main SIP Account User ID or Sub Account username, i.e. 123456 or 123456_sub)
password = password ; your password

*[voipms]
type = aor
contact = sip:123456@sanjose2.voip.ms ; (one of our multiple servers, you can choose the one closer to your location)

*[voipms]
type = endpoint
transport = transport-udp
context = mycontext
disallow = all
allow = ulaw
;allow=g722 ; uncomment if you support g729
from_user = 123456 ; (Replace with your 6 digit Main SIP Account User ID or Sub Account username, i.e. 123456 or 123456_sub)
auth = voipms
outbound_auth = voipms
aors = voipms
; NAT parameters:
rtp_symmetric = yes
rewrite_contact = yes
send_rpid = yes

*[voipms]
type = identify
endpoint = voipms
match = ######## ; (one of our multiple servers, you can choose the one closer to your location)

*[horace_cellphone]
type=identify
endpoint=horace_cellphone
match=98.174.244.227

*[horace_cellphone]
type=endpoint
transport=transport-udp
context=home-phones
disallow=all
force_rport = yes
allow=ulaw
auth=horace_cellphone_auth
aors=horace_cellphone_aor
; NAT parameters:
rtp_symmetric = yes
rewrite_contact = yes
send_rpid = yes

*[horace_cellphone_auth]
type=auth
auth_type=userpass
username=horace_cellphone
password=password

*[horace_cellphone_aor]
type=aor
max_contacts=5

[horace_tablet]
type=identify
endpoint=horace_tablet
match=98.174.244.227

[horace_tablet_aor]
type=aor
max_contacts=1

[horace-tablet]
type=endpoint
transport = transport-udp
context=home-phones
disallow=all
allow=ulaw
auth=horace_tablet_auth
aors=horace_tablet_aor
; NAT parameters:
rtp_symmetric = yes
rewrite_contact = yes
send_rpid = yes

[horace_tablet_auth]
type=auth
auth_type=userpass
username=horace-tablet
password=password

[horace-desktop]
type=endpoint
context=home-phones
transport=transport-udp
disallow=all
allow=ulaw
force_rport=yes
auth=horace-desktop-auth
aors=horace-desktop-aor

[horace-desktop-auth]
type=auth
auth_type=userpass
username=horace-desktop
password=password

[horace-desktop-aor]
type=aor
max_contacts=1

[denise_cellphone]
type=endpoint
transport=transport-udp
context=home-phones
disallow=all
allow=ulaw
auth=horace_cellphone_auth
aors=horace_cellphone_aor
; NAT parameters:
rewrite_contact = yes
send_rpid = yes

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

[denise_cellphone_aor]
type=aor
max_contacts=5

I forgot to add the phone is mizudroid vers version 0.4.4 and the tablet is using mizudroid 2.2, that is the latest that seems to load for each client.

You have two matches for the same IP address. Only one will work.

Ah ok thank you, I removed the identity section for each extension except the SIP trunk and everything is authenticating now. I misunderstood how the identity section is used. Thank you so much. I never would have looked at that because it was not giving me any indication it was an issue.

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