Problem Asterisk <-> Openwrt <-> Fritzbox7590

Hey Folks,

I am trying to get my asterisk working behind an Openwrt Router that is connected to a Fritzbox.
I dont get it working and would be happy to get some help.
I know Nat is not the best option but i would be able to setup siproxd or so i just need some help here :slight_smile:

So first some infos about the setup

Fritzbox7590 IP: 192.168.0.1 (registered a ipphone user:asterisk passwd:LkTy4c7mxHH4?X6_)
Openwrt Router: 192.168.0.2 (from Fritzbox) and 192.168.1.1 (Main running dhcp)
Asterisk Ip: 192.168.1.10 (from Openwrt via dhcp)

Connection
Fritzbox <-> OpenWrt <-> Asterisk

I want to connect the asterisk to the fritzbox to do outbound calls and inbound as well as internal calls

Here are the configs so far

[global]
type=global
endpoint_identifier_order=ip,username

[transport-udp]
type=transport
protocol=udp
bind=0.0.0.0

[transport-tcp]
type=transport
protocol=tcp
bind=0.0.0.0

[fritzbox]
type=registration
transport=transport-udp
outbound_auth=fritzbox
contact_user = asterisk
server_uri=sip:asterisk@192.168.0.1:5060
client_uri=sip:asterisk@192.168.0.1:5060



[fritzbox]
type=auth
auth_type=userpass
password=LkTy4c7mxHH4?X6_
username=asterisk

[fritzbox]
type = aor
contact = sip:asterisk@192.168.0.1:5060

[asterisk]
type = endpoint
context = incoming
outbound_auth = fritzbox
aors = fritzbox
disallow=all
allow=ulaw
allow=alaw
allow=gsm
;from_domain = 192.168.0.1
from_user = asterisk

[fritzbox]
type = identify
endpoint = asterisk
match = 192.168.0.2

[6001]
type = endpoint
context = internal
disallow = all
allow = ulaw,alaw
aors = 6001
auth = auth6001

[6001]
type = aor
remove_existing = yes
max_contacts = 1

[auth6001]
type=auth
auth_type=userpass
password=1234
username=6001

[6002]
type = endpoint
context = internal
disallow = all
allow = ulaw,alaw
aors = 6002
auth = auth6002

[6002]
type = aor
remove_existing = yes
max_contacts = 1

[auth6002]
type=auth
auth_type=userpass
password=1234
username=6002

Extensions

[incoming]

exten => _X.,1,Goto(internal,6001,1)

[internal]

exten => 6001,1,NoOp(Rufe 6001)
same => n,Dial(PJSIP/6001)
same => n,Hangup()

exten => 6002,1,NoOp(Rufe 6002)
same => n,Dial(PJSIP/6002)
same => n,Hangup()

exten => _0X.,1,Goto(outgoing,${EXTEN:1},1)


[outgoing]

exten => _X.,1,Dial(PJSIP/asterisk/${EXTEN})

I get the following output

OSMO*CLI> pjsip set logger on
PJSIP Logging enabled
<--- Transmitting SIP request (586 bytes) to UDP:192.168.0.1:5060 --->
REGISTER sip:asterisk@192.168.0.1:5060 SIP/2.0
Via: SIP/2.0/UDP 172.22.22.220:5060;rport;branch=z9hG4bKPj0c7738f7-6075-43ad-b5cf-3dfc8b08c624
From: <sip:asterisk@192.168.0.1>;tag=b8c6fc48-df5c-4d27-a800-e64aa6151518
To: <sip:asterisk@192.168.0.1>
Call-ID: 9c960a00-9a20-46c2-aa99-d8bcf4e9daa0
CSeq: 1192 REGISTER
Contact: <sip:asterisk@172.22.22.220:5060>
Expires: 3600
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
Max-Forwards: 70
User-Agent: Asterisk PBX 20.0.1~dfsg+~cs6.12.40431414-1
Content-Length:  0


<--- Received SIP response (457 bytes) from UDP:192.168.0.1:5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 172.22.22.220:5060;rport=5060;branch=z9hG4bKPj0c7738f7-6075-43ad-b5cf-3dfc8b08c624;received=192.168.0.2
From: <sip:asterisk@192.168.0.1>;tag=b8c6fc48-df5c-4d27-a800-e64aa6151518
To: <sip:asterisk@192.168.0.1>;tag=2F36C5932556433E
Call-ID: 9c960a00-9a20-46c2-aa99-d8bcf4e9daa0
CSeq: 1192 REGISTER
WWW-Authenticate: Digest realm="fritz.box", nonce="47E3E40423E1A280"
User-Agent: FRITZ!OS
Content-Length: 0


