I am having trouble with registering Yeastar TG100 to Asterisk

Hello,
Problem description.
I’ve configured asterisk pjsip, see below

[tg100]
type=endpoint
context=from-mobile
disallow=all
allow=ulaw,alaw
auth=tg100-auth
outbound_auth=tg100-auth
aors=tg100
force_rport = yes
rewrite_contact = yes
from_domain=192.168.5.150

[tg100-auth]
type=auth
auth_type=userpass
username=tg100
password=TG100Pass
realm=asterisk

[tg100]
type=aor
contact=sip:192.168.5.150:5060
qualify_frequency=60
max_contacts=10
remove_existing = yes

[tg100-identify]
type=identify
endpoint=tg100
match=192.168.0.0/16

on a TG side I’ve created SIP Trunk,


There is an output from pjsip set logger on

[May 14 13:09:08] VERBOSE[916305] res_pjsip_logger.c: <--- Received SIP request (633 bytes) from UDP:192.168.5.150:5060 --->
REGISTER sip:192.168.100.254 SIP/2.0
Via: SIP/2.0/UDP 192.168.5.150:5060;branch=z9hG4bK7bb51c63;rport
Max-Forwards: 70
From: <sip:tg100@192.168.100.254>;tag=as3270cf4e
To: <sip:tg100@192.168.100.254>
Call-ID: 016d760435b56cdf44d9271840d3cfca@0.0.0.0
CSeq: 138 REGISTER
User-Agent: TG100
Authorization: Digest username="tg100", realm="asterisk", algorithm=MD5, uri="sip:192.168.100.254", nonce="1747220928/af16864e485c9c4bd345c74f3e0fd07e", response="0508d4aed502f23bbd3f11fba6f40f16", opaque="55534dee1870ba0a", qop=auth, cnonce="5c2dce07", nc=00000002
Expires: 120
Contact: <sip:tg100@192.168.5.150>
Content-Length: 0


[May 14 13:09:08] NOTICE[1965861] res_pjsip/pjsip_distributor.c: Request 'REGISTER' from '<sip:tg100@192.168.100.254>' failed for '192.168.5.150:5060' (callid: 016d760435b56cdf44d9271840d3cfca@0.0.0.0) - Failed to authenticate
[May 14 13:09:08] VERBOSE[1965861] res_pjsip_logger.c: <--- Transmitting SIP response (516 bytes) to UDP:192.168.5.150:5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.5.150:5060;rport=5060;received=192.168.5.150;branch=z9hG4bK7bb51c63
Call-ID: 016d760435b56cdf44d9271840d3cfca@0.0.0.0
From: <sip:tg100@192.168.100.254>;tag=as3270cf4e
To: <sip:tg100@192.168.100.254>;tag=z9hG4bK7bb51c63
CSeq: 138 REGISTER
WWW-Authenticate: Digest realm="asterisk",nonce="1747220948/3ceb5afd1f0eb95355e1b579405dec31",opaque="2c3932e108337515",algorithm=md5,qop="auth"
Server: Asterisk PBX 18.10.0~dfsg+~cs6.10.40431411-2
Content-Length:  0


[May 14 13:09:08] VERBOSE[916305] res_pjsip_logger.c: <--- Received SIP request (633 bytes) from UDP:192.168.5.150:5060 --->
REGISTER sip:192.168.100.254 SIP/2.0
Via: SIP/2.0/UDP 192.168.5.150:5060;branch=z9hG4bK21eaac89;rport
Max-Forwards: 70
From: <sip:tg100@192.168.100.254>;tag=as58bb7223
To: <sip:tg100@192.168.100.254>
Call-ID: 016d760435b56cdf44d9271840d3cfca@0.0.0.0
CSeq: 139 REGISTER
User-Agent: TG100
Authorization: Digest username="tg100", realm="asterisk", algorithm=MD5, uri="sip:192.168.100.254", nonce="1747220948/3ceb5afd1f0eb95355e1b579405dec31", response="3fad13ad78b8490ab5f4378f7f3c89e3", opaque="2c3932e108337515", qop=auth, cnonce="2f24a32e", nc=00000001
Expires: 120
Contact: <sip:tg100@192.168.5.150>
Content-Length: 0


