Asterisk pjsip mit Fritzbox

Hallo Support,

Ich bekomme die Verbindung zur Fritzbox nicht ganz ans laufen.
Ich kann von Telefonen an der Fritzbox ein softtelfon an der asterisk anrufen.
Aber der Anruf vom softtelfon an asterisk kommt nicht an dem Telefon an der Fritzbox an

Hier mal ein Auszug aus dem pjsip logg

<Registration/ServerURI…> <Auth…> <Status…>

fritzbox88/sip:asterisk@192.168.88.254:5060 fritzbox88_auth Unregistered (exp. 1s)

Objects found: 1

*CLI> pjsip set logger on
PJSIP Logging enabled
*CLI> [Jan 6 20:03:26] WARNING[18142]: asterisk.c:3488 canary_thread: The canary is no more. He has ceased to be! He’s expired and gone to meet his maker! He’s a stiff! Bereft of life, he rests in peace. His metabolic processes are now history! He’s off the twig! He’s kicked the bucket. He’s shuffled off his mortal coil, run down the curtain, and joined the bleeding choir invisible!! THIS is an EX-CANARY. (Reducing priority)
[Jan 6 20:03:26] WARNING[18142]: asterisk.c:1819 set_priority_all: Unable to set regular thread priority on main thread
<— Received SIP request (1253 bytes) from UDP:192.168.89.84:52314 —>
INVITE sip:11@192.168.90.254;transport=udp SIP/2.0
Via: SIP/2.0/UDP 192.168.89.84:52314;rport;branch=z9hG4bKPjD15E9203-45B8-4FB5-AE1C-DC27DB4096B5
Max-Forwards: 70
From: sip:6001@192.168.90.254;tag=D9563820-0ABA-4819-9AB0-0AA876444EE5
To: sip:11@192.168.90.254
Contact: sip:6001@192.168.89.84:52314;ob
Call-ID: 30DF6F0E-ED41-4DBC-B1DC-BA06ECB5C71C
CSeq: 6839 INVITE
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Supported: replaces, 100rel, timer, norefersub
Session-Expires: 1800
Min-SE: 90
User-Agent: ESIP-NG/MacBook-Air-von-Frank.fritz.box/1.0.9
Content-Type: application/sdp
Content-Length: 581

v=0
o=- 3945182695 3945182695 IN IP6 2a00:6020:47a7:1800:1c29:1200:c2e9:c01
s=pjmedia
b=AS:117
t=0 0
a=X-nat:0
m=audio 4004 RTP/AVP 96 9 8 0 18 120 121
c=IN IP6 2a00:6020:47a7:1800:1c29:1200:c2e9:c01
b=TIAS:96000
a=rtcp:4005 IN IP6 2a00:6020:47a7:1800:1c29:1200:c2e9:c01
a=sendrecv
a=rtpmap:96 opus/48000/2
a=fmtp:96 useinbandfec=1
a=rtpmap:9 G722/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:18 G729/8000
a=rtpmap:120 telephone-event/48000
a=fmtp:120 0-16
a=rtpmap:121 telephone-event/8000
a=fmtp:121 0-16
a=ssrc:1774404646 cname:053fd69e222321c3

<— Transmitting SIP response (568 bytes) to UDP:192.168.89.84:52314 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.89.84:52314;rport=52314;received=192.168.89.84;branch=z9hG4bKPjD15E9203-45B8-4FB5-AE1C-DC27DB4096B5
Call-ID: 30DF6F0E-ED41-4DBC-B1DC-BA06ECB5C71C
From: sip:6001@192.168.90.254;tag=D9563820-0ABA-4819-9AB0-0AA876444EE5
To: sip:11@192.168.90.254;tag=z9hG4bKPjD15E9203-45B8-4FB5-AE1C-DC27DB4096B5
CSeq: 6839 INVITE
WWW-Authenticate: Digest realm=“asterisk”,nonce=“1736193895/39e531c878641526b7f9f84a8016fa56”,opaque=“1a927f825b16b603”,algorithm=MD5,qop=“auth”
Server: Asterisk PBX 20.8.1
Content-Length: 0