<--- Transmitting SIP request (756 bytes) to UDP:192.168.0.1:5060 --->
REGISTER sip:asterisk@192.168.0.1:5060 SIP/2.0
Via: SIP/2.0/UDP 172.22.22.220:5060;rport;branch=z9hG4bKPj80596e06-9d74-4d7a-b106-5d69f666fc4e
From: <sip:asterisk@192.168.0.1>;tag=b8c6fc48-df5c-4d27-a800-e64aa6151518
To: <sip:asterisk@192.168.0.1>
Call-ID: 9c960a00-9a20-46c2-aa99-d8bcf4e9daa0
CSeq: 1193 REGISTER
Contact: <sip:asterisk@172.22.22.220:5060>
Expires: 3600
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
Max-Forwards: 70
User-Agent: Asterisk PBX 20.0.1~dfsg+~cs6.12.40431414-1
Authorization: Digest username="asterisk", realm="fritz.box", nonce="47E3E40423E1A280", uri="sip:asterisk@192.168.0.1:5060", response="1376400f477dcff34196be07b92c59b7"
Content-Length:  0


<--- Received SIP response (706 bytes) from UDP:192.168.0.1:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 172.22.22.220:5060;rport=5060;branch=z9hG4bKPj80596e06-9d74-4d7a-b106-5d69f666fc4e;received=192.168.0.2
From: <sip:asterisk@192.168.0.1>;tag=b8c6fc48-df5c-4d27-a800-e64aa6151518
To: <sip:asterisk@192.168.0.1>;tag=B457469D8940B2DB
Call-ID: 9c960a00-9a20-46c2-aa99-d8bcf4e9daa0
CSeq: 1193 REGISTER
Contact: <sip:asterisk@172.22.22.220:5060>;expires=300
User-Agent: AVM FRITZ!Box 7590 154.07.50 (Nov 18 2022)
Supported: 100rel,replaces,timer
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


<--- Transmitting SIP request (586 bytes) to UDP:192.168.0.1:5060 --->
REGISTER sip:asterisk@192.168.0.1:5060 SIP/2.0
Via: SIP/2.0/UDP 172.22.22.220:5060;rport;branch=z9hG4bKPjea4c4ea4-315a-4940-af3b-18370f8a95ce
From: <sip:asterisk@192.168.0.1>;tag=45b34372-668d-4419-99a0-f0f5c858c7e4
To: <sip:asterisk@192.168.0.1>
Call-ID: 9c960a00-9a20-46c2-aa99-d8bcf4e9daa0
CSeq: 1194 REGISTER
Contact: <sip:asterisk@172.22.22.220:5060>
Expires: 3600
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
Max-Forwards: 70
User-Agent: Asterisk PBX 20.0.1~dfsg+~cs6.12.40431414-1
Content-Length:  0


<--- Received SIP response (457 bytes) from UDP:192.168.0.1:5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 172.22.22.220:5060;rport=5060;branch=z9hG4bKPjea4c4ea4-315a-4940-af3b-18370f8a95ce;received=192.168.0.2
From: <sip:asterisk@192.168.0.1>;tag=45b34372-668d-4419-99a0-f0f5c858c7e4
To: <sip:asterisk@192.168.0.1>;tag=A830419EFF7CD6E6
Call-ID: 9c960a00-9a20-46c2-aa99-d8bcf4e9daa0
CSeq: 1194 REGISTER
WWW-Authenticate: Digest realm="fritz.box", nonce="741AC68D12EF96DE"
User-Agent: FRITZ!OS
Content-Length: 0