[May 14 13:09:08] NOTICE[1965861] res_pjsip/pjsip_distributor.c: Request 'REGISTER' from '<sip:tg100@192.168.100.254>' failed for '192.168.5.150:5060' (callid: 016d760435b56cdf44d9271840d3cfca@0.0.0.0) - Failed to authenticate
[May 14 13:09:08] VERBOSE[1965861] res_pjsip_logger.c: <--- Transmitting SIP response (516 bytes) to UDP:192.168.5.150:5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.5.150:5060;rport=5060;received=192.168.5.150;branch=z9hG4bK21eaac89
Call-ID: 016d760435b56cdf44d9271840d3cfca@0.0.0.0
From: <sip:tg100@192.168.100.254>;tag=as58bb7223
To: <sip:tg100@192.168.100.254>;tag=z9hG4bK21eaac89
CSeq: 139 REGISTER
WWW-Authenticate: Digest realm="asterisk",nonce="1747220948/3ceb5afd1f0eb95355e1b579405dec31",opaque="52985f797945b2bf",algorithm=md5,qop="auth"
Server: Asterisk PBX 18.10.0~dfsg+~cs6.10.40431411-2
Content-Length:  0


[May 14 13:09:08] VERBOSE[916305] res_pjsip_logger.c: <--- Received SIP request (633 bytes) from UDP:192.168.5.150:5060 --->
REGISTER sip:192.168.100.254 SIP/2.0
Via: SIP/2.0/UDP 192.168.5.150:5060;branch=z9hG4bK60d672fe;rport
Max-Forwards: 70
From: <sip:tg100@192.168.100.254>;tag=as4bc9eba2
To: <sip:tg100@192.168.100.254>
Call-ID: 016d760435b56cdf44d9271840d3cfca@0.0.0.0
CSeq: 140 REGISTER
User-Agent: TG100
Authorization: Digest username="tg100", realm="asterisk", algorithm=MD5, uri="sip:192.168.100.254", nonce="1747220948/3ceb5afd1f0eb95355e1b579405dec31", response="f7a67aedaa544003af8fbe44d7c4cc19", opaque="52985f797945b2bf", qop=auth, cnonce="69c6cc61", nc=00000002
Expires: 120
Contact: <sip:tg100@192.168.5.150>
Content-Length: 0


[May 14 13:09:08] NOTICE[1965861] res_pjsip/pjsip_distributor.c: Request 'REGISTER' from '<sip:tg100@192.168.100.254>' failed for '192.168.5.150:5060' (callid: 016d760435b56cdf44d9271840d3cfca@0.0.0.0) - Failed to authenticate
[May 14 13:09:08] VERBOSE[1965861] res_pjsip_logger.c: <--- Transmitting SIP response (516 bytes) to UDP:192.168.5.150:5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.5.150:5060;rport=5060;received=192.168.5.150;branch=z9hG4bK60d672fe
Call-ID: 016d760435b56cdf44d9271840d3cfca@0.0.0.0
From: <sip:tg100@192.168.100.254>;tag=as4bc9eba2
To: <sip:tg100@192.168.100.254>;tag=z9hG4bK60d672fe
CSeq: 140 REGISTER
WWW-Authenticate: Digest realm="asterisk",nonce="1747220948/3ceb5afd1f0eb95355e1b579405dec31",opaque="2c392efb58ff7d62",algorithm=md5,qop="auth"
Server: Asterisk PBX 18.10.0~dfsg+~cs6.10.40431411-2
Content-Length:  0


[May 14 13:09:08] VERBOSE[916305] res_pjsip_logger.c: <--- Received SIP request (633 bytes) from UDP:192.168.5.150:5060 --->
REGISTER sip:192.168.100.254 SIP/2.0
Via: SIP/2.0/UDP 192.168.5.150:5060;branch=z9hG4bK6087c49a;rport
Max-Forwards: 70
From: <sip:tg100@192.168.100.254>;tag=as79d3a623
To: <sip:tg100@192.168.100.254>
Call-ID: 016d760435b56cdf44d9271840d3cfca@0.0.0.0
CSeq: 141 REGISTER
User-Agent: TG100
Authorization: Digest username="tg100", realm="asterisk", algorithm=MD5, uri="sip:192.168.100.254", nonce="1747220948/3ceb5afd1f0eb95355e1b579405dec31", response="998de3fcbe371e77464296a9f607e958", opaque="2c392efb58ff7d62", qop=auth, cnonce="2969e033", nc=00000003
Expires: 120
Contact: <sip:tg100@192.168.5.150>
Content-Length: 0