<— Received SIP request (398 bytes) from UDP:192.168.89.84:52314 —>
ACK sip:11@192.168.90.254;transport=udp SIP/2.0
Via: SIP/2.0/UDP 192.168.89.84:52314;rport;branch=z9hG4bKPjD15E9203-45B8-4FB5-AE1C-DC27DB4096B5
Max-Forwards: 70
From: sip:6001@192.168.90.254;tag=D9563820-0ABA-4819-9AB0-0AA876444EE5
To: sip:11@192.168.90.254;tag=z9hG4bKPjD15E9203-45B8-4FB5-AE1C-DC27DB4096B5
Call-ID: 30DF6F0E-ED41-4DBC-B1DC-BA06ECB5C71C
CSeq: 6839 ACK
Content-Length: 0

<— Received SIP request (1565 bytes) from TCP:192.168.89.84:59952 —>
INVITE sip:11@192.168.90.254;transport=udp SIP/2.0
Via: SIP/2.0/TCP 192.168.89.84:59952;rport;branch=z9hG4bKPjCC7FBC9D-F1E7-4602-BF8C-4FAA9487174E;alias
Max-Forwards: 70
From: sip:6001@192.168.90.254;tag=D9563820-0ABA-4819-9AB0-0AA876444EE5
To: sip:11@192.168.90.254
Contact: sip:6001@192.168.89.84:52314;ob
Call-ID: 30DF6F0E-ED41-4DBC-B1DC-BA06ECB5C71C
CSeq: 6840 INVITE
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Supported: replaces, 100rel, timer, norefersub
Session-Expires: 1800
Min-SE: 90
User-Agent: ESIP-NG/MacBook-Air-von-Frank.fritz.box/1.0.9
Authorization: Digest username=“6001”, realm=“asterisk”, nonce=“1736193895/39e531c878641526b7f9f84a8016fa56”, uri="sip:11@192.168.90.254;transport=udp", response=“e04bae6918af3cc4bcd00503648e04e1”, algorithm=MD5, cnonce=“546497FB42BF461C862E1731A8602930”, opaque=“1a927f825b16b603”, qop=auth, nc=00000001
Content-Type: application/sdp
Content-Length: 581

v=0
o=- 3945182695 3945182695 IN IP6 2a00:6020:47a7:1800:1c29:1200:c2e9:c01
s=pjmedia
b=AS:117
t=0 0
a=X-nat:0
m=audio 4004 RTP/AVP 96 9 8 0 18 120 121
c=IN IP6 2a00:6020:47a7:1800:1c29:1200:c2e9:c01
b=TIAS:96000
a=rtcp:4005 IN IP6 2a00:6020:47a7:1800:1c29:1200:c2e9:c01
a=sendrecv
a=rtpmap:96 opus/48000/2
a=fmtp:96 useinbandfec=1
a=rtpmap:9 G722/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:18 G729/8000
a=rtpmap:120 telephone-event/48000
a=fmtp:120 0-16
a=rtpmap:121 telephone-event/8000
a=fmtp:121 0-16
a=ssrc:1774404646 cname:053fd69e222321c3

<— Transmitting SIP response (372 bytes) to TCP:192.168.89.84:59952 —>
SIP/2.0 100 Trying
Via: SIP/2.0/TCP 192.168.89.84:59952;rport=59952;received=192.168.89.84;branch=z9hG4bKPjCC7FBC9D-F1E7-4602-BF8C-4FAA9487174E;alias
Call-ID: 30DF6F0E-ED41-4DBC-B1DC-BA06ECB5C71C
From: sip:6001@192.168.90.254;tag=D9563820-0ABA-4819-9AB0-0AA876444EE5
To: sip:11@192.168.90.254
CSeq: 6840 INVITE
Server: Asterisk PBX 20.8.1
Content-Length: 0

<— Transmitting SIP request (946 bytes) to UDP:192.168.88.254:5060 —>
INVITE sip:11@192.168.88.254:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.88.253:5060;rport;branch=z9hG4bKPje6746326-bd4f-4a12-8aa2-3d9887d27c33
From: sip:192.168.88.254@fritz.box;tag=48c871a7-f715-43f7-93a4-bb0b02629f6d
To: sip:11@192.168.88.254
Contact: sip:192.168.88.254@192.168.88.253:5060
Call-ID: 62163f08-f21a-4225-a42e-50daff08533d
CSeq: 12000 INVITE
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, INFO, REFER, MESSAGE
Supported: 100rel, timer, replaces, norefersub, histinfo
Session-Expires: 1800
Min-SE: 90
Max-Forwards: 70
User-Agent: Asterisk PBX 20.8.1
Content-Type: application/sdp
Content-Length: 263