<--- Transmitting SIP request (756 bytes) to UDP:192.168.0.1:5060 --->
REGISTER sip:asterisk@192.168.0.1:5060 SIP/2.0
Via: SIP/2.0/UDP 172.22.22.220:5060;rport;branch=z9hG4bKPjd6b1e72d-42f6-426f-b460-28599ddf0c51
From: <sip:asterisk@192.168.0.1>;tag=45b34372-668d-4419-99a0-f0f5c858c7e4
To: <sip:asterisk@192.168.0.1>
Call-ID: 9c960a00-9a20-46c2-aa99-d8bcf4e9daa0
CSeq: 1195 REGISTER
Contact: <sip:asterisk@172.22.22.220:5060>
Expires: 3600
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
Max-Forwards: 70
User-Agent: Asterisk PBX 20.0.1~dfsg+~cs6.12.40431414-1
Authorization: Digest username="asterisk", realm="fritz.box", nonce="741AC68D12EF96DE", uri="sip:asterisk@192.168.0.1:5060", response="c4f7a1ce418d0dae0570bf29036d8704"
Content-Length:  0


<--- Received SIP response (706 bytes) from UDP:192.168.0.1:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 172.22.22.220:5060;rport=5060;branch=z9hG4bKPjd6b1e72d-42f6-426f-b460-28599ddf0c51;received=192.168.0.2
From: <sip:asterisk@192.168.0.1>;tag=45b34372-668d-4419-99a0-f0f5c858c7e4
To: <sip:asterisk@192.168.0.1>;tag=D467CA6CF0B97DB7
Call-ID: 9c960a00-9a20-46c2-aa99-d8bcf4e9daa0
CSeq: 1195 REGISTER
Contact: <sip:asterisk@172.22.22.220:5060>;expires=300
User-Agent: AVM FRITZ!Box 7590 154.07.50 (Nov 18 2022)
Supported: 100rel,replaces,timer
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


<--- Transmitting SIP request (586 bytes) to UDP:192.168.0.1:5060 --->
REGISTER sip:asterisk@192.168.0.1:5060 SIP/2.0
Via: SIP/2.0/UDP 172.22.22.220:5060;rport;branch=z9hG4bKPj506c08e6-c377-4823-8e29-9b6b1530c500
From: <sip:asterisk@192.168.0.1>;tag=49aafc51-dd93-4b74-a6c2-d425d817482a
To: <sip:asterisk@192.168.0.1>
Call-ID: 9c960a00-9a20-46c2-aa99-d8bcf4e9daa0
CSeq: 1196 REGISTER
Contact: <sip:asterisk@172.22.22.220:5060>
Expires: 3600
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
Max-Forwards: 70
User-Agent: Asterisk PBX 20.0.1~dfsg+~cs6.12.40431414-1
Content-Length:  0


<--- Received SIP response (457 bytes) from UDP:192.168.0.1:5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 172.22.22.220:5060;rport=5060;branch=z9hG4bKPj506c08e6-c377-4823-8e29-9b6b1530c500;received=192.168.0.2
From: <sip:asterisk@192.168.0.1>;tag=49aafc51-dd93-4b74-a6c2-d425d817482a
To: <sip:asterisk@192.168.0.1>;tag=40F8923BED557EDD
Call-ID: 9c960a00-9a20-46c2-aa99-d8bcf4e9daa0
CSeq: 1196 REGISTER
WWW-Authenticate: Digest realm="fritz.box", nonce="84F9C831842EFB95"
User-Agent: FRITZ!OS
Content-Length: 0


<--- Transmitting SIP request (756 bytes) to UDP:192.168.0.1:5060 --->
REGISTER sip:asterisk@192.168.0.1:5060 SIP/2.0
Via: SIP/2.0/UDP 172.22.22.220:5060;rport;branch=z9hG4bKPjaf7bffea-bee0-46e6-9409-cb4a9a64329c
From: <sip:asterisk@192.168.0.1>;tag=49aafc51-dd93-4b74-a6c2-d425d817482a
To: <sip:asterisk@192.168.0.1>
Call-ID: 9c960a00-9a20-46c2-aa99-d8bcf4e9daa0
CSeq: 1197 REGISTER
Contact: <sip:asterisk@172.22.22.220:5060>
Expires: 3600
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
Max-Forwards: 70
User-Agent: Asterisk PBX 20.0.1~dfsg+~cs6.12.40431414-1
Authorization: Digest username="asterisk", realm="fritz.box", nonce="84F9C831842EFB95", uri="sip:asterisk@192.168.0.1:5060", response="4764cca6a573db4eed77f6d94ee2e02b"
Content-Length:  0


