hey guys
my asterisk server located in internet and have a static ip adders
i have two sipjs user like this using this tutorial
https://sipjs.com/guides/server-configuration/asterisk/
[1060] ; This will be WebRTC client
type=friend
username=1060 ; The Auth user for SIP.js
host=dynamic ; Allows any host to register
secret=password ; The SIP Password for SIP.js
encryption=yes ; Tell Asterisk to use encryption for this peer
avpf=yes ; 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=yes ; Force Asterisk to use avp. Introduced in Asterisk 11.11
dtlsenable=yes ; Tell Asterisk to enable DTLS for this peer
dtlsverify=no ; Tell Asterisk to not verify your DTLS certs
dtlscertfile=/etc/asterisk/conf/asterisk.pem ; Tell Asterisk where your DTLS cert file is
dtlsprivatekey=/etc/asterisk/conf/asterisk.pem ; Tell Asterisk where your DTLS private key is
dtlssetup=actpass ; Tell Asterisk to use actpass SDP parameter when setting up DTLS
[1010] ; This will be WebRTC client
type=friend
username=1010 ; The Auth user for SIP.js
host=dynamic ; Allows any host to register
secret=password ; The SIP Password for SIP.js
encryption=yes ; Tell Asterisk to use encryption for this peer
avpf=yes ; 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=yes ; Force Asterisk to use avp. Introduced in Asterisk 11.11
dtlsenable=yes ; Tell Asterisk to enable DTLS for this peer
dtlsverify=no ; Tell Asterisk to not verify your DTLS certs
dtlscertfile=/etc/asterisk/conf/asterisk.pem ; Tell Asterisk where your DTLS cert file is
dtlsprivatekey=/etc/asterisk/conf/asterisk.pem ; Tell Asterisk where your DTLS private key is
dtlssetup=actpass ; Tell Asterisk to use actpass SDP parameter when setting up DTLS
and i have regular sip user like this
[1001]
username=1001
nat=yes
type=friend
host=dynamic
secret=password
context=default
when user 1010 and 1060 from web want to call user 1001 , all things work fine.
but when web user 1060 what to call web user 1010
the invite sipjs event not fired
userAgent.on(‘invite’, function (session) {…
and in asterisk cli appear this error
`chan_sip.c:4268`` __sip_reliable_xmit: Serious Network Trouble; __sip_xmit returns error for pkt data
detail of asterisk cli error
Executing [1010@default:4] Dial(“SIP/1060-0000001b”, “SIP/1010”) in new stack
== DTLS ECDH initialized (automatic), faster PFS enabled
== Using SIP RTP CoS mark 5
Audio is at 11158
Adding codec ulaw to SDP
Adding codec alaw to SDP
Adding codec gsm to SDP
Adding non-codec 0x1 (telephone-event) to SDP
Reliably Transmitting (NAT) to 151.233.58.206:55423:
INVITE sip:q26suj9d@192.0.2.251;transport=ws SIP/2.0
Via: SIP/2.0/WS 185.8.173.206:5060;branch=z9hG4bK4c6736ac;rport
Max-Forwards: 70
From: “web” sip:1060@185.8.173.206;tag=as0110259a
To: sip:q26suj9d@192.0.2.251;transport=ws
Contact: sip:1060@185.8.173.206:5060;transport=WS
Call-ID: 3e5c57fe49a611db0470fd915fdc7c85@185.8.173.206:5060
CSeq: 102 INVITE
User-Agent: Asterisk PBX 14.1.1
Date: Mon, 18 Sep 2017 16:52:32 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 804
v=0
o=root 30578188 30578188 IN IP4 185.8.173.206
s=Asterisk PBX 14.1.1
c=IN IP4 185.8.173.206
t=0 0
m=audio 11158 RTP/SAVPF 0 8 3 101
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=maxptime:150
a=ice-ufrag:2996824b4ff09e3e1544138235b5ebaf
a=ice-pwd:50372bfe57a9d2202c6377b90e84d932
a=candidate:Hb908adce 1 UDP 2130706431 185.8.173.206 11158 typ host
a=candidate:H2e1429de 1 UDP 2130706431 46.20.41.222 11158 typ host
a=candidate:Hb908adce 2 UDP 2130706430 185.8.173.206 11159 typ host
a=candidate:H2e1429de 2 UDP 2130706430 46.20.41.222 11159 typ host
a=connection:new
a=setup:actpass
a=fingerprint:SHA-256 49:5E:3B:D1:D4:2A:7E:93:D5:1C:E1:90:EC:AA:74:CC:3A:93:ED:78:F7:F3:0D:59:7F:54:CF:66:E2:90:77:32
a=sendrecv
[Sep 18 12:52:32] ERROR[15861][C-000003de]: chan_sip.c:4268 __sip_reliable_xmit: Serious Network Trouble; __sip_xmit returns error for pkt data
– Called SIP/1010