v=0
o=- 719239826 719239826 IN IP4 192.168.88.253
s=Asterisk
c=IN IP4 192.168.88.253
t=0 0
m=audio 10516 RTP/AVP 0 8 101
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:140
a=sendrecv

<— Transmitting SIP request (946 bytes) to UDP:192.168.88.254:5060 —>
INVITE sip:11@192.168.88.254:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.88.253:5060;rport;branch=z9hG4bKPje6746326-bd4f-4a12-8aa2-3d9887d27c33
From: sip:192.168.88.254@fritz.box;tag=48c871a7-f715-43f7-93a4-bb0b02629f6d
To: sip:11@192.168.88.254
Contact: sip:192.168.88.254@192.168.88.253:5060
Call-ID: 62163f08-f21a-4225-a42e-50daff08533d
CSeq: 12000 INVITE
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, INFO, REFER, MESSAGE
Supported: 100rel, timer, replaces, norefersub, histinfo
Session-Expires: 1800
Min-SE: 90
Max-Forwards: 70
User-Agent: Asterisk PBX 20.8.1
Content-Type: application/sdp
Content-Length: 263

v=0
o=- 719239826 719239826 IN IP4 192.168.88.253
s=Asterisk
c=IN IP4 192.168.88.253
t=0 0
m=audio 10516 RTP/AVP 0 8 101
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:140
a=sendrecv

<— Transmitting SIP request (946 bytes) to UDP:192.168.88.254:5060 —>
INVITE sip:11@192.168.88.254:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.88.253:5060;rport;branch=z9hG4bKPje6746326-bd4f-4a12-8aa2-3d9887d27c33
From: sip:192.168.88.254@fritz.box;tag=48c871a7-f715-43f7-93a4-bb0b02629f6d
To: sip:11@192.168.88.254
Contact: sip:192.168.88.254@192.168.88.253:5060
Call-ID: 62163f08-f21a-4225-a42e-50daff08533d
CSeq: 12000 INVITE
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, INFO, REFER, MESSAGE
Supported: 100rel, timer, replaces, norefersub, histinfo
Session-Expires: 1800
Min-SE: 90
Max-Forwards: 70
User-Agent: Asterisk PBX 20.8.1
Content-Type: application/sdp
Content-Length: 263

v=0
o=- 719239826 719239826 IN IP4 192.168.88.253
s=Asterisk
c=IN IP4 192.168.88.253
t=0 0
m=audio 10516 RTP/AVP 0 8 101
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:140
a=sendrecv

<— Transmitting SIP request (946 bytes) to UDP:192.168.88.254:5060 —>
INVITE sip:11@192.168.88.254:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.88.253:5060;rport;branch=z9hG4bKPje6746326-bd4f-4a12-8aa2-3d9887d27c33
From: sip:192.168.88.254@fritz.box;tag=48c871a7-f715-43f7-93a4-bb0b02629f6d
To: sip:11@192.168.88.254
Contact: sip:192.168.88.254@192.168.88.253:5060
Call-ID: 62163f08-f21a-4225-a42e-50daff08533d
CSeq: 12000 INVITE
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, INFO, REFER, MESSAGE
Supported: 100rel, timer, replaces, norefersub, histinfo
Session-Expires: 1800
Min-SE: 90
Max-Forwards: 70
User-Agent: Asterisk PBX 20.8.1
Content-Type: application/sdp
Content-Length: 263

v=0
o=- 719239826 719239826 IN IP4 192.168.88.253
s=Asterisk
c=IN IP4 192.168.88.253
t=0 0
m=audio 10516 RTP/AVP 0 8 101
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:140
a=sendrecv

<— Received SIP request (596 bytes) from UDP:192.168.89.84:52314 —>
REGISTER sip:192.168.90.254;transport=udp SIP/2.0
Via: SIP/2.0/UDP 192.168.89.84:52314;rport;branch=z9hG4bKPj559864B1-222A-4A79-BCB9-0C0715F518BC
Max-Forwards: 70
From: sip:6001@192.168.90.254;tag=792715A6-EEC4-43C9-9A7E-641533FE2384
To: sip:6001@192.168.90.254
Call-ID: 29E31A1E-6253-4918-8ED4-E6698761C483
CSeq: 7907 REGISTER
ESIP-device: 12345
User-Agent: ESIP-NG/MacBook-Air-von-Frank.fritz.box/1.0.9
Contact: sip:6001@192.168.89.84:52314;ob
Expires: 300
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Content-Length: 0