<--- Received SIP response (706 bytes) from UDP:192.168.0.1:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 172.22.22.220:5060;rport=5060;branch=z9hG4bKPjaf7bffea-bee0-46e6-9409-cb4a9a64329c;received=192.168.0.2
From: <sip:asterisk@192.168.0.1>;tag=49aafc51-dd93-4b74-a6c2-d425d817482a
To: <sip:asterisk@192.168.0.1>;tag=1DC69149B30638D2
Call-ID: 9c960a00-9a20-46c2-aa99-d8bcf4e9daa0
CSeq: 1197 REGISTER
Contact: <sip:asterisk@172.22.22.220:5060>;expires=300
User-Agent: AVM FRITZ!Box 7590 154.07.50 (Nov 18 2022)
Supported: 100rel,replaces,timer
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


<--- Transmitting SIP request (586 bytes) to UDP:192.168.0.1:5060 --->
REGISTER sip:asterisk@192.168.0.1:5060 SIP/2.0
Via: SIP/2.0/UDP 172.22.22.220:5060;rport;branch=z9hG4bKPj4a765201-2051-49bf-bf39-7d7cd7c8dcf4
From: <sip:asterisk@192.168.0.1>;tag=53b7fd37-5855-4cfe-b72c-656068064dac
To: <sip:asterisk@192.168.0.1>
Call-ID: 9c960a00-9a20-46c2-aa99-d8bcf4e9daa0
CSeq: 1198 REGISTER
Contact: <sip:asterisk@172.22.22.220:5060>
Expires: 3600
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
Max-Forwards: 70
User-Agent: Asterisk PBX 20.0.1~dfsg+~cs6.12.40431414-1
Content-Length:  0


<--- Received SIP response (457 bytes) from UDP:192.168.0.1:5060 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 172.22.22.220:5060;rport=5060;branch=z9hG4bKPj4a765201-2051-49bf-bf39-7d7cd7c8dcf4;received=192.168.0.2
From: <sip:asterisk@192.168.0.1>;tag=53b7fd37-5855-4cfe-b72c-656068064dac
To: <sip:asterisk@192.168.0.1>;tag=B5E1FE6094C96654
Call-ID: 9c960a00-9a20-46c2-aa99-d8bcf4e9daa0
CSeq: 1198 REGISTER
WWW-Authenticate: Digest realm="fritz.box", nonce="CBA4BCC098CFBA25"
User-Agent: FRITZ!OS
Content-Length: 0


<--- Transmitting SIP request (756 bytes) to UDP:192.168.0.1:5060 --->
REGISTER sip:asterisk@192.168.0.1:5060 SIP/2.0
Via: SIP/2.0/UDP 172.22.22.220:5060;rport;branch=z9hG4bKPj8ebef53b-a93f-4ff4-ab64-909e750137d4
From: <sip:asterisk@192.168.0.1>;tag=53b7fd37-5855-4cfe-b72c-656068064dac
To: <sip:asterisk@192.168.0.1>
Call-ID: 9c960a00-9a20-46c2-aa99-d8bcf4e9daa0
CSeq: 1199 REGISTER
Contact: <sip:asterisk@172.22.22.220:5060>
Expires: 3600
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
Max-Forwards: 70
User-Agent: Asterisk PBX 20.0.1~dfsg+~cs6.12.40431414-1
Authorization: Digest username="asterisk", realm="fritz.box", nonce="CBA4BCC098CFBA25", uri="sip:asterisk@192.168.0.1:5060", response="e7568226943a1e6b990f916f5f70b36e"
Content-Length:  0


<--- Received SIP response (706 bytes) from UDP:192.168.0.1:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 172.22.22.220:5060;rport=5060;branch=z9hG4bKPj8ebef53b-a93f-4ff4-ab64-909e750137d4;received=192.168.0.2
From: <sip:asterisk@192.168.0.1>;tag=53b7fd37-5855-4cfe-b72c-656068064dac
To: <sip:asterisk@192.168.0.1>;tag=21CAE4D0769F2098
Call-ID: 9c960a00-9a20-46c2-aa99-d8bcf4e9daa0
CSeq: 1199 REGISTER
Contact: <sip:asterisk@172.22.22.220:5060>;expires=300
User-Agent: AVM FRITZ!Box 7590 154.07.50 (Nov 18 2022)
Supported: 100rel,replaces,timer
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

