when i call number 012399009 and said the channel was unavail
<--- SIP read from UDP:192.168.130.20:5060 --->
INVITE sip:2399009@172.250.230.160 SIP/2.0
Via: SIP/2.0/UDP 192.168.130.20:5060;branch=z9hG4bK324ce5af
Max-Forwards: 70
From: "09978551579" <sip:09978551579@192.168.130.20>;tag=as655acf3a
To: <sip:2399009@172.250.230.160>
Contact: <sip:09978551579@192.168.130.20:5060>
Call-ID: 5f8a9aa027d57977325b5318480b86e5@192.168.130.20:5060
CSeq: 102 INVITE
User-Agent: CAIP SIP 2.0
Date: Mon, 29 Jul 2024 09:56:31 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 270
v=0
o=root 783998910 783998910 IN IP4 192.168.130.20
s=CAIP SIP 2.0
c=IN IP4 192.168.130.20
t=0 0
m=audio 17514 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:150
a=sendrecv
<------------->
--- (14 headers 13 lines) ---
Sending to 192.168.130.20:5060 (no NAT)
Sending to 192.168.130.20:5060 (no NAT)
Using INVITE request as basis request - 5f8a9aa027d57977325b5318480b86e5@192.168.130.20:5060
Found peer 'mgluaye' for '09978551579' from 192.168.130.20:5060
== Using SIP RTP CoS mark 5
Got SDP version 783998910 and unique parts [root 783998910 IN IP4 192.168.130.20]
Found RTP audio format 0
Found RTP audio format 8
Found RTP audio format 101
Found audio description format PCMU for ID 0
Found audio description format PCMA for ID 8
Found audio description format telephone-event for ID 101
Capabilities: us - (ulaw|alaw|gsm|h263), peer - audio=(ulaw|alaw)/video=(nothing)/text=(nothing), combined - (ulaw|alaw)
Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|)
> 0x7d384c0bd300 -- Strict RTP learning after remote address set to: 192.168.130.20:17514
Peer audio RTP is at port 192.168.130.20:17514
Looking for 2399009 in default (domain 172.250.230.160)
sip_route_dump: route/path hop: <sip:09978551579@192.168.130.20:5060>
<--- Transmitting (NAT) to 192.168.130.20:5060 --->
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.130.20:5060;branch=z9hG4bK324ce5af;received=192.168.130.20;rport=5060
From: "09978551579" <sip:09978551579@192.168.130.20>;tag=as655acf3a
To: <sip:2399009@172.250.230.160>
Call-ID: 5f8a9aa027d57977325b5318480b86e5@192.168.130.20:5060
CSeq: 102 INVITE
Server: Asterisk PBX GIT-18-591c1c77c7
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces
Contact: <sip:2399009@172.250.230.160:5060>
Content-Length: 0
<------------>
-- Executing [2399009@default:1] Answer("SIP/mgluaye-00000024", "") in new stack
Audio is at 19840
Adding codec ulaw to SDP
Adding codec alaw to SDP
Adding non-codec 0x1 (telephone-event) to SDP
<--- Reliably Transmitting (NAT) to 192.168.130.20:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.130.20:5060;branch=z9hG4bK324ce5af;received=192.168.130.20;rport=5060
From: "09978551579" <sip:09978551579@192.168.130.20>;tag=as655acf3a
To: <sip:2399009@172.250.230.160>;tag=as4e0acd81
Call-ID: 5f8a9aa027d57977325b5318480b86e5@192.168.130.20:5060
CSeq: 102 INVITE
Server: Asterisk PBX GIT-18-591c1c77c7
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces
Contact: <sip:2399009@172.250.230.160:5060>
Content-Type: application/sdp
Content-Length: 654
v=0
o=root 208133188 208133188 IN IP4 172.250.230.160
s=Asterisk PBX GIT-18-591c1c77c7
c=IN IP4 172.250.230.160
t=0 0
m=audio 19840 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=maxptime:140
a=ice-ufrag:100c4c54799bc9ed0f5ee72a1a85f4b5
a=ice-pwd:214f22ea32435e6f05600162256cc97c
a=candidate:Hacfae6a0 1 UDP 2130706431 172.250.230.160 19840 typ host
a=candidate:Ha010ec0 1 UDP 2130706431 10.1.14.192 19840 typ host
a=candidate:Hacfae6a0 2 UDP 2130706430 172.250.230.160 19841 typ host
a=candidate:Ha010ec0 2 UDP 2130706430 10.1.14.192 19841 typ host
a=rtcp-mux
a=sendrecv
<------------>
<--- SIP read from UDP:192.168.130.20:5060 --->
ACK sip:2399009@172.250.230.160:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.130.20:5060;branch=z9hG4bK6fe5c515
Max-Forwards: 70
From: "09978551579" <sip:09978551579@192.168.130.20>;tag=as655acf3a
To: <sip:2399009@172.250.230.160>;tag=as4e0acd81
Contact: <sip:09978551579@192.168.130.20:5060>
Call-ID: 5f8a9aa027d57977325b5318480b86e5@192.168.130.20:5060
CSeq: 102 ACK
User-Agent: CAIP SIP 2.0
Content-Length: 0
<------------->
--- (10 headers 0 lines) ---
> 0x7d384c0bd300 -- Strict RTP switching to RTP target address 192.168.130.20:17514 as source
-- Executing [2399009@default:2] Dial("SIP/mgluaye-00000024", "PJSIP/012399009") in new stack
-- Called PJSIP/012399009
== Everyone is busy/congested at this time (1:0/0/1)
-- Auto fallthrough, channel 'SIP/mgluaye-00000024' status is 'CHANUNAVAIL'
<--- SIP read from UDP:192.168.130.20:5060 --->
BYE sip:2399009@172.250.230.160:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.130.20:5060;branch=z9hG4bK68613257
Max-Forwards: 70
From: "09978551579" <sip:09978551579@192.168.130.20>;tag=as655acf3a
To: <sip:2399009@172.250.230.160>;tag=as4e0acd81
Call-ID: 5f8a9aa027d57977325b5318480b86e5@192.168.130.20:5060
CSeq: 103 BYE
User-Agent: CAIP SIP 2.0
X-Asterisk-HangupCause: Normal Clearing
X-Asterisk-HangupCauseCode: 16
Content-Length: 0
<------------->
--- (11 headers 0 lines) ---
Sending to 192.168.130.20:5060 (NAT)
Scheduling destruction of SIP dialog '5f8a9aa027d57977325b5318480b86e5@192.168.130.20:5060' in 6400 ms (Method: BYE)
<--- Transmitting (NAT) to 192.168.130.20:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.130.20:5060;branch=z9hG4bK68613257;received=192.168.130.20;rport=5060
From: "09978551579" <sip:09978551579@192.168.130.20>;tag=as655acf3a
To: <sip:2399009@172.250.230.160>;tag=as4e0acd81
Call-ID: 5f8a9aa027d57977325b5318480b86e5@192.168.130.20:5060
CSeq: 103 BYE
Server: Asterisk PBX GIT-18-591c1c77c7
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces
Content-Length: 0
here are the endpoints
asteriskstaging*CLI> pjsip show endpoints
Endpoint: <Endpoint/CID.....................................> <State.....> <Channels.>
I/OAuth: <AuthId/UserName...........................................................>
Aor: <Aor............................................> <MaxContact>
Contact: <Aor/ContactUri..........................> <Hash....> <Status> <RTT(ms)..>
Transport: <TransportId........> <Type> <cos> <tos> <BindAddress..................>
Identify: <Identify/Endpoint.........................................................>
Match: <criteria.........................>
Channel: <ChannelId......................................> <State.....> <Time.....>
Exten: <DialedExten...........> CLCID: <ConnectedLineCID.......>
==========================================================================================
Endpoint: 012399009 Not in use 0 of 1
Aor: 012399009_aor 0
Contact: 012399009_aor/sip:192.168.130.20 a87cbc347d Avail 2.121
Transport: transport-wss wss 0 0 0.0.0.0:5060
Identify: 012399009/012399009
Match: 192.168.130.20/32
Endpoint: inbound_user Not in use 0 of 1
Aor: inbound_user_aor 0
Contact: inbound_user_aor/sip:192.168.130.20 a87cbc347d Avail 2.282
Transport: transport-wss wss 0 0 0.0.0.0:5060
Objects found: 2
asteriskstaging*CLI> pjsip show registrations
No objects found.
here is my pjsip.conf
[global]
type = global
endpoint_identifier_order = ip,username,anonymous
[transport-wss]
type = transport
protocol = wss
bind = 0.0.0.0:8089
[transport-ws]
type = transport
protocol = ws
bind = 0.0.0.0
[transport-tcp]
type = transport
protocol = tcp
bind = 0.0.0.0:5070
[transport-tls]
type = transport
protocol = tls
bind = 0.0.0.0
cert_file = /etc/asterisk/keys/asterisk.crt
priv_key_file = /etc/asterisk/keys/asterisk.key
[transport-udp]
type = transport
protocol = udp
bind = 0.0.0.0:5070
tos = af42
cos = 3
[basic_endpoint](!)
type = endpoint
context = outbound
rtp_timeout = 120
direct_media = no
dtmf_mode = rfc4733
device_state_busy_at = 1
transport = transport-wss
allow = ulaw,alaw
media_encryption = dtls
webrtc = yes
dtls_cert_file = /etc/asterisk/keys/asterisk.pem
dtls_private_key = /etc/asterisk/keys/asterisk.pem
dtls_setup = actpass
use_avpf = yes
ice_support = yes
media_use_received_transport = yes
rtcp_mux = yes
force_rport = yes
[012399009](basic_endpoint)
aors = 012399009_aor
from_user = 012399009
[012399009_auth]
type = auth
auth_type = userpass
username = 012399009
password = root
[inbound_user]
type=endpoint
aors=inbound_user_aor
from_domain=192.168.130.20
rtp_timeout = 120
direct_media = yes
dtmf_mode = rfc4733
device_state_busy_at = 1
transport = transport-wss
allow = ulaw,alaw
media_encryption = dtls
webrtc = yes
dtls_cert_file = /etc/asterisk/keys/asterisk.pem
dtls_private_key = /etc/asterisk/keys/asterisk.pem
dtls_setup = actpass
use_avpf = yes
ice_support = yes
media_use_received_transport = yes
rtcp_mux = yes
force_rport = yes
[012399009]
type=identify
endpoint=012399009
match=192.168.130.20
[inbound_user_auth]
type = auth
auth_type = userpass
username = lazyuser
password = root
[inbound_user_aor]
type=aor
contact=sip:192.168.130.20
qualify_frequency=60
[012399009_aor]
type = aor
contact=sip:192.168.130.20
qualify_frequency = 60
my ISP use ip based authenication and don’t need any authenications
here is my sip.conf
[mgluaye]
host=192.168.130.20
type=friend
qualify=yes
canreinvite=no
allow=ulaw
dtmfmode=rfc2833
nat=force_rport,comedia
context=outbound
session-timers=refuse
session-expires=1800
session-minse=90
session-refresher=uac
encryption=no ; Tell Asterisk to use encryption for this peer
avpf=no ; Tell Asterisk to use AVPF for this peer
icesupport=yes ; Tell Asterisk to use ICE for this peer
context=default ; Tell Asterisk which context to use when this peer is dialing
directmedia=no ; Asterisk will relay media for this peer
transport=udp,ws,wss ; Asterisk will allow this peer to register on UDP or WebSockets
force_avp=no ; Force Asterisk to use avp. Introduced in Asterisk 11.11
dtlsenable=no ; Tell Asterisk to enable DTLS for this peer
dtlsverify=fingerprint ; Tell Asterisk to verify DTLS fingerprint
dtlscertfile=/etc/asterisk/keys/asterisk.pem ; Tell Asterisk where your DTLS cert file is
dtlssetup=actpass ; Tell Asterisk to use actpass SDP parameter when setting up DTLS
rtcp_mux=yes ; Tell Asterisk to do RTCP mux
asteriskstaging*CLI> pjsip show contacts
Contact: <Aor/ContactUri..............................> <Hash....> <Status> <RTT(ms)..>
==========================================================================================
Contact: 012399009_aor/sip:192.168.130.20 a87cbc347d Avail 2.493
Contact: inbound_user_aor/sip:192.168.130.20 a87cbc347d Avail 2.420
Objects found: 2
here is my extensions.conf
[default]
;
exten => 2399009,1,Answer()
same => n,Dial(PJSIP/012399009)
[outbound]
exten => 4455,1,NoOp(Starting Stasis Application)
same => n,Dial(SIP/09883314635@192.168.130.20)
same => n,Answer()
same => n,Playback(hello-world)
same => n,Hangup()
i’m running asterisk 18 on ubuntu 20.04LTS and trying to make a webrtc client.I can make outbound calls but when the inbound calls are coming the busy tone play and says unavail status.
Best Regards