<— Transmitting SIP response (572 bytes) to UDP:192.168.89.84:52314 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.89.84:52314;rport=52314;received=192.168.89.84;branch=z9hG4bKPj559864B1-222A-4A79-BCB9-0C0715F518BC
Call-ID: 29E31A1E-6253-4918-8ED4-E6698761C483
From: sip:6001@192.168.90.254;tag=792715A6-EEC4-43C9-9A7E-641533FE2384
To: sip:6001@192.168.90.254;tag=z9hG4bKPj559864B1-222A-4A79-BCB9-0C0715F518BC
CSeq: 7907 REGISTER
WWW-Authenticate: Digest realm=“asterisk”,nonce=“1736193902/ca2188f7ccabe7307ce27ef7112fb448”,opaque=“26542ffa43ef6d6c”,algorithm=MD5,qop=“auth”
Server: Asterisk PBX 20.8.1
Content-Length: 0

<— Received SIP request (899 bytes) from UDP:192.168.89.84:52314 —>
REGISTER sip:192.168.90.254;transport=udp SIP/2.0
Via: SIP/2.0/UDP 192.168.89.84:52314;rport;branch=z9hG4bKPj315DDA22-044A-4B69-88B4-15C586D0E6F3
Max-Forwards: 70
From: sip:6001@192.168.90.254;tag=792715A6-EEC4-43C9-9A7E-641533FE2384
To: sip:6001@192.168.90.254
Call-ID: 29E31A1E-6253-4918-8ED4-E6698761C483
CSeq: 7908 REGISTER
ESIP-device: 12345
User-Agent: ESIP-NG/MacBook-Air-von-Frank.fritz.box/1.0.9
Contact: sip:6001@192.168.89.84:52314;ob
Expires: 300
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS
Authorization: Digest username=“6001”, realm=“asterisk”, nonce=“1736193902/ca2188f7ccabe7307ce27ef7112fb448”, uri=“sip:192.168.90.254;transport=udp”, response=“da6194678b26d6679890d4e3ddf09097”, algorithm=MD5, cnonce=“6B78998B3B4147AC826EC5321E7A0C02”, opaque=“26542ffa43ef6d6c”, qop=auth, nc=00000001
Content-Length: 0

<— Transmitting SIP response (523 bytes) to UDP:192.168.89.84:52314 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.89.84:52314;rport=52314;received=192.168.89.84;branch=z9hG4bKPj315DDA22-044A-4B69-88B4-15C586D0E6F3
Call-ID: 29E31A1E-6253-4918-8ED4-E6698761C483
From: sip:6001@192.168.90.254;tag=792715A6-EEC4-43C9-9A7E-641533FE2384
To: sip:6001@192.168.90.254;tag=z9hG4bKPj315DDA22-044A-4B69-88B4-15C586D0E6F3
CSeq: 7908 REGISTER
Date: Mon, 06 Jan 2025 20:05:02 GMT
Contact: sip:6001@192.168.89.84:52314;ob;expires=299
Expires: 300
Server: Asterisk PBX 20.8.1
Content-Length: 0

<— Transmitting SIP request (946 bytes) to UDP:192.168.88.254:5060 —>
INVITE sip:11@192.168.88.254:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.88.253:5060;rport;branch=z9hG4bKPje6746326-bd4f-4a12-8aa2-3d9887d27c33
From: sip:192.168.88.254@fritz.box;tag=48c871a7-f715-43f7-93a4-bb0b02629f6d
To: sip:11@192.168.88.254
Contact: sip:192.168.88.254@192.168.88.253:5060
Call-ID: 62163f08-f21a-4225-a42e-50daff08533d
CSeq: 12000 INVITE
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, INFO, REFER, MESSAGE
Supported: 100rel, timer, replaces, norefersub, histinfo
Session-Expires: 1800
Min-SE: 90
Max-Forwards: 70
User-Agent: Asterisk PBX 20.8.1
Content-Type: application/sdp
Content-Length: 263

v=0
o=- 719239826 719239826 IN IP4 192.168.88.253
s=Asterisk
c=IN IP4 192.168.88.253
t=0 0
m=audio 10516 RTP/AVP 0 8 101
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:140
a=sendrecv