[May 14 13:09:08] NOTICE[1965861] res_pjsip/pjsip_distributor.c: Request 'REGISTER' from '<sip:tg100@192.168.100.254>' failed for '192.168.5.150:5060' (callid: 016d760435b56cdf44d9271840d3cfca@0.0.0.0) - Failed to authenticate
[May 14 13:09:08] VERBOSE[1965861] res_pjsip_logger.c: <--- Transmitting SIP response (516 bytes) to UDP:192.168.5.150:5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.5.150:5060;rport=5060;received=192.168.5.150;branch=z9hG4bK6087c49a
Call-ID: 016d760435b56cdf44d9271840d3cfca@0.0.0.0
From: <sip:tg100@192.168.100.254>;tag=as79d3a623
To: <sip:tg100@192.168.100.254>;tag=z9hG4bK6087c49a
CSeq: 141 REGISTER
WWW-Authenticate: Digest realm="asterisk",nonce="1747220948/3ceb5afd1f0eb95355e1b579405dec31",opaque="277734fc6ec142e6",algorithm=md5,qop="auth"
Server: Asterisk PBX 18.10.0~dfsg+~cs6.10.40431411-2
Content-Length:  0


[May 14 13:09:10] VERBOSE[916305] res_pjsip_logger.c: <--- Received SIP request (366 bytes) from UDP:192.168.5.150:5060 --->
REGISTER sip:192.168.100.254 SIP/2.0
Via: SIP/2.0/UDP 192.168.5.150:5060;branch=z9hG4bK1670eaf8;rport
Max-Forwards: 70
From: <sip:tg100@192.168.100.254>;tag=as599d7aa7
To: <sip:tg100@192.168.100.254>
Call-ID: 7dec7516588fe2a570d121cd7969b84b@0.0.0.0
CSeq: 102 REGISTER
User-Agent: TG100
Expires: 120
Contact: <sip:tg100@192.168.5.150>
Content-Length: 0


[May 14 13:09:10] VERBOSE[1965861] res_pjsip_logger.c: <--- Transmitting SIP response (516 bytes) to UDP:192.168.5.150:5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.5.150:5060;rport=5060;received=192.168.5.150;branch=z9hG4bK1670eaf8
Call-ID: 7dec7516588fe2a570d121cd7969b84b@0.0.0.0
From: <sip:tg100@192.168.100.254>;tag=as599d7aa7
To: <sip:tg100@192.168.100.254>;tag=z9hG4bK1670eaf8
CSeq: 102 REGISTER
WWW-Authenticate: Digest realm="asterisk",nonce="1747220950/d01b890ca027c8ed3380c4e66b0866ed",opaque="0b8fc6f57437e1ef",algorithm=md5,qop="auth"
Server: Asterisk PBX 18.10.0~dfsg+~cs6.10.40431411-2
Content-Length:  0


[May 14 13:09:10] VERBOSE[916305] res_pjsip_logger.c: <--- Received SIP request (633 bytes) from UDP:192.168.5.150:5060 --->
REGISTER sip:192.168.100.254 SIP/2.0
Via: SIP/2.0/UDP 192.168.5.150:5060;branch=z9hG4bK611dada5;rport
Max-Forwards: 70
From: <sip:tg100@192.168.100.254>;tag=as2f4502f2
To: <sip:tg100@192.168.100.254>
Call-ID: 7dec7516588fe2a570d121cd7969b84b@0.0.0.0
CSeq: 103 REGISTER
User-Agent: TG100
Authorization: Digest username="tg100", realm="asterisk", algorithm=MD5, uri="sip:192.168.100.254", nonce="1747220950/d01b890ca027c8ed3380c4e66b0866ed", response="8e4906314fe1c07ae9ca19ffe0fb6ce9", opaque="0b8fc6f57437e1ef", qop=auth, cnonce="08d4e233", nc=00000001
Expires: 120
Contact: <sip:tg100@192.168.5.150>
Content-Length: 0


[May 14 13:09:10] NOTICE[1965861] res_pjsip/pjsip_distributor.c: Request 'REGISTER' from '<sip:tg100@192.168.100.254>' failed for '192.168.5.150:5060' (callid: 7dec7516588fe2a570d121cd7969b84b@0.0.0.0) - Failed to authenticate
[May 14 13:09:10] VERBOSE[1965861] res_pjsip_logger.c: <--- Transmitting SIP response (516 bytes) to UDP:192.168.5.150:5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.5.150:5060;rport=5060;received=192.168.5.150;branch=z9hG4bK611dada5
Call-ID: 7dec7516588fe2a570d121cd7969b84b@0.0.0.0
From: <sip:tg100@192.168.100.254>;tag=as2f4502f2
To: <sip:tg100@192.168.100.254>;tag=z9hG4bK611dada5
CSeq: 103 REGISTER
WWW-Authenticate: Digest realm="asterisk",nonce="1747220950/d01b890ca027c8ed3380c4e66b0866ed",opaque="0e4f47ca11d6e7e6",algorithm=md5,qop="auth"
Server: Asterisk PBX 18.10.0~dfsg+~cs6.10.40431411-2
Content-Length:  0