Please Help me with asterisk or i get obelix .
Thanks

You have contact user set to asterisk, for the registration, but you don’t have a corresponding asterisk extension, to receive the calls.

You have the wrong address in the type=identify.

could you please be a bit more specific ?
you mean an registered entpoint in the pjsip or loading an Extension in asterisk ?

yeha was 192.168.0.1 before would that be right =?

You register to receive calls at sip:asterisk@192.168.1.11, but your incoming context only matches SIP URI users beginning with a decimal digit.

[global]
type=global
endpoint_identifier_order=ip,username

[transport-udp]
type=transport
protocol=udp
bind=0.0.0.0

[transport-tcp]
type=transport
protocol=tcp
bind=0.0.0.0

[fritzbox]
type=registration
transport=transport-udp
outbound_auth=fritzbox
contact_user = asterisk
server_uri=sip:asterisk@192.168.0.1:5060
client_uri=sip:asterisk@192.168.0.1:5060



[fritzbox]
type=auth
auth_type=userpass
password=LkTy4c7mxHH4?X6_
username=asterisk

[fritzbox]
type = aor
contact = sip:asterisk@192.168.0.1:5060

[asterisk]
type = endpoint
context = incoming
outbound_auth = fritzbox
aors = fritzbox
disallow=all
allow=ulaw
allow=alaw
allow=gsm
;from_domain = 192.168.0.1
from_user = asterisk

[fritzbox]
type = identify
endpoint = asterisk
match = 192.168.0.1

[6001]
type = endpoint
context = internal
disallow = all
allow = ulaw,alaw
aors = 6001
auth = auth6001

[6001]
type = aor
remove_existing = yes
max_contacts = 1

[auth6001]
type=auth
auth_type=userpass
password=1234
username=6001

[6002]
type = endpoint
context = internal
disallow = all
allow = ulaw,alaw
aors = 6002
auth = auth6002

[6002]
type = aor
remove_existing = yes
max_contacts = 1

[auth6002]
type=auth
auth_type=userpass
password=1234
username=6002
[incoming]

exten => _X.,1,Goto(internal,6001,1)
exten => asterisk,1,Goto(internal,6001,1)

[internal]

exten => 6001,1,NoOp(Rufe 6001)
same => n,Dial(PJSIP/6001)
same => n,Hangup()

exten => 6002,1,NoOp(Rufe 6002)
same => n,Dial(PJSIP/6002)
same => n,Hangup()

exten => _0X.,1,Goto(outgoing,${EXTEN:1},1)


[outgoing]

exten => _X.,1,Dial(PJSIP/asterisk/${EXTEN})

?

Yes. But note that you should still be able to make outgoing calls and you should still have log entries for incoming calls, even before you fix it. If you are not getting log entries for incoming calls, you need to look at the Fritzbox, or router, and also check the Asterisk firewall is open.

i think thats where the problem is

<--- Received SIP request (1298 bytes) from UDP:192.168.1.10:41563 --->
INVITE sip:0004915259587859@192.168.1.10 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.10:41563;branch=z9hG4bK.jtLhvMRgs;rport
From: <sip:6001@192.168.1.10>;tag=YKi7cbRC-
To: sip:0004915259587859@192.168.1.10
CSeq: 20 INVITE
Call-ID: iO0pOiMn7j
Max-Forwards: 70
Supported: replaces, outbound, gruu, path, record-aware
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO, PRACK, UPDATE
Content-Type: application/sdp
Content-Length: 547
Contact: <sip:6001@192.168.1.10:41563;transport=udp>;expires=3599;+sip.instance="<urn:uuid:6cec3803-6a21-009c-b3fa-dc936013be48>";+org.linphone.specs="ephemeral/1.1,groupchat/1.1,lime"
User-Agent: Linphone Desktop/4.4.10 (OSMO) Kali GNU/Linux Rolling, Qt 5.15.6 LinphoneCore/5.1.65

