TLS transport question

pjsip log of call from itsp:


PJSIP Logging enabled
<--- Received SIP request (1501 bytes) from TLS:54.172.60.3:43780 --->
INVITE sip:+14155551212@x.x.x.109;edge=us1;transport=tls SIP/2.0
Record-Route: <sip:54.172.60.3:5061;transport=tls;r2=on;lr>
Record-Route: <sip:54.172.60.3;r2=on;lr>
CSeq: 1 INVITE
From: <sip:hello@voice-example.pstn.twilio.com>;tag=33196707_c3356d0b_08c5a5a4-1aa2-4f17-8a50-def2dae27c87
To: <sip:+14155551212@x.x.x.109;edge=us1;transport=tls>
Max-Forwards: 63
X-OhSip-Sas-Id: 719f5bad-ab35-4729-ab73-5261a50ee1fb
X-OhSIP-Servlet: SipCallOut
X-OhSIP-Remote-Test-Id: sip-call-out_802
Diversion: <sip:+14155551212@twilio.com>;reason=unconditional
Call-ID: 1c65ea08c01acd32b4d7e91dac0a30f4@0.0.0.0
Via: SIP/2.0/TLS 54.172.60.3:5061;branch=z9hG4bKaeca.a86dd6428ca76818ad3a7b87ad7040bd.0
Via: SIP/2.0/UDP 172.25.13.87:5060;rport=5060;branch=z9hG4bK08c5a5a4-1aa2-4f17-8a50-def2dae27c87_c3356d0b_548-18446140832366326829
Contact: <sip:hello@172.25.13.87:5060;transport=udp>
Allow: INVITE,ACK,CANCEL,OPTIONS,BYE,REFER,NOTIFY
X-Twilio-AccountSid: AC4e4a4c6833fe0b62305c5fa8aa44b519
User-Agent: Twilio Gateway
Content-Type: application/sdp
X-Twilio-CallSid: CA0c0ca9e6d6bac81f7a0623c92db2815e
Content-Length: 362

v=0
o=root 597706680 597706680 IN IP4 172.18.159.207
s=Twilio Media Gateway
c=IN IP4 34.203.251.191
t=0 0
m=audio 19484 RTP/SAVP 0 8 101
a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:Ll7rnINkn+cgwwx2ek1Fsah8Knd//udj9AkbEotg
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:20
a=sendrecv

[Aug 31 19:30:52] NOTICE[5167]: res_pjsip/pjsip_distributor.c:676 log_failed_request: Request 'INVITE' from '<sip:hello@voice-example.pstn.twilio.com>' failed for '54.172.60.3:43780' (callid: 1c65ea08c01acd32b4d7e91dac0a30f4@0.0.0.0) - No matching endpoint found
<--- Transmitting SIP response (873 bytes) to TLS:54.172.60.3:43780 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/TLS 54.172.60.3:5061;rport=43780;received=54.172.60.3;branch=z9hG4bKaeca.a86dd6428ca76818ad3a7b87ad7040bd.0
Via: SIP/2.0/UDP 172.25.13.87:5060;rport=5060;branch=z9hG4bK08c5a5a4-1aa2-4f17-8a50-def2dae27c87_c3356d0b_548-18446140832366326829
Record-Route: <sip:54.172.60.3:5061;transport=tls;lr;r2=on>
Record-Route: <sip:54.172.60.3;lr;r2=on>
Call-ID: 1c65ea08c01acd32b4d7e91dac0a30f4@0.0.0.0
From: <sip:hello@voice-example.pstn.twilio.com>;tag=33196707_c3356d0b_08c5a5a4-1aa2-4f17-8a50-def2dae27c87
To: <sip:+14155551212@x.x.x.109;edge=us1>;tag=z9hG4bKaeca.a86dd6428ca76818ad3a7b87ad7040bd.0
CSeq: 1 INVITE
WWW-Authenticate: Digest realm="asterisk",nonce="1693524652/cfba32ff8747ee5f65cf6765b9e41f59",opaque="3f345c585add65fe",algorithm=MD5,qop="auth"
Server: Asterisk PBX 16.28.0~dfsg-0+deb11u3
Content-Length:  0


<--- Received SIP request (470 bytes) from TLS:54.172.60.3:43780 --->
ACK sip:+14155551212@x.x.x.109;edge=us1;transport=tls SIP/2.0
CSeq: 1 ACK
From: <sip:hello@voice-example.pstn.twilio.com>;tag=33196707_c3356d0b_08c5a5a4-1aa2-4f17-8a50-def2dae27c87
To: <sip:+14155551212@x.x.x.109;edge=us1>;tag=z9hG4bKaeca.a86dd6428ca76818ad3a7b87ad7040bd.0
Max-Forwards: 63
Call-ID: 1c65ea08c01acd32b4d7e91dac0a30f4@0.0.0.0
Via: SIP/2.0/TLS 54.172.60.3:5061;branch=z9hG4bKaeca.a86dd6428ca76818ad3a7b87ad7040bd.0
Content-Length: 0


<--- Transmitting SIP request (523 bytes) to TLS:54.172.60.3:5061 --->
OPTIONS sip:voice-example.pstn.ashburn.twilio.com:5061 SIP/2.0
Via: SIP/2.0/TLS x.x.x.109:5061;rport;branch=z9hG4bKPjf9ea7df4-3b12-434a-8467-35cf05b6488d;alias
From: <sip:twilio-na-us@192.168.50.24>;tag=c87cc16b-1891-44d3-a7f2-75db1f5ffd9c
To: <sip:voice-example.pstn.ashburn.twilio.com>
Contact: <sip:twilio-na-us@x.x.x.109:5061;transport=TLS>
Call-ID: 514c6427-a2bb-42b4-880b-8f385db5d70b
CSeq: 45994 OPTIONS
Max-Forwards: 70
User-Agent: Asterisk PBX 16.28.0~dfsg-0+deb11u3
Content-Length:  0


<--- Received SIP response (441 bytes) from TLS:54.172.60.3:5061 --->
SIP/2.0 200 OK
Via: SIP/2.0/TLS x.x.x.109:5061;rport=53563;branch=z9hG4bKPjf9ea7df4-3b12-434a-8467-35cf05b6488d;alias;received=x.x.x.109
From: <sip:twilio-na-us@192.168.50.24>;tag=c87cc16b-1891-44d3-a7f2-75db1f5ffd9c
To: <sip:voice-example.pstn.ashburn.twilio.com>;tag=eda7d35dc3bcd50d5f50b21ba87e2918.5f4b4cf6
Call-ID: 514c6427-a2bb-42b4-880b-8f385db5d70b
CSeq: 45994 OPTIONS
Server: Twilio Gateway
Content-Length: 0

Found a few other posts with the same issue, such as Example of a working pjsip.conf for Twilio with TLS/SRTP? - #4 by ajgnet and I still can’t figure out what I did wrong or need to add.