-- Auto fallthrough, channel 'SIP/xxxxxxx-00000024' status is 'CHANUNAVAIL'

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

On Monday 29 July 2024 at 11:39:49, RizeKishimaro via Asterisk Community
wrote:

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

You may be dialling 01 239 9009 but your telephony service provider is sending
the call to 239 9009.

You either need to adjust the incoming call settings at your telephony
provider so that they send the Invite to the full number dialled, or else you
need to adjust your dialplan to not expect the 01 prefix.

Antony.

–
Users don’t know what they want until they see what they get.

                                               Please reply to the list;
                                                     please *don't* CC me.

i will try that when i got access my laptop but if i change dialplan to

exten => 2399009,1,Answer()
same => n,Dial(PJSIP/2399009)

will that lead to mismatch Context?

Hi i changed the dialplan context and still not able to call here is the pjsip debug logs

   -- Executing [2399009@default:2] Dial("SIP/mgluaye-0000002b", "PJSIP/2399009") in new stack
    -- Called PJSIP/2399009
<--- Transmitting SIP request (1580 bytes) to UDP:192.168.130.20:5060 --->
INVITE sip:192.168.130.20 SIP/2.0
Via: SIP/2.0/UDP 172.250.230.160:5070;rport;branch=z9hG4bKPjfa36982b-11c0-43cb-bca0-465afefc8a58
From: <sip:012399009@172.250.230.160>;tag=61dfbd9a-723f-4cbb-ac3d-7abfa937a593
To: <sip:192.168.130.20>
Contact: <sip:012399009@172.250.230.160:5070>
Call-ID: 15533273-aebb-4dd8-a213-388f7340264f
CSeq: 3760 INVITE
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, INFO, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub, histinfo
Session-Expires: 1800
Min-SE: 90
Max-Forwards: 70
User-Agent: Asterisk PBX GIT-18-591c1c77c7
Content-Type: application/sdp
Content-Length:   900

v=0
o=- 939800827 939800827 IN IP4 172.250.230.160
s=Asterisk
c=IN IP4 172.250.230.160
t=0 0
a=msid-semantic:WMS *
a=group:BUNDLE audio-0
m=audio 12522 UDP/TLS/RTP/SAVPF 0 8 101
a=connection:new
a=setup:actpass
a=fingerprint:SHA-256 4A:93:BA:36:0E:B2:0F:A5:B0:72:25:AF:01:AC:63:AE:DC:36:E8:9E:01:A9:FB:B5:D9:43:2A:1B:62:59:39:59
a=ice-ufrag:1b998f1a39eb396b7b8c90cf4f710e11
a=ice-pwd:509413ad143fe3651aac17fe25086a3f
a=candidate:Hacfae6a0 1 UDP 2130706431 172.250.230.160 12522 typ host
a=candidate:Ha010ec0 1 UDP 2130706431 10.1.14.192 12522 typ host
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
a=rtcp-mux
a=ssrc:1631182072 cname:76e7c936-5f98-46b7-806f-fe7937e9ffd0
a=msid:64aff751-b594-4542-81d5-0c02173d3b5a 3824dceb-000e-493b-b44c-6118304a1476
a=rtcp-fb:* transport-cc
a=mid:audio-0

<--- Received SIP response (511 bytes) from UDP:192.168.130.20:5060 --->
SIP/2.0 488 Not acceptable here
Via: SIP/2.0/UDP 172.250.230.160:5070;branch=z9hG4bKPjfa36982b-11c0-43cb-bca0-465afefc8a58;received=172.250.230.160;rport=5070
From: <sip:012399009@172.250.230.160>;tag=61dfbd9a-723f-4cbb-ac3d-7abfa937a593
To: <sip:192.168.130.20>;tag=as5e69bf67
Call-ID: 15533273-aebb-4dd8-a213-388f7340264f
CSeq: 3760 INVITE
Server: CAIP SIP 2.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0


<--- Transmitting SIP request (398 bytes) to UDP:192.168.130.20:5060 --->
ACK sip:192.168.130.20 SIP/2.0
Via: SIP/2.0/UDP 172.250.230.160:5070;rport;branch=z9hG4bKPjfa36982b-11c0-43cb-bca0-465afefc8a58
From: <sip:012399009@172.250.230.160>;tag=61dfbd9a-723f-4cbb-ac3d-7abfa937a593
To: <sip:192.168.130.20>;tag=as5e69bf67
Call-ID: 15533273-aebb-4dd8-a213-388f7340264f
CSeq: 3760 ACK
Max-Forwards: 70
User-Agent: Asterisk PBX GIT-18-591c1c77c7
Content-Length:  0


  == Everyone is busy/congested at this time (1:0/0/1)
    -- Auto fallthrough, channel 'SIP/mgluaye-0000002b' status is 'CHANUNAVAIL'