<— Transmitting SIP request (946 bytes) to UDP:192.168.88.254:5060 —>
INVITE sip:11@192.168.88.254:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.88.253:5060;rport;branch=z9hG4bKPje6746326-bd4f-4a12-8aa2-3d9887d27c33
From: sip:192.168.88.254@fritz.box;tag=48c871a7-f715-43f7-93a4-bb0b02629f6d
To: sip:11@192.168.88.254
Contact: sip:192.168.88.254@192.168.88.253:5060
Call-ID: 62163f08-f21a-4225-a42e-50daff08533d
CSeq: 12000 INVITE
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, INFO, REFER, MESSAGE
Supported: 100rel, timer, replaces, norefersub, histinfo
Session-Expires: 1800
Min-SE: 90
Max-Forwards: 70
User-Agent: Asterisk PBX 20.8.1
Content-Type: application/sdp
Content-Length: 263

v=0
o=- 719239826 719239826 IN IP4 192.168.88.253
s=Asterisk
c=IN IP4 192.168.88.253
t=0 0
m=audio 10516 RTP/AVP 0 8 101
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:140
a=sendrecv

<— Transmitting SIP request (946 bytes) to UDP:192.168.88.254:5060 —>
INVITE sip:11@192.168.88.254:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.88.253:5060;rport;branch=z9hG4bKPje6746326-bd4f-4a12-8aa2-3d9887d27c33
From: sip:192.168.88.254@fritz.box;tag=48c871a7-f715-43f7-93a4-bb0b02629f6d
To: sip:11@192.168.88.254
Contact: sip:192.168.88.254@192.168.88.253:5060
Call-ID: 62163f08-f21a-4225-a42e-50daff08533d
CSeq: 12000 INVITE
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, INFO, REFER, MESSAGE
Supported: 100rel, timer, replaces, norefersub, histinfo
Session-Expires: 1800
Min-SE: 90
Max-Forwards: 70
User-Agent: Asterisk PBX 20.8.1
Content-Type: application/sdp
Content-Length: 263

v=0
o=- 719239826 719239826 IN IP4 192.168.88.253
s=Asterisk
c=IN IP4 192.168.88.253
t=0 0
m=audio 10516 RTP/AVP 0 8 101
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:140
a=sendrecv

<— Transmitting SIP response (450 bytes) to TCP:192.168.89.84:59952 —>
SIP/2.0 503 Service Unavailable
Via: SIP/2.0/TCP 192.168.89.84:59952;rport=59952;received=192.168.89.84;branch=z9hG4bKPjCC7FBC9D-F1E7-4602-BF8C-4FAA9487174E;alias
Call-ID: 30DF6F0E-ED41-4DBC-B1DC-BA06ECB5C71C
From: sip:6001@192.168.90.254;tag=D9563820-0ABA-4819-9AB0-0AA876444EE5
To: sip:11@192.168.90.254;tag=05fc0cdc-f63c-4b30-a866-8b5f95acbc6e
CSeq: 6840 INVITE
Server: Asterisk PBX 20.8.1
Reason: Q.850;cause=34
Content-Length: 0

<— Received SIP request (395 bytes) from TCP:192.168.89.84:59952 —>
ACK sip:11@192.168.90.254;transport=udp SIP/2.0
Via: SIP/2.0/TCP 192.168.89.84:59952;rport;branch=z9hG4bKPjCC7FBC9D-F1E7-4602-BF8C-4FAA9487174E;alias
Max-Forwards: 70
From: sip:6001@192.168.90.254;tag=D9563820-0ABA-4819-9AB0-0AA876444EE5
To: sip:11@192.168.90.254;tag=05fc0cdc-f63c-4b30-a866-8b5f95acbc6e
Call-ID: 30DF6F0E-ED41-4DBC-B1DC-BA06ECB5C71C
CSeq: 6840 ACK
Content-Length: 0

<— Transmitting SIP request (580 bytes) to UDP:192.168.88.254:5060 —>
REGISTER sip:asterisk@192.168.88.254:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.88.253:5060;rport;branch=z9hG4bKPj1855b553-b7c0-4334-acc6-b36615dcde08
From: sip:asterisk@192.168.88.254;tag=deed7599-2b08-4f1a-8f4b-0090e9d06869
To: sip:asterisk@192.168.88.254
Call-ID: c3b0e86b-8b7a-4a64-b248-db4e2f49d65a
CSeq: 21139 REGISTER
Contact: sip:asterisk@192.168.88.253:5060
Expires: 3600
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, INFO, REFER, MESSAGE
Max-Forwards: 70
User-Agent: Asterisk PBX 20.8.1
Content-Length: 0

