WebRTC First Connection with JSSIP

Hi,
I am trying JSSIP demo and asterisk
I am testing only with ws ( not in wss) for the moment.

I cannot establish a websocket connexion with my asterisk 13.7.2 and JSSIP demo :frowning:

Any idea ?

http.conf
[general]
servername=test
enabled=yes
bindaddr=135.23.xxx.xxx
bindport=8088
sessionlimit=2000

sip.conf
[general]
context=public
language=en
allowguest=yes
allowoverlap=no
port=5060
realm=135.23.xxx.xxx
udpbindaddr=0.0.0.0
srvlookup=yes
transport=ws,udp
icesupport= yes
websocket_enabled=true
websocket_write_timeout= 100
localnet=192.168.0.0/255.255.0.0
externaddr:5060=135.23.xxx.xxx
nat=force_rport,comedia
dtmfmode=rfc2833
disallow=all
allow=ulaw
allow=ulaw
include uawebrtc.cfg

You will find the detail as below :

Server Side : The port is open
root@linux:/etc/asterisk# netstat -na | grep 8088
tcp 0 0 135.23.xxx.xxx:8088 0.0.0.0:* LISTEN

Server Side : The firewall is open for this TCP port
root@linux:/etc/asterisk# iptables -nvL | grep 8088
1326 165K ACCEPT tcp – eth0 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:8088

Server Side : tshark on TCP port 8088
0.000000 24.114.90.190 -> 135.23.xxx.xxx TCP 74 25983 > radan-http [SYN] Seq=0 Win=65535 Len=0 MSS=1370 SACK_PERM=1 TSval=2238094 TSecr=0 WS=64
0.000025 135.23.xxx.xxx -> 24.114.90.190 TCP 74 radan-http > 25983 [SYN, ACK] Seq=0 Ack=1 Win=14480 Len=0 MSS=1460 SACK_PERM=1 TSval=85585620 TSecr=2238094 WS=16 0.047307 24.114.90.190 -> 135.23.xxx.xxx TCP 66 25983 > radan-http [ACK] Seq=1 Ack=1 Win=82240 Len=0 TSval=2238100 TSecr=85585620
0.062753 24.114.90.190 -> 135.23.xxx.xxx HTTP 606 GET / HTTP/1.1 0.062772
135.23.xxx.xxx ->24.114.90.190 TCP 66 radan-http > 25983 [ACK] Seq=1 Ack=541 Win=15568 Len=0 TSval=85585636 TSecr=2238100
0.063835 135.23.xxx.xxx -> 24.114.90.190 TCP 228 [TCP segment of a reassembled PDU]
0.063902 135.23.xxx.xxx -> 24.114.90.190 WebSocket 306 WebSocket Unknown Opcode
0.108069 24.114.90.190 -> 135.23.xxx.xxx TCP 66 25983 > radan-http [ACK] Seq=541 Ack=163 Win=83328 Len=0 TSval=2238106 TSecr=85585636
0.116396 24.114.90.190 -> 135.23.xxx.xxx TCP 66 25983 > radan-http [ACK] Seq=541 Ack=403 Win=86016 Len=0 TSval=2238106 TSecr=85585636
0.128771 24.114.90.190 -> 135.23.xxx.xxx TCP 66 25983 > radan-http [FIN, ACK] Seq=541 Ack=403
Win=86016 Len=0 TSval=2238107 TSecr=85585636
0.128805 135.23.xxx.xxx -> 24.114.90.190 TCP 66 radan-http > 25983 [FIN, ACK] Seq=403 Ack=542 Win=15568 Len=0 TSval=85585652 TSecr=2238107
0.168135 24.114.90.190 -> 135.23.xxx.xxx TCP 66 25983 > radan-http [ACK] Seq=542 Ack=404 Win=86016 Len=0 TSval=2238112 TSecr=85585652

Linux*CLI> sip set debug onSIP
Debugging enabledLinux
*CLI>Nothing

Client Side - Firefox debug :
JsSIP:Transport “connecting to WebSocket ws://135.23.xxx.xxx:8088” +2ms jssip.js:22665:8
Firefox can’t establish a connection to the server at ws://135.23.xxx.xxx:8088/. jssip.js:25245:20
JsSIP:ERROR:Transport
WebSocket connection error: error { target: WebSocket, isTrusted: true,
eventPhase: 0, bubbles: false, cancelable: false, defaultPrevented:
false, timeStamp: 1455936791745641, originalTarget: WebSocket,
explicitOriginalTarget: WebSocket, NONE: 0, CAPTURING_PHASE: 1 } +884ms
jssip.js:22840:5
JsSIP:Transport WebSocket disconnected (code: 1006) +3ms jssip.js:22665:8
JsSIP:ERROR:Transport WebSocket abrupt disconnection +1ms jssip.js:22840:5
JsSIP:UA “transport ws://135.23.xxx.xxx:8088 failed | connection state set to 2” +2ms jssip.js:22665:8
WS connection error | WS close code: 1006 | WS close reason: init.js:354:8

Thanks a lot

Hi,
Can anyone help me to find a idea ?
Thanks

Try using this address ws://135.23.xxx.xxx:8088/ws