Good evening. Just playing around with the various config options as I get ready to deep dive into Asterisk after having not touched it in quite a few years… And, for context, this is not FPBX, this is a fresh Asterisk compile and install.
So, I’ve got PJSIP configured. Initially, I had it set to register as an extension off my company PBX. Had some issues with that but eventually got it working with some static config. I guess I had expected that when Asterisk registered, it would then auto update the AOR and CONTACT info. It did not, so although I had it registered, I coudln’t actually call into it. I ended up building an identity block and identifying the SIP server to associate the contact, and that worked fine until I then needed my second registration. Now, everything coming in was matching to the first registration.
So, I’ve been messing with it all night trying to decouple the server IP from the identity of the particular endpoint. I don’t know if there’s a parameter I need to set in a config file somewhere that tells PJSIP that it’s ok to trust a sender that you’ve registered with, but it’s definitely having trust issues. I’ve tried telling it to identify by username and auth_username, it still doesn’t marry up inbound calls to the registered channel (I even tried telling it to match the TO header, and even with a dead match, it’s not finding the match to that either.
What’s even stranger (to me), is that although it’s registered (via TCP, so NAT isn’t going to be an issue), the endpoints are listed as unavailable.
Here’s what should be the relevant parts of the config:
[nightring_01](nightring)
type=endpoint
aors=nightring_01
allow=ulaw,alaw
direct_media=no
rewrite_contact=yes
identify_by=auth_username,username
100rel=no
trust_id_inbound=yes
rtp_symmetric=yes
inband_progress=yes
media_use_received_transport=yes
[nightring_01]
type=aor
max_contacts=1
remove_existing=yes
qualify_frequency=60
qualify_timeout=3.0
contact=sip:6999@UE-Lab <----Really hoped this would be dynamic with the registration (or that I could tell it to do so)
[nightring_01](auth-nightring)
username=6999@UE-Lab
password=<REDACTED>
[auth-nightring](!)
type=auth
auth_type=userpass
[nightring_01](tcpv4)
type=registration
outbound_auth=nightring_01
client_uri=sip:6999@UE-Lab
contact_user=6999
endpoint=nightring_01
[tcpv4](!)
transport=transport-tcpv4
server_uri=sip:<REDACTED>:5060
outbound_proxy=sip:<REDACTED>:5060
retry_interval=60
line=yes
[transport-tcpv4]
type=transport
protocol=tcp
bind=0.0.0.0:5060
tcp_keepalive_enable=yes
tcp_keepalive_idle_time=60
tcp_keepalive_interval_time=60
tcp_keepalive_probe_count=5
Inbound call attempts flood the console with this:
[Mar 4 03:22:03] NOTICE[1641]: res_pjsip/pjsip_distributor.c:688 log_failed_request: Request 'INVITE' from '"Desk Phone" <sip:1002@UE-Lab>' failed for '<REDACTED>:5060' (callid: 20250304032203011128-b23b1709ac279b1a99e7bfbff6dce780) - No matching endpoint found
[Mar 4 03:22:03] NOTICE[1641]: res_pjsip/pjsip_distributor.c:688 log_failed_request: Request 'INVITE' from '"Desk Phone" <sip:1002@UE-Lab>' failed for '<REDACTED>:5060' (callid: 20250304032203011128-b23b1709ac279b1a99e7bfbff6dce780) - Failed to authenticate