<— Received SIP response (444 bytes) from UDP:192.168.88.254:5060 —>
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.88.253:5060;rport=5060;branch=z9hG4bKPj1855b553-b7c0-4334-acc6-b36615dcde08
From: sip:asterisk@192.168.88.254;tag=deed7599-2b08-4f1a-8f4b-0090e9d06869
To: sip:asterisk@192.168.88.254;tag=089FD9BB2A80D250
Call-ID: c3b0e86b-8b7a-4a64-b248-db4e2f49d65a
CSeq: 21139 REGISTER
WWW-Authenticate: Digest realm=“fritz.box”, nonce=“23D23FF373C93FD2”
User-Agent: FRITZ!OS
Content-Length: 0

<— Transmitting SIP request (753 bytes) to UDP:192.168.88.254:5060 —>
REGISTER sip:asterisk@192.168.88.254:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.88.253:5060;rport;branch=z9hG4bKPj973b5761-ffac-4515-bacc-973c7e9e221a
From: sip:asterisk@192.168.88.254;tag=deed7599-2b08-4f1a-8f4b-0090e9d06869
To: sip:asterisk@192.168.88.254
Call-ID: c3b0e86b-8b7a-4a64-b248-db4e2f49d65a
CSeq: 21140 REGISTER
Contact: sip:asterisk@192.168.88.253:5060
Expires: 3600
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, INFO, REFER, MESSAGE
Max-Forwards: 70
User-Agent: Asterisk PBX 20.8.1
Authorization: Digest username=“asterisk”, realm=“fritz.box”, nonce=“23D23FF373C93FD2”, uri=“sip:asterisk@192.168.88.254:5060”, response=“38a1769082ecf6d9ce21c97592be0c25”
Content-Length: 0

<— Received SIP response (704 bytes) from UDP:192.168.88.254:5060 —>
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.88.253:5060;rport=5060;branch=z9hG4bKPj973b5761-ffac-4515-bacc-973c7e9e221a
From: sip:asterisk@192.168.88.254;tag=deed7599-2b08-4f1a-8f4b-0090e9d06869
To: sip:asterisk@192.168.88.254;tag=1CE9F43DE8BE5D83
Call-ID: c3b0e86b-8b7a-4a64-b248-db4e2f49d65a
CSeq: 21140 REGISTER
Contact: sip:asterisk@192.168.88.253:5060;expires=300
User-Agent: AVM FRITZ!Box 6591 Cable 161.08.00 (Sep 20 2024)
Supported: 100rel,replaces,timer,199
Allow-Events: telephone-event,refer,reg
Allow: INVITE,ACK,OPTIONS,CANCEL,BYE,UPDATE,PRACK,INFO,SUBSCRIBE,NOTIFY,REFER,MESSAGE,PUBLISH
Accept: application/sdp, multipart/mixed
Accept-Encoding: identity
Content-Length: 0

Danke im Voraus für die Unterstützung

Asterisk is being ignored by the Fritz box, or either the request or its response is getting lost somewhere on the round trip. Check that you have the right address, and NAT and firewall configuration is correct.

Hello david551,

is there any good sample for the pjsip with fritzbox and nat ?

my Asterix is 192.168.90.121 and my Fritzbox is 192.168.88.254

and this is ma my pjsip.conf

[transport-udp]

type=transport

protocol=udp

bind=0.0.0.0

[transport-tcp]

type=transport

protocol=tcp

bind=0.0.0.0

[fritzbox88]

type=registration

transport=transport-udp

outbound_auth=fritzbox88_auth

contact_user = asterisk

[fritzbox88_auth]

type=auth

auth_type=userpass

password=

username=asterisk

[fritzbox88]

type = aor

contact = sip:asterisk@192.168.88.254:5060

[192.168.88.254]

type = endpoint

context = incoming

outbound_auth = fritzbox88_auth

aors = fritzbox88

disallow=all

allow=ulaw,alaw

from_domain = fritz.box

from_user = 192.168.88.254

direct_media=no

rtp_symmetric=yes

force_rport=yes

rewrite_contact=yes ; necessary if endpoint does not know/register public ip:p