v=0
o=6001 3988 1375 IN IP4 192.168.1.10
s=Talk
c=IN IP4 192.168.1.10
t=0 0
a=rtcp-xr:rcvr-rtt=all:10000 stat-summary=loss,dup,jitt,TTL voip-metrics
a=record:off
m=audio 47970 RTP/AVP 96 97 98 0 8 18 99 100 101
a=rtpmap:96 opus/48000/2
a=fmtp:96 useinbandfec=1
a=rtpmap:97 speex/16000
a=fmtp:97 vbr=on
a=rtpmap:98 speex/8000
a=fmtp:98 vbr=on
a=fmtp:18 annexb=yes
a=rtpmap:99 telephone-event/48000
a=rtpmap:100 telephone-event/16000
a=rtpmap:101 telephone-event/8000
a=rtcp:51713
a=rtcp-fb:* trr-int 1000
a=rtcp-fb:* ccm tmmbr

<--- Transmitting SIP response (489 bytes) to UDP:192.168.1.10:41563 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.1.10:41563;rport=41563;received=192.168.1.10;branch=z9hG4bK.jtLhvMRgs
Call-ID: iO0pOiMn7j
From: <sip:6001@192.168.1.10>;tag=YKi7cbRC-
To: <sip:0004915259587859@192.168.1.10>;tag=z9hG4bK.jtLhvMRgs
CSeq: 20 INVITE
WWW-Authenticate: Digest realm="asterisk",nonce="1671118518/136b467f5f40cdbdd8a5b4de0e37e826",opaque="0ee2a3707f46314a",algorithm=MD5,qop="auth"
Server: Asterisk PBX 20.0.1~dfsg+~cs6.12.40431414-1
Content-Length:  0


<--- Received SIP request (464 bytes) from UDP:192.168.1.10:41563 --->
ACK sip:0004915259587859@192.168.1.10 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.10:41563;branch=z9hG4bK.jtLhvMRgs;rport
Call-ID: iO0pOiMn7j
From: <sip:6001@192.168.1.10>;tag=YKi7cbRC-
To: <sip:0004915259587859@192.168.1.10>;tag=z9hG4bK.jtLhvMRgs
Contact: <sip:6001@192.168.1.10:41563;transport=udp>;expires=3599;+sip.instance="<urn:uuid:6cec3803-6a21-009c-b3fa-dc936013be48>";+org.linphone.specs="ephemeral/1.1,groupchat/1.1,lime"
Max-Forwards: 70
CSeq: 20 ACK


<--- Received SIP request (1588 bytes) from UDP:192.168.1.10:41563 --->
INVITE sip:0004915259587859@192.168.1.10 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.10:41563;branch=z9hG4bK.6pV~sc5Au;rport
From: <sip:6001@192.168.1.10>;tag=YKi7cbRC-
To: sip:0004915259587859@192.168.1.10
CSeq: 21 INVITE
Call-ID: iO0pOiMn7j
Max-Forwards: 70
Supported: replaces, outbound, gruu, path, record-aware
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO, PRACK, UPDATE
Content-Type: application/sdp
Content-Length: 547
Contact: <sip:6001@192.168.1.10:41563;transport=udp>;expires=3599;+sip.instance="<urn:uuid:6cec3803-6a21-009c-b3fa-dc936013be48>";+org.linphone.specs="ephemeral/1.1,groupchat/1.1,lime"
User-Agent: Linphone Desktop/4.4.10 (OSMO) Kali GNU/Linux Rolling, Qt 5.15.6 LinphoneCore/5.1.65
Authorization:  Digest realm="asterisk", nonce="1671118518/136b467f5f40cdbdd8a5b4de0e37e826", algorithm=MD5, opaque="0ee2a3707f46314a", username="6001",  uri="sip:0004915259587859@192.168.1.10", response="68227f1b3c722e76e20313887c2e7da4", cnonce="3f4uJKrMqlHeQUCN", nc=00000001, qop=auth

v=0
o=6001 3988 1375 IN IP4 192.168.1.10
s=Talk
c=IN IP4 192.168.1.10
t=0 0
a=rtcp-xr:rcvr-rtt=all:10000 stat-summary=loss,dup,jitt,TTL voip-metrics
a=record:off
m=audio 47970 RTP/AVP 96 97 98 0 8 18 99 100 101
a=rtpmap:96 opus/48000/2
a=fmtp:96 useinbandfec=1
a=rtpmap:97 speex/16000
a=fmtp:97 vbr=on
a=rtpmap:98 speex/8000
a=fmtp:98 vbr=on
a=fmtp:18 annexb=yes
a=rtpmap:99 telephone-event/48000
a=rtpmap:100 telephone-event/16000
a=rtpmap:101 telephone-event/8000
a=rtcp:51713
a=rtcp-fb:* trr-int 1000
a=rtcp-fb:* ccm tmmbr