[May 14 13:09:10] VERBOSE[916305] res_pjsip_logger.c: <--- Received SIP request (633 bytes) from UDP:192.168.5.150:5060 --->
REGISTER sip:192.168.100.254 SIP/2.0
Via: SIP/2.0/UDP 192.168.5.150:5060;branch=z9hG4bK533363bb;rport
Max-Forwards: 70
From: <sip:tg100@192.168.100.254>;tag=as5ac2784c
To: <sip:tg100@192.168.100.254>
Call-ID: 7dec7516588fe2a570d121cd7969b84b@0.0.0.0
CSeq: 104 REGISTER
User-Agent: TG100
Authorization: Digest username="tg100", realm="asterisk", algorithm=MD5, uri="sip:192.168.100.254", nonce="1747220950/d01b890ca027c8ed3380c4e66b0866ed", response="2337617e6d2a4e3ff262c329492b3239", opaque="0e4f47ca11d6e7e6", qop=auth, cnonce="02ee9593", nc=00000002
Expires: 120
Contact: <sip:tg100@192.168.5.150>
Content-Length: 0


[May 14 13:09:10] NOTICE[1965861] res_pjsip/pjsip_distributor.c: Request 'REGISTER' from '<sip:tg100@192.168.100.254>' failed for '192.168.5.150:5060' (callid: 7dec7516588fe2a570d121cd7969b84b@0.0.0.0) - Failed to authenticate
[May 14 13:09:10] VERBOSE[1965861] res_pjsip_logger.c: <--- Transmitting SIP response (516 bytes) to UDP:192.168.5.150:5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.5.150:5060;rport=5060;received=192.168.5.150;branch=z9hG4bK533363bb
Call-ID: 7dec7516588fe2a570d121cd7969b84b@0.0.0.0
From: <sip:tg100@192.168.100.254>;tag=as5ac2784c
To: <sip:tg100@192.168.100.254>;tag=z9hG4bK533363bb
CSeq: 104 REGISTER
WWW-Authenticate: Digest realm="asterisk",nonce="1747220950/d01b890ca027c8ed3380c4e66b0866ed",opaque="4a86973a08baa4a1",algorithm=md5,qop="auth"
Server: Asterisk PBX 18.10.0~dfsg+~cs6.10.40431411-2
Content-Length:  0


[May 14 13:09:10] VERBOSE[916305] res_pjsip_logger.c: <--- Received SIP request (633 bytes) from UDP:192.168.5.150:5060 --->
REGISTER sip:192.168.100.254 SIP/2.0
Via: SIP/2.0/UDP 192.168.5.150:5060;branch=z9hG4bK475d49d1;rport
Max-Forwards: 70
From: <sip:tg100@192.168.100.254>;tag=as40f514db
To: <sip:tg100@192.168.100.254>
Call-ID: 7dec7516588fe2a570d121cd7969b84b@0.0.0.0
CSeq: 105 REGISTER
User-Agent: TG100
Authorization: Digest username="tg100", realm="asterisk", algorithm=MD5, uri="sip:192.168.100.254", nonce="1747220950/d01b890ca027c8ed3380c4e66b0866ed", response="1379eb653e39396638715bc1f8df950d", opaque="4a86973a08baa4a1", qop=auth, cnonce="1e8e0096", nc=00000003
Expires: 120
Contact: <sip:tg100@192.168.5.150>
Content-Length: 0


[May 14 13:09:10] NOTICE[1965861] res_pjsip/pjsip_distributor.c: Request 'REGISTER' from '<sip:tg100@192.168.100.254>' failed for '192.168.5.150:5060' (callid: 7dec7516588fe2a570d121cd7969b84b@0.0.0.0) - Failed to authenticate
[May 14 13:09:10] VERBOSE[1965861] res_pjsip_logger.c: <--- Transmitting SIP response (516 bytes) to UDP:192.168.5.150:5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.5.150:5060;rport=5060;received=192.168.5.150;branch=z9hG4bK475d49d1
Call-ID: 7dec7516588fe2a570d121cd7969b84b@0.0.0.0
From: <sip:tg100@192.168.100.254>;tag=as40f514db
To: <sip:tg100@192.168.100.254>;tag=z9hG4bK475d49d1
CSeq: 105 REGISTER
WWW-Authenticate: Digest realm="asterisk",nonce="1747220950/d01b890ca027c8ed3380c4e66b0866ed",opaque="6c9a208643cafaea",algorithm=md5,qop="auth"
Server: Asterisk PBX 18.10.0~dfsg+~cs6.10.40431411-2
Content-Length:  0