[fritzbox88]

type = identify

endpoint = 192.168.88.254

match = 192.168.88.254

On Tuesday 07 January 2025 at 21:06:38, Powertrain01 via Asterisk Community
wrote:

is there any good sample for the pjsip with fritzbox and nat ?

my Asterix is 192.168.90.121 and my Fritzbox is 192.168.88.254

I am intrigued. Are you sure that there is NAT involved here?

Your Fritzbox is a router to the Internet. Your Asterisk server has a private
IP address - that suggests to me that it is not out on the Internet (or if it
is, then the private (ie: internal) address of the Fritzbox is irrelevant -
Asterisk would be talking (via NAT, across the Internet) to the public IP of
the Fritzbox).

So, I am suspecting that you have a completely local network setup, where
somehow or other 192.168.90.121 and 192.168.88.254 can communicate with each
other without NAT being involved.

Perhaps you are not using a 255.255.255.0 netmask?

Maybe you have another router in between the devices?

Possibly 192.168.88.254 is one internal address on your Fritzbox, but it also
has a 192.168.90.x address on another of its interfaces?

I think it would be valuable to explain exactly how your Asterisk server and
your Fritzbox are connected to each other, and which of any devices in between
them are doing simple routing and which are doing NAT.

Antony.


Before you begin scrambling up the ladder of success,
make sure it’s leaning against the right building.

  • Stephen Covey

Ok i tray it to explain

