I need help reading sip debug

I have a hosted system and some of the telephones can’t dial-out.
the extension will take calls. tried with and without firewall enabled. service iptables stop

On the sip debug I’m getting an Unauthorized message and need some help figuring it out. I hope this is a clue to my issues. Any help is appreciated and I thank you for just looking at my post.

I think this started when I upgraded from 10.13.66-10 to current version 10.13.66-12
Port 5061 is the port for chansip
pjsip is disabled.

<------------->
— (18 headers 0 lines) —
Sending to XXX.XXX.216.12:58856 (NAT)
Creating new subscription
Sending to XXX.XXX.216.12:58856 (NAT)
sip_route_dump: route/path hop: sip:[email protected]:58856;transport=udp
Found peer ‘5101’ for ‘5101’ from XXX.XXX.216.12:58856

<— Transmitting (NAT) to XXX.XXX.216.12:58856 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 10.47.21.227;branch=z9hG4bK16252697cf10cefe5;received=XXX.XXX.216.12;rport=58856
From: “5101” sip:[email protected]:5061;tag=d689fa10fd
To: sip:[email protected]:5061;tag=as108a7650
Call-ID: c81dbd1b8347f810
CSeq: 860108226 SUBSCRIBE
Server: FPBX-13.0.120(13.9.1)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
WWW-Authenticate: Digest algorithm=MD5, realm=“asterisk”, nonce="160644fa"
Content-Length: 0

So this looks like the authentication header.

But here, you don’t have anything in the “To” header. I’d guess that there’s something amiss in your phone configuration.

If you have access to the /var/log/asterisk/full log, the log information there would help us a lot more. The SIP Debug is good, but it doesn’t tell us what the server is doing - it’s just showing us the results of that process.