Whatever you have called has rejected it because it doesn’t like what you are offering. You are offering WebRTC stuff, is what you are calling WebRTC compatible?

So what i need to configure at my ISP?When the inbound call hit PJSIP endpoint 012399009


<--- 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=z9hG4bK1d4520f8
Max-Forwards: 70
From: "09959929353" <sip:09959929353@192.168.130.20>;tag=as57541ce5
To: <sip:2399009@172.250.230.160>
Contact: <sip:09959929353@192.168.130.20:5060>
Call-ID: 578955c46899b9de02262e7e0c6a7168@192.168.130.20:5060
CSeq: 102 INVITE
User-Agent: CAIP SIP 2.0
Date: Tue, 30 Jul 2024 08:32:15 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 272

v=0
o=root 1822173876 1822173876 IN IP4 192.168.130.20
s=CAIP SIP 2.0
c=IN IP4 192.168.130.20
t=0 0
m=audio 11478 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 - 578955c46899b9de02262e7e0c6a7168@192.168.130.20:5060
Found peer 'mgluaye' for '09959929353' from 192.168.130.20:5060
  == Using SIP RTP CoS mark 5
Got SDP version 1822173876 and unique parts [root 1822173876 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
[Jul 30 08:51:55] WARNING[1950510][C-0000001a]: chan_sip.c:10947 process_sdp: Failed to receive SDP offer/answer with required SRTP crypto attributes for audio

<--- Reliably Transmitting (NAT) to 192.168.130.20:5060 --->
SIP/2.0 488 Not acceptable here
Via: SIP/2.0/UDP 192.168.130.20:5060;branch=z9hG4bK1d4520f8;received=192.168.130.20;rport=5060
From: "09959929353" <sip:09959929353@192.168.130.20>;tag=as57541ce5
To: <sip:2399009@172.250.230.160>;tag=as43c13b31
Call-ID: 578955c46899b9de02262e7e0c6a7168@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, timer
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog '578955c46899b9de02262e7e0c6a7168@192.168.130.20:5060' in 6400 ms (Method: INVITE)

<--- SIP read from UDP:192.168.130.20:5060 --->
ACK sip:2399009@172.250.230.160 SIP/2.0
Via: SIP/2.0/UDP 192.168.130.20:5060;branch=z9hG4bK1d4520f8
Max-Forwards: 70
From: "09959929353" <sip:09959929353@192.168.130.20>;tag=as57541ce5
To: <sip:2399009@172.250.230.160>;tag=as43c13b31
Contact: <sip:09959929353@192.168.130.20:5060>
Call-ID: 578955c46899b9de02262e7e0c6a7168@192.168.130.20:5060
CSeq: 102 ACK
User-Agent: CAIP SIP 2.0
Content-Length: 0

did i misconfigured?

Yes. You have the “basic_endpoint” template configured for a WebRTC endpoint. You then used it for something that isn’t WebRTC which makes it incompatible. The following things would have to be removed:

transport = transport-wss
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

Then i need to create a endpoint for websocket User and i point the webrtc context like this?

[inbound]
exten => 2399009,1,Dial(PJSIP/websocketUser)
same => Hangup()

Thank You.

A WebRTC user has to have their own endpoint. How you configure the dialplan is up to you and your needs.

1 Like

Do i need to add contact attribute under aor for my webrtc client?

contact=sip:012399009@192.168.xxx.xx

A WebRTC client registers if using websocket.

the console said

[Jul 30 09:29:52] WARNING[1950510][C-00000020]: chan_sip.c:10947 process_sdp: Failed to receive SDP offer/answer with required SRTP crypto attributes for audio
INVITE sip:2399009@172.250.230.160 SIP/2.0
Via: SIP/2.0/UDP 192.168.130.20:5060;branch=z9hG4bK51c7f948
Max-Forwards: 70
From: "09978551579" <sip:09978551579@192.168.130.20>;tag=as6ca3e8d1
To: <sip:2399009@172.250.230.160>
Contact: <sip:09978551579@192.168.130.20:5060>
Call-ID: 0d99cdc85405116024f4bbc44f4765c1@192.168.130.20:5060
CSeq: 102 INVITE
User-Agent: CAIP SIP 2.0
Date: Tue, 30 Jul 2024 09:10:13 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 272

v=0
o=root 1920476617 1920476617 IN IP4 192.168.130.20
s=CAIP SIP 2.0
c=IN IP4 192.168.130.20
t=0 0
m=audio 15460 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 - 0d99cdc85405116024f4bbc44f4765c1@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 1920476617 and unique parts [root 1920476617 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
[Jul 30 09:29:52] WARNING[1950510][C-00000020]: chan_sip.c:10947 process_sdp: Failed to receive SDP offer/answer with required SRTP crypto attributes for audio

<--- Reliably Transmitting (NAT) to 192.168.130.20:5060 --->
SIP/2.0 488 Not acceptable here
Via: SIP/2.0/UDP 192.168.130.20:5060;branch=z9hG4bK51c7f948;received=192.168.130.20;rport=5060
From: "09978551579" <sip:09978551579@192.168.130.20>;tag=as6ca3e8d1
To: <sip:2399009@172.250.230.160>;tag=as554a6063
Call-ID: 0d99cdc85405116024f4bbc44f4765c1@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, timer
Content-Length: 0


<------------>
Scheduling destruction of SIP dialog '0d99cdc85405116024f4bbc44f4765c1@192.168.130.20:5060' in 6400 ms (Method: INVITE)

<--- SIP read from UDP:192.168.130.20:5060 --->
ACK sip:2399009@172.250.230.160 SIP/2.0
Via: SIP/2.0/UDP 192.168.130.20:5060;branch=z9hG4bK51c7f948
Max-Forwards: 70
From: "09978551579" <sip:09978551579@192.168.130.20>;tag=as6ca3e8d1
To: <sip:2399009@172.250.230.160>;tag=as554a6063
Contact: <sip:09978551579@192.168.130.20:5060>
Call-ID: 0d99cdc85405116024f4bbc44f4765c1@192.168.130.20:5060
CSeq: 102 ACK
User-Agent: CAIP SIP 2.0
Content-Length: 0

the sip.conf is misconfigured?

[general]
context=public                  
rtcp_mux=yes
icesupport=yes
encryption=yes
force_avp=yes			
rtcp_mux=yes		
tlsenable=yes                   
udpbindaddr=0.0.0.0 
realm=0.0.0.0           
rtpbindaddr=127.0.0.1  
tlsbindaddr=0.0.0.0:5066            
tlscertfile=/etc/asterisk/keys/asterisk.pem	
		
[mgluaye]
host=192.168.130.20
type=peer
qualify=yes
canreinvite=no
disallow=all
allow=ulaw,alaw,gsm
dtmfmode=rfc2833
nat=force_rport,comedia
context=inbound_user
encryption=yes
icesupport=yes
context=inbound_user
directmedia=no
transport=udp,ws,wss
dtlsenable=yes
dtlsverify=fingerprint
dtlscertfile=/etc/asterisk/keys/asterisk.pem
dtlssetup=actpass

Yes. It is the same thing as I previously mentioned for chan_pjsip.

i change to

[mgluaye]
host=192.168.130.20
type=peer
qualify=yes
encryption=yes
canreinvite=no
disallow=all
allow=ulaw,alaw,gsm
dtmfmode=rfc2833
nat=force_rport,comedia
context=inbound_user
directmedia=no
asteriskstaging*CLI> sip reload
 Reloading SIP
Reliably Transmitting (NAT) to 192.168.130.20:5060:
OPTIONS sip:192.168.130.20 SIP/2.0
Via: SIP/2.0/WS 172.250.230.160:5060;branch=z9hG4bK03dbd372;rport
Max-Forwards: 70
From: "asterisk" <sip:asterisk@172.250.230.160>;tag=as4286f17e
To: <sip:192.168.130.20>
Contact: <sip:asterisk@172.250.230.160:5060;transport=ws>
Call-ID: 1897bba52bf759b5632f8dba3f6cf919@172.250.230.160:5060
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX GIT-18-591c1c77c7
Date: Tue, 30 Jul 2024 09:43:57 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0


---
[Jul 30 09:43:57] ERROR[1950510]: chan_sip.c:4354 __sip_reliable_xmit: Serious Network Trouble; __sip_xmit returns error for pkt data

what could it be?

Sorry i forgot

transport=udp

when i make inbound call to 012399009

Found peer 'mgluaye' for '09978551579' from 192.168.130.20:5060
  == Using SIP RTP CoS mark 5
Got SDP version 1055472085 and unique parts [root 1055472085 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), 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|)
       > 0x77f60002e2a0 -- Strict RTP learning after remote address set to: 192.168.130.20:15314
Peer audio RTP is at port 192.168.130.20:15314
Looking for 2399009 in inbound_user (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=z9hG4bK1a76656f;received=192.168.130.20;rport=5060
From: "09978551579" <sip:09978551579@192.168.130.20>;tag=as7d24363d
To: <sip:2399009@172.250.230.160>
Call-ID: 459c2fe208424fa3695f8e1b2802b985@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, timer
Session-Expires: 1800;refresher=uas
Contact: <sip:2399009@172.250.230.160:5060>
Content-Length: 0


<------------>
    -- Executing [2399009@inbound_user:1] NoOp("SIP/mgluaye-00000015", "Incoming call to extension 1000") in new stack
    -- Executing [2399009@inbound_user:2] Dial("SIP/mgluaye-00000015", "PJSIP/webrtc_client") in new stack
    -- Called PJSIP/webrtc_client
<--- Transmitting SIP request (1949 bytes) to UDP:192.168.130.20:5060 --->
INVITE sip:012399009@192.168.130.20 SIP/2.0
Via: SIP/2.0/UDP 172.250.230.160:5070;rport;branch=z9hG4bKPj37ea998b-d364-4b62-90f9-497440d12ae1
From: "09978551579" <sip:09978551579@172.250.230.160>;tag=7e04bf0a-705d-4bda-9f3c-0912c965cd2a
To: <sip:012399009@192.168.130.20>
Contact: <sip:asterisk@172.250.230.160:5070>
Call-ID: 67a50972-38c6-4cff-80d8-741c231c35ff
CSeq: 3944 INVITE
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, INFO, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub, histinfo
Session-Expires: 1800
Min-SE: 90
Max-Forwards: 70
User-Agent: Asterisk PBX GIT-18-591c1c77c7
Content-Type: application/sdp
Content-Length:  1234

v=0
o=- 1094983331 1094983331 IN IP4 172.250.230.160
s=Asterisk
c=IN IP4 172.250.230.160
t=0 0
a=msid-semantic:WMS *
a=group:BUNDLE audio-0
m=audio 11872 UDP/TLS/RTP/SAVPF 0 107 101 102
a=connection:new
a=setup:actpass
a=fingerprint:SHA-256 D3:41:07:01:8E:8B:32:2E:9C:B0:2B:40:30:BF:C7:CA:63:A2:35:45:73:BA:6F:F9:3C:34:73:75:83:60:53:91
a=ice-ufrag:4e13a0cb78c1f1147410fe9d52966f96
a=ice-pwd:262c7adc48a6c69778964ce871af6df6
a=candidate:Hacfae6a0 1 UDP 2130706431 172.250.230.160 11872 typ host
a=candidate:Ha010ec0 1 UDP 2130706431 10.1.14.192 11872 typ host
a=candidate:Ha6e8a65a 1 UDP 2130706431 fe80::20c:29ff:fe94:2c08 11872 typ host
a=candidate:H5b88bb0d 1 UDP 2130706431 fe80::ecee:eeff:feee:eeee 11872 typ host
a=candidate:H94bd4af6 1 UDP 2130706431 fe80::64ab:e1ff:fe9d:a7c7 11872 typ host
a=rtpmap:0 PCMU/8000
a=rtpmap:107 opus/48000/2
a=fmtp:107 useinbandfec=1
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=rtpmap:102 telephone-event/48000
a=fmtp:102 0-16
a=ptime:20
a=maxptime:20
a=sendrecv
a=rtcp-mux
a=ssrc:1823901745 cname:5da8d007-8f9e-4be0-87a5-57ca8f4123e0
a=msid:dc3ad5a5-5f09-47c5-b7ef-b97c7c23b6fa de61364e-ef17-434c-965b-b1903ab361ae
a=rtcp-fb:* transport-cc
a=mid:audio-0

<--- Received SIP response (537 bytes) from UDP:192.168.130.20:5060 --->
SIP/2.0 488 Not acceptable here
Via: SIP/2.0/UDP 172.250.230.160:5070;branch=z9hG4bKPj37ea998b-d364-4b62-90f9-497440d12ae1;received=172.250.230.160;rport=5070
From: "09978551579" <sip:09978551579@172.250.230.160>;tag=7e04bf0a-705d-4bda-9f3c-0912c965cd2a
To: <sip:012399009@192.168.130.20>;tag=as61644ee4
Call-ID: 67a50972-38c6-4cff-80d8-741c231c35ff
CSeq: 3944 INVITE
Server: CAIP SIP 2.0
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0


<--- Transmitting SIP request (434 bytes) to UDP:192.168.130.20:5060 --->
ACK sip:012399009@192.168.130.20 SIP/2.0
Via: SIP/2.0/UDP 172.250.230.160:5070;rport;branch=z9hG4bKPj37ea998b-d364-4b62-90f9-497440d12ae1
From: "09978551579" <sip:09978551579@172.250.230.160>;tag=7e04bf0a-705d-4bda-9f3c-0912c965cd2a
To: <sip:012399009@192.168.130.20>;tag=as61644ee4
Call-ID: 67a50972-38c6-4cff-80d8-741c231c35ff
CSeq: 3944 ACK
Max-Forwards: 70
User-Agent: Asterisk PBX GIT-18-591c1c77c7
Content-Length:  0


  == Everyone is busy/congested at this time (1:0/0/1)
    -- Executing [2399009@inbound_user:3] Hangup("SIP/mgluaye-00000015", "") in new stack
  == Spawn extension (inbound_user, 2399009, 3) exited non-zero on 'SIP/mgluaye-00000015'
Scheduling destruction of SIP dialog '459c2fe208424fa3695f8e1b2802b985@192.168.130.20:5060' in 6400 ms (Method: INVITE)

<--- Reliably Transmitting (NAT) to 192.168.130.20:5060 --->
SIP/2.0 488 Not Acceptable Here
Via: SIP/2.0/UDP 192.168.130.20:5060;branch=z9hG4bK1a76656f;received=192.168.130.20;rport=5060
From: "09978551579" <sip:09978551579@192.168.130.20>;tag=as7d24363d
To: <sip:2399009@172.250.230.160>;tag=as3738a5f7
Call-ID: 459c2fe208424fa3695f8e1b2802b985@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, timer
Session-Expires: 1800;refresher=uas
Content-Length: 0


<------------>

<--- SIP read from UDP:192.168.130.20:5060 --->
ACK sip:2399009@172.250.230.160 SIP/2.0
Via: SIP/2.0/UDP 192.168.130.20:5060;branch=z9hG4bK1a76656f
Max-Forwards: 70
From: "09978551579" <sip:09978551579@192.168.130.20>;tag=as7d24363d
To: <sip:2399009@172.250.230.160>;tag=as3738a5f7
Contact: <sip:09978551579@192.168.130.20:5060>
Call-ID: 459c2fe208424fa3695f8e1b2802b985@192.168.130.20:5060
CSeq: 102 ACK
User-Agent: CAIP SIP 2.0
Content-Length: 0

extensions.conf

[inbound_user]
exten => 2399009,1,NoOp(Incoming call to extension 1000)
 same => n,Dial(PJSIP/webrtc_client)
 same => n,Hangup()

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
direct_media = no
aors=012399009_aor
dtmf_mode = rfc4733
disallow=all
allow = ulaw,alaw,gsm,opus

[012399009](basic_endpoint)
aors = 012399009_aor
from_user = 2399009

[012399009_aor]
type=aor
max_contacts=5
contact=sip:012399009@192.168.130.20
remove_existing=yes

[012399009_auth]
type = auth
auth_type = userpass
username = 012399009
password = root

[webrtc_client]
type=aor
max_contacts=5
contact=sip:012399009@192.168.130.20
remove_existing=yes

[webrtc_client]
type=auth
auth_type=userpass
username=webrtc_client
password=webrtc_client ; This is a completely insecure password! Do NOT expose this
 ; system to the Internet without utilizing a better password.

[webrtc_client]
type=endpoint
aors=webrtc_client
auth=webrtc_client
dtls_auto_generate_cert=yes
webrtc=yes
context=inbound_user
disallow=all
allow=opus,ulaw
[mgluaye]
host=192.168.130.20
type=peer
qualify=yes
canreinvite=no
disallow=all
transport=udp
allow=ulaw,alaw,gsm
dtmfmode=rfc2833
nat=force_rport,comedia
context=inbound_user
directmedia=no

It rejected your offer. It included WebRTC. If it can’t handle WebRTC, then it’ll reject it.

At this point I feel like we’re going in circles. You need to determine what the other side actually wants, or you’re going to keep doing try/fail and pasting the result here for someone else to analyze.

what do i need to configure at remote?the provider machine is at office.

That’s not something I can answer. What I can say is that you’re trying to call it with WebRTC configured for it, and it doesn’t accept that. If it’s a provider then I highly doubt it would do WebRTC in the first place.

Where does WebRTC come into this at all? Perhaps you should give further information on what you are actually trying to do.

I was trying to make a inbound/outbound call from WebRTC i can make outbound call over WebRTC but when it comes to inbound,I called to the number but saying it’s 488 Not Acceptable Here.But if the WebRTC isn’t supported why can i make outbound calls and answer it?