Asterisk (192.168.90.121 > Openwrt router 192.168.90.254 > openwrtrouter out 192.168.88.253 > fritzbox SIP 192.168.88.254

The same is then on a second network with a second Fritzbox

Asterisk (192.168.90.121 > Openwrt router 192.168.90.254 > openwrtrouter out 192.168.89.253 > fritzbox SIP 192.168.89.254

If my Door is ringing 888811 it should go to sip:11@192.168.88.254
if my Door is ringing 898911 it should go to sip:11@192.168.89.254

hop now its clear

Okay, so I’m going to assume that the two OpenWRT routers are simply routing,
and not performing NAT.

The question now (for me, at least) is whether the two FritzBoxes have been
told to use the respective OpenWRT router as the gateway address to find the
Asterisk server.

To check this, please confirm whether you can get a ‘ping’ response from both
FritzBoxes, starting from the Asterisk server.

In other words, on the Asterisk server, do:

ping 192.168.88.254

and

ping 192.168.89.254

and tell us whether you get reply packets in both cases.

Antony.

Hello Antony

root@OpenWrt:~# ping 192.168.88.254
PING 192.168.88.254 (192.168.88.254): 56 data bytes
64 bytes from 192.168.88.254: seq=0 ttl=64 time=1.849 ms
64 bytes from 192.168.88.254: seq=1 ttl=64 time=0.908 ms
64 bytes from 192.168.88.254: seq=2 ttl=64 time=1.009 ms
64 bytes from 192.168.88.254: seq=3 ttl=64 time=1.410 ms
64 bytes from 192.168.88.254: seq=4 ttl=64 time=0.839 ms
64 bytes from 192.168.88.254: seq=5 ttl=64 time=0.903 ms
64 bytes from 192.168.88.254: seq=6 ttl=64 time=0.863 ms
64 bytes from 192.168.88.254: seq=7 ttl=64 time=0.902 ms
64 bytes from 192.168.88.254: seq=8 ttl=64 time=1.111 ms
64 bytes from 192.168.88.254: seq=9 ttl=64 time=1.061 ms
64 bytes from 192.168.88.254: seq=10 ttl=64 time=0.784 ms
64 bytes from 192.168.88.254: seq=11 ttl=64 time=0.834 ms
64 bytes from 192.168.88.254: seq=12 ttl=64 time=0.908 ms
64 bytes from 192.168.88.254: seq=13 ttl=64 time=0.832 ms
64 bytes from 192.168.88.254: seq=14 ttl=64 time=0.808 ms
^C
— 192.168.88.254 ping statistics —
15 packets transmitted, 15 packets received, 0% packet loss
round-trip min/avg/max = 0.784/1.001/1.849 ms

root@OpenWrt:~# ping 192.168.89.254
PING 192.168.89.254 (192.168.89.254): 56 data bytes
64 bytes from 192.168.89.254: seq=0 ttl=64 time=2.069 ms
64 bytes from 192.168.89.254: seq=1 ttl=64 time=1.104 ms
64 bytes from 192.168.89.254: seq=2 ttl=64 time=1.083 ms
64 bytes from 192.168.89.254: seq=3 ttl=64 time=0.933 ms
64 bytes from 192.168.89.254: seq=4 ttl=64 time=1.200 ms
64 bytes from 192.168.89.254: seq=5 ttl=64 time=1.023 ms
64 bytes from 192.168.89.254: seq=6 ttl=64 time=1.359 ms
64 bytes from 192.168.89.254: seq=7 ttl=64 time=1.119 ms
64 bytes from 192.168.89.254: seq=8 ttl=64 time=1.001 ms
^C
— 192.168.89.254 ping statistics —
9 packets transmitted, 9 packets received, 0% packet loss
round-trip min/avg/max = 0.933/1.210/2.069 ms
root@OpenWrt:~#

and a traceroute

root@OpenWrt:~# traceroute 192.168.88.254
traceroute to 192.168.88.254 (192.168.88.254), 30 hops max, 46 byte packets
1 192.168.88.254 (192.168.88.254) 1.107 ms 1.569 ms 1.889 ms

root@OpenWrt:~# traceroute 192.168.88.254
traceroute to 192.168.88.254 (192.168.88.254), 30 hops max, 46 byte packets
1 192.168.88.254 (192.168.88.254) 2.094 ms 1.757 ms 1.817 ms

and I see a invite on the Fritzbox

hello
looking for something else I read this post.
I don’t think it’s a correct configuration for what you want.
I made some corrections :

[fritzbox88]
type = aor
contact = sip:asterisk@192.168.88.254:5060 ; for a SIPtrunk should be: sip:192.168.88.254

[fritzbox88]
type=registration
transport=transport-udp
outbound_auth=fritzbox88_auth
contact_user = asterisk
server_uri=sip:192.168.88.254 ;add this
client_uri=sip:asterisk@192.168.88.254 ;add this

[fritzbox88_auth]
type=auth
auth_type=userpass
password=
username=asterisk

[192.168.88.254]
type = endpoint
context = incoming
outbound_auth = fritzbox88_auth
aors = fritzbox88
disallow=all
allow=ulaw,alaw
from_domain = fritz.box ; should be asterisk ip address of interface to FB: 192.168.90.121
from_user = 192.168.88.254 ;should be username: asterisk
direct_media=no
rtp_symmetric=yes
force_rport=yes
rewrite_contact=yes ; necessary if endpoint does not know/register public ip:p

[fritzbox88]
type = identify
endpoint = 192.168.88.254
match = 192.168.88.254

Obvious, you must have ip connectivity from the asterisk machine ip 90.121 to 88.254
You did not specify if endpoint 11 in the Fritzbox is correctly configured and if it routes the call to it
It’s a good idea to also check endpoint 6001 from asterisk

However, I don’t understand why you have to go through a siptrunk with fritzbox, you’d better declare in Fritzbox a telephone number directly as endpoint asterisk.

I hope my observations are of some help

Hello Invent,

thanks I will try this settings.

I must go over the sip trunk because it is a doorbell that have 2 buttons.

the first Button gives the number 11 and the second gives the number 12
and I must split this 2 Buttons to 2 different Fritzboxes because that a 2 separate apartments.

@Powertrain01
Hello,
I understood you have two FB, but my observation was that you can use FB not as a sip trunk but as a simple end device, In this case you don’t need that [fritzbox88] end device, you can configure instead one called [11] direct in asterisk pjsip.conf. (And of course another one [12] coresponding to the second FB)
In FritzBox-es you have to configure your sip numbers (with asterisk address 90.121 as registrar), in “Telephony/Telephone numbers” menu, not in “Telephony devices” where are your physical devices, for ex. analog FON1.
This is how the config for endpoint [11] would look like:
[11]
type = aor
max_contacts = 1
remove_existing = yes
qualify_frequency = 60
qualify_timeout = 1.0

[11]
type=endpoint
disallow = all
allow=alaw,ulaw
direct_media = no
trust_id_outbound = yes
dtmf_mode = rfc4733
;if from_domain is not specified at the endpoint, the ip of the interface is used
;if from_user is not specified at the endpoint, the endpoint username is used
callerid = “button 1” <11>
context = …
auth=11
aors=11
transport = transport-udp

***** same for “button 2” <12> *****

Regards