<--- Transmitting SIP response (315 bytes) to UDP:192.168.1.10:41563 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.1.10:41563;rport=41563;received=192.168.1.10;branch=z9hG4bK.6pV~sc5Au
Call-ID: iO0pOiMn7j
From: <sip:6001@192.168.1.10>;tag=YKi7cbRC-
To: <sip:0004915259587859@192.168.1.10>
CSeq: 21 INVITE
Server: Asterisk PBX 20.0.1~dfsg+~cs6.12.40431414-1
Content-Length:  0


    -- Executing [0004915259587859@internal:1] Goto("PJSIP/6001-00000003", "outgoing,004915259587859,1") in new stack
    -- Goto (outgoing,004915259587859,1)
    -- Executing [004915259587859@outgoing:1] Dial("PJSIP/6001-00000003", "PJSIP/asterisk/004915259587859") in new stack
[Dec 15 16:35:18] ERROR[20041]: res_pjsip.c:849 ast_sip_create_dialog_uac: Endpoint 'asterisk': Could not create dialog to invalid URI '004915259587859'.  Is endpoint registered and reachable?
[Dec 15 16:35:18] ERROR[20041]: chan_pjsip.c:2672 request: Failed to create outgoing session to endpoint 'asterisk'
[Dec 15 16:35:18] NOTICE[20047][C-00000004]: app_dial.c:2707 dial_exec_full: Unable to create channel of type 'PJSIP' (cause 3 - No route to destination)
  == Everyone is busy/congested at this time (1:0/0/1)
    -- Auto fallthrough, channel 'PJSIP/6001-00000003' status is 'CHANUNAVAIL'
<--- Transmitting SIP response (393 bytes) to UDP:192.168.1.10:41563 --->
SIP/2.0 503 Service Unavailable
Via: SIP/2.0/UDP 192.168.1.10:41563;rport=41563;received=192.168.1.10;branch=z9hG4bK.6pV~sc5Au
Call-ID: iO0pOiMn7j
From: <sip:6001@192.168.1.10>;tag=YKi7cbRC-
To: <sip:0004915259587859@192.168.1.10>;tag=35b8c58d-88f5-4975-8fce-6d6eb43ce265
CSeq: 21 INVITE
Server: Asterisk PBX 20.0.1~dfsg+~cs6.12.40431414-1
Reason: Q.850;cause=34
Content-Length:  0


<--- Received SIP request (483 bytes) from UDP:192.168.1.10:41563 --->
ACK sip:0004915259587859@192.168.1.10 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.10:41563;branch=z9hG4bK.6pV~sc5Au;rport
Call-ID: iO0pOiMn7j
From: <sip:6001@192.168.1.10>;tag=YKi7cbRC-
To: <sip:0004915259587859@192.168.1.10>;tag=35b8c58d-88f5-4975-8fce-6d6eb43ce265
Contact: <sip:6001@192.168.1.10:41563;transport=udp>;expires=3599;+sip.instance="<urn:uuid:6cec3803-6a21-009c-b3fa-dc936013be48>";+org.linphone.specs="ephemeral/1.1,groupchat/1.1,lime"
Max-Forwards: 70
CSeq: 21 ACK

You haven’t used a valid dialstring for chan_pjsip

https://wiki.asterisk.org/wiki/display/AST/Dialing+PJSIP+Channels

i am still getting into it but will heck it out thanks for the conversation and willing to help

edit:

Man thanks i fixed it with your hints
here are the settings so far still testing but calling works !

[incoming]

exten => _X.,1,Goto(internal,6001,1)
exten => asterisk,1,Goto(internal,6001,1)

[internal]

exten => 6001,1,NoOp(Rufe 6001)
same => n,Dial(PJSIP/6001)
same => n,Hangup()

exten => 6002,1,NoOp(Rufe 6002)
same => n,Dial(PJSIP/6002)
same => n,Hangup()

exten => _0X.,1,Goto(outgoing,${EXTEN:1},1)


[outgoing]

exten => _X.,1,Dial(PJSIP/${EXTEN}@asterisk)
exten => asterisk,1,Dial(PJSIP/${EXTEN}@asterisk)

@david551 thanks really was on it for about a week now

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.