[May 14 13:09:10] VERBOSE[916305] res_pjsip_logger.c: <--- Received SIP request (501 bytes) from UDP:192.168.5.150:5060 --->
OPTIONS sip:192.168.100.254 SIP/2.0
Via: SIP/2.0/UDP 192.168.5.150:5060;branch=z9hG4bK4b2bf808;rport
Max-Forwards: 70
From: "Unknown" <sip:Unknown@192.168.5.150>;tag=as1a10c229
To: <sip:192.168.100.254>
Contact: <sip:Unknown@192.168.5.150>
Call-ID: 6fbc31275c5ea4be76acaf5c776ab4d2@192.168.5.150
CSeq: 102 OPTIONS
User-Agent: TG100
Date: Wed, 14 May 2025 21:09:33 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Length: 0


[May 14 13:09:10] VERBOSE[1965861] res_pjsip_logger.c: <--- Transmitting SIP response (525 bytes) to UDP:192.168.5.150:5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.5.150:5060;rport=5060;received=192.168.5.150;branch=z9hG4bK4b2bf808
Call-ID: 6fbc31275c5ea4be76acaf5c776ab4d2@192.168.5.150
From: "Unknown" <sip:Unknown@192.168.5.150>;tag=as1a10c229
To: <sip:192.168.100.254>;tag=z9hG4bK4b2bf808
CSeq: 102 OPTIONS
WWW-Authenticate: Digest realm="asterisk",nonce="1747220950/d01b890ca027c8ed3380c4e66b0866ed",opaque="79a53ac35356b43d",algorithm=md5,qop="auth"
Server: Asterisk PBX 18.10.0~dfsg+~cs6.10.40431411-2
Content-Length:  0

part with invite

[May 14 13:13:50] VERBOSE[916305] res_pjsip_logger.c: <--- Received SIP request (847 bytes) from UDP:192.168.5.150:5060 --->
INVITE sip:1002@192.168.100.254:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.5.150:5060;branch=z9hG4bK76f2db7b;rport
Max-Forwards: 70
From: "123456789" <sip:123456789@192.168.100.254>;tag=as295d0ccc
To: <sip:1002@192.168.100.254:5060>
Contact: <sip:123456789@192.168.5.150>
Call-ID: 25760a1e43c44e7f5bba6abb5e5dc062@192.168.100.254
CSeq: 102 INVITE
User-Agent: TG100
Date: Wed, 14 May 2025 21:14:13 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 285

v=0
o=root 1571666899 1571666899 IN IP4 192.168.5.150
s=Asterisk PBX 1.6.2.6
c=IN IP4 192.168.5.150
t=0 0
m=audio 11552 RTP/AVP 0 8 3 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv

[May 14 13:13:50] VERBOSE[1965861] res_pjsip_logger.c: <--- Transmitting SIP response (537 bytes) to UDP:192.168.5.150:5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.5.150:5060;rport=5060;received=192.168.5.150;branch=z9hG4bK76f2db7b
Call-ID: 25760a1e43c44e7f5bba6abb5e5dc062@192.168.100.254
From: "123456789" <sip:123456789@192.168.100.254>;tag=as295d0ccc
To: <sip:1002@192.168.100.254>;tag=z9hG4bK76f2db7b
CSeq: 102 INVITE
WWW-Authenticate: Digest realm="asterisk",nonce="1747221230/8a7856bba090bf75d2fac93796226305",opaque="1009356c50905b37",algorithm=md5,qop="auth"
Server: Asterisk PBX 18.10.0~dfsg+~cs6.10.40431411-2
Content-Length:  0


[May 14 13:13:50] VERBOSE[916305] res_pjsip_logger.c: <--- Received SIP request (404 bytes) from UDP:192.168.5.150:5060 --->
ACK sip:1002@192.168.100.254:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.5.150:5060;branch=z9hG4bK76f2db7b;rport
Max-Forwards: 70
From: "123456789" <sip:123456789@192.168.100.254>;tag=as295d0ccc
To: <sip:1002@192.168.100.254:5060>;tag=z9hG4bK76f2db7b
Contact: <sip:123456789@192.168.5.150>
Call-ID: 25760a1e43c44e7f5bba6abb5e5dc062@192.168.100.254
CSeq: 102 ACK
User-Agent: TG100
Content-Length: 0


[May 14 13:13:50] VERBOSE[916305] res_pjsip_logger.c: <--- Received SIP request (1124 bytes) from UDP:192.168.5.150:5060 --->
INVITE sip:1002@192.168.100.254:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.5.150:5060;branch=z9hG4bK503da832;rport
Max-Forwards: 70
From: "123456789" <sip:123456789@192.168.100.254>;tag=as295d0ccc
To: <sip:1002@192.168.100.254:5060>
Contact: <sip:123456789@192.168.5.150>
Call-ID: 25760a1e43c44e7f5bba6abb5e5dc062@192.168.100.254
CSeq: 103 INVITE
User-Agent: TG100
Authorization: Digest username="tg100", realm="asterisk", algorithm=MD5, uri="sip:1002@192.168.100.254:5060", nonce="1747221230/8a7856bba090bf75d2fac93796226305", response="2ad178a3bb21f5ddbc4e8e4f0bd930a0", opaque="1009356c50905b37", qop=auth, cnonce="67d7536a", nc=00000001
Date: Wed, 14 May 2025 21:14:13 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 285

v=0
o=root 1571666899 1571666900 IN IP4 192.168.5.150
s=Asterisk PBX 1.6.2.6
c=IN IP4 192.168.5.150
t=0 0
m=audio 11552 RTP/AVP 0 8 3 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv

[May 14 13:13:50] NOTICE[1965861] res_pjsip/pjsip_distributor.c: Request 'INVITE' from '"123456789" <sip:123456789@192.168.100.254>' failed for '192.168.5.150:5060' (callid: 25760a1e43c44e7f5bba6abb5e5dc062@192.168.100.254) - Failed to authenticate
[May 14 13:13:50] VERBOSE[1965861] res_pjsip_logger.c: <--- Transmitting SIP response (537 bytes) to UDP:192.168.5.150:5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.5.150:5060;rport=5060;received=192.168.5.150;branch=z9hG4bK503da832
Call-ID: 25760a1e43c44e7f5bba6abb5e5dc062@192.168.100.254
From: "123456789" <sip:123456789@192.168.100.254>;tag=as295d0ccc
To: <sip:1002@192.168.100.254>;tag=z9hG4bK503da832
CSeq: 103 INVITE
WWW-Authenticate: Digest realm="asterisk",nonce="1747221230/8a7856bba090bf75d2fac93796226305",opaque="7f4a55ea09cb335a",algorithm=md5,qop="auth"
Server: Asterisk PBX 18.10.0~dfsg+~cs6.10.40431411-2
Content-Length:  0


[May 14 13:13:50] VERBOSE[916305] res_pjsip_logger.c: <--- Received SIP request (404 bytes) from UDP:192.168.5.150:5060 --->
ACK sip:1002@192.168.100.254:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.5.150:5060;branch=z9hG4bK503da832;rport
Max-Forwards: 70
From: "123456789" <sip:123456789@192.168.100.254>;tag=as295d0ccc
To: <sip:1002@192.168.100.254:5060>;tag=z9hG4bK503da832
Contact: <sip:123456789@192.168.5.150>
Call-ID: 25760a1e43c44e7f5bba6abb5e5dc062@192.168.100.254
CSeq: 103 ACK
User-Agent: TG100
Content-Length: 0


[May 14 13:13:50] VERBOSE[916305] res_pjsip_logger.c: <--- Received SIP request (1124 bytes) from UDP:192.168.5.150:5060 --->
INVITE sip:1002@192.168.100.254:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.5.150:5060;branch=z9hG4bK166375f2;rport
Max-Forwards: 70
From: "123456789" <sip:123456789@192.168.100.254>;tag=as295d0ccc
To: <sip:1002@192.168.100.254:5060>
Contact: <sip:123456789@192.168.5.150>
Call-ID: 25760a1e43c44e7f5bba6abb5e5dc062@192.168.100.254
CSeq: 104 INVITE
User-Agent: TG100
Authorization: Digest username="tg100", realm="asterisk", algorithm=MD5, uri="sip:1002@192.168.100.254:5060", nonce="1747221230/8a7856bba090bf75d2fac93796226305", response="19907186532a22fb45e7b52bdf2073a2", opaque="7f4a55ea09cb335a", qop=auth, cnonce="5ce3b36b", nc=00000002
Date: Wed, 14 May 2025 21:14:13 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 285

v=0
o=root 1571666899 1571666901 IN IP4 192.168.5.150
s=Asterisk PBX 1.6.2.6
c=IN IP4 192.168.5.150
t=0 0
m=audio 11552 RTP/AVP 0 8 3 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv

[May 14 13:13:50] NOTICE[1965861] res_pjsip/pjsip_distributor.c: Request 'INVITE' from '"123456789" <sip:123456789@192.168.100.254>' failed for '192.168.5.150:5060' (callid: 25760a1e43c44e7f5bba6abb5e5dc062@192.168.100.254) - Failed to authenticate
[May 14 13:13:50] VERBOSE[1965861] res_pjsip_logger.c: <--- Transmitting SIP response (537 bytes) to UDP:192.168.5.150:5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.5.150:5060;rport=5060;received=192.168.5.150;branch=z9hG4bK166375f2
Call-ID: 25760a1e43c44e7f5bba6abb5e5dc062@192.168.100.254
From: "123456789" <sip:123456789@192.168.100.254>;tag=as295d0ccc
To: <sip:1002@192.168.100.254>;tag=z9hG4bK166375f2
CSeq: 104 INVITE
WWW-Authenticate: Digest realm="asterisk",nonce="1747221230/8a7856bba090bf75d2fac93796226305",opaque="4977cd6157f0823f",algorithm=md5,qop="auth"
Server: Asterisk PBX 18.10.0~dfsg+~cs6.10.40431411-2
Content-Length:  0


[May 14 13:13:50] VERBOSE[916305] res_pjsip_logger.c: <--- Received SIP request (404 bytes) from UDP:192.168.5.150:5060 --->
ACK sip:1002@192.168.100.254:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.5.150:5060;branch=z9hG4bK166375f2;rport
Max-Forwards: 70
From: "123456789" <sip:123456789@192.168.100.254>;tag=as295d0ccc
To: <sip:1002@192.168.100.254:5060>;tag=z9hG4bK166375f2
Contact: <sip:123456789@192.168.5.150>
Call-ID: 25760a1e43c44e7f5bba6abb5e5dc062@192.168.100.254
CSeq: 104 ACK
User-Agent: TG100
Content-Length: 0


[May 14 13:13:50] VERBOSE[916305] res_pjsip_logger.c: <--- Received SIP request (1124 bytes) from UDP:192.168.5.150:5060 --->
INVITE sip:1002@192.168.100.254:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.5.150:5060;branch=z9hG4bK5667f7ea;rport
Max-Forwards: 70
From: "123456789" <sip:123456789@192.168.100.254>;tag=as295d0ccc
To: <sip:1002@192.168.100.254:5060>
Contact: <sip:123456789@192.168.5.150>
Call-ID: 25760a1e43c44e7f5bba6abb5e5dc062@192.168.100.254
CSeq: 105 INVITE
User-Agent: TG100
Authorization: Digest username="tg100", realm="asterisk", algorithm=MD5, uri="sip:1002@192.168.100.254:5060", nonce="1747221230/8a7856bba090bf75d2fac93796226305", response="b66899426b9510a591aa6bc9fe057900", opaque="4977cd6157f0823f", qop=auth, cnonce="0f47ed5e", nc=00000003
Date: Wed, 14 May 2025 21:14:13 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 285

v=0
o=root 1571666899 1571666902 IN IP4 192.168.5.150
s=Asterisk PBX 1.6.2.6
c=IN IP4 192.168.5.150
t=0 0
m=audio 11552 RTP/AVP 0 8 3 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv

[May 14 13:13:50] NOTICE[1965861] res_pjsip/pjsip_distributor.c: Request 'INVITE' from '"123456789" <sip:123456789@192.168.100.254>' failed for '192.168.5.150:5060' (callid: 25760a1e43c44e7f5bba6abb5e5dc062@192.168.100.254) - Failed to authenticate
[May 14 13:13:50] VERBOSE[1965861] res_pjsip_logger.c: <--- Transmitting SIP response (537 bytes) to UDP:192.168.5.150:5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.5.150:5060;rport=5060;received=192.168.5.150;branch=z9hG4bK5667f7ea
Call-ID: 25760a1e43c44e7f5bba6abb5e5dc062@192.168.100.254
From: "123456789" <sip:123456789@192.168.100.254>;tag=as295d0ccc
To: <sip:1002@192.168.100.254>;tag=z9hG4bK5667f7ea
CSeq: 105 INVITE
WWW-Authenticate: Digest realm="asterisk",nonce="1747221230/8a7856bba090bf75d2fac93796226305",opaque="4926424c22882c42",algorithm=md5,qop="auth"
Server: Asterisk PBX 18.10.0~dfsg+~cs6.10.40431411-2
Content-Length:  0


[May 14 13:13:50] VERBOSE[916305] res_pjsip_logger.c: <--- Received SIP request (404 bytes) from UDP:192.168.5.150:5060 --->
ACK sip:1002@192.168.100.254:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.5.150:5060;branch=z9hG4bK5667f7ea;rport
Max-Forwards: 70
From: "123456789" <sip:123456789@192.168.100.254>;tag=as295d0ccc
To: <sip:1002@192.168.100.254:5060>;tag=z9hG4bK5667f7ea
Contact: <sip:123456789@192.168.5.150>
Call-ID: 25760a1e43c44e7f5bba6abb5e5dc062@192.168.100.254
CSeq: 105 ACK
User-Agent: TG100
Content-Length: 0


[May 14 13:14:00] VERBOSE[916305] res_pjsip_logger.c: <--- Received SIP request (633 bytes) from UDP:192.168.5.150:5060 --->
REGISTER sip:192.168.100.254 SIP/2.0
Via: SIP/2.0/UDP 192.168.5.150:5060;branch=z9hG4bK64c893dc;rport
Max-Forwards: 70
From: <sip:tg100@192.168.100.254>;tag=as4cac2c79
To: <sip:tg100@192.168.100.254>
Call-ID: 7dec7516588fe2a570d121cd7969b84b@0.0.0.0
CSeq: 162 REGISTER
User-Agent: TG100
Authorization: Digest username="tg100", realm="asterisk", algorithm=MD5, uri="sip:192.168.100.254", nonce="1747221220/eeb113acb79786567a94ff2d81b14802", response="8f11db6f7ad12a03c56c0cc9fda6f010", opaque="77d8c1a349883989", qop=auth, cnonce="1c7e55ef", nc=00000002
Expires: 120
Contact: <sip:tg100@192.168.5.150>
Content-Length: 0

Similar configuration for interconnection between asterisks works fine.

log from TG100.

[2025-05-14 23:20:43] NOTICE[1308] chan_sip.c:    -- Registration for 'tg100@192.168.100.254@192.168.100.254' timed out, trying again (Attempt #4)
[2025-05-14 23:20:43] NOTICE[1308] chan_sip.c: Failed to authenticate on REGISTER to 'tg100@192.168.100.254@192.168.100.254' (Tries 3)
[2025-05-14 23:21:03] NOTICE[1308] chan_sip.c:    -- Registration for 'tg100@192.168.100.254@192.168.100.254' timed out, trying again (Attempt #8)
[2025-05-14 23:21:03] NOTICE[1308] chan_sip.c: Failed to authenticate on REGISTER to 'tg100@192.168.100.254@192.168.100.254' (Tries 3)
[2025-05-14 23:21:23] NOTICE[1308] chan_sip.c:    -- Registration for 'tg100@192.168.100.254@192.168.100.254' timed out, trying again (Attempt #12)
[2025-05-14 23:21:23] NOTICE[1308] chan_sip.c: Failed to authenticate on REGISTER to 'tg100@192.168.100.254@192.168.100.254' (Tries 3)
[2025-05-14 23:21:43] NOTICE[1308] chan_sip.c:    -- Registration for 'tg100@192.168.100.254@192.168.100.254' timed out, trying again (Attempt #16)

Regards,
Andy

Update
So, I’ve also tried to remove or change from domain to (see below), but, unfortunately, the tg100 didn’t register at all.

from_domain=192.168.100.254

Regards,
Andy

Don’t specify a realm.

Why are you registering if you have the IP address statically configured?

Have you confirmed in Asterisk that your configuration has been loaded as expected? (pjsip show endpoints for example)

Be aware that if you expose this to the internet that Asterisk 18 is no longer supported and receives no fixes - security or bug fix.

@jcolp Thanks for the response.

Removed, but didn’t changed.

The registration come from TG100. It’s impossible to change. So, I’ve removed contact from AOR and reloaded configuration. The problem still exists.

However, I had not found, how to disable REGISTER on a TG100 side. Maybe a I’m doing something wrong.

The TG100 allow to configure service provider trunk. without any authentication. At the moment, I’m going to config configure that kind of trunk.

pjsip show endpoints (with contact)

 Endpoint:  tg100                                                Not in use    0 of inf
    OutAuth:  tg100-auth/tg100
     InAuth:  tg100-auth/tg100
        Aor:  tg100                                             10
      Contact:  tg100/sip:192.168.5.150:5060               2733e9fdfd Avail         1.687
   Identify:  tg100-identify/tg100
        Match: 192.168.0.0/16

pjsip show endpoints (without contact)

 Endpoint:  tg100                                                Unavailable   0 of inf
    OutAuth:  tg100-auth/tg100
     InAuth:  tg100-auth/tg100
        Aor:  tg100                                             10
   Identify:  tg100-identify/tg100
        Match: 192.168.0.0/16

Yes. Completely agree. This is local sandbox system. I’m going to upgrade asterisk version after successfully configured TG100 trunk.
So, AFAIK, it is impossible to build the latest chan_sccp with the latest asterisk, and I depend on the chan_sccp.

Update.

Problem solved.
I’ve properly configured trunk. So I fixed incorrect registration.

@jcolp Thanks for led the key points in the configuration.

[offtopic]
Yeastar outbound calls configuration without two stage dial:
Inbound Caller Pattern: .
DID Number: .
[/offtopic]

Regards,
Andrei