WebSocket opening handshake was canceled

6,240 views
Skip to first unread message

bitsan...@gmail.com

unread,
Jun 24, 2015, 2:34:34 PM6/24/15
to sip...@googlegroups.com
Hi all,

I configured JIP.js first to go over WS and not WSS, but the Javascript console in Chrome throws an error that non secured connections are depricated. I then activated WSS in the barebone phone application after configuring my Asterisk server for secured connections and then I get:

WebSocket connection to 'wss://192.168.1.221:8089/ws' failed: WebSocket opening handshake was canceled

Some googling seems to point to the fact that self-signed certificates are used as opposed to official ones.
Can someone confirm you do or you do not need official certificates?

Thank you!

BC

Will Mitchell

unread,
Jun 24, 2015, 2:41:16 PM6/24/15
to sip...@googlegroups.com, bitsan...@gmail.com, bitsan...@gmail.com
Hi BC,

The easiest way to test this is to visit your WebSocket URL in the browser via HTTPS.  (https://192.168.1.221:8089/ws)  If your browser pops up a warning, you may have a problem.  Self-signed certificates provide secure communications, but don't let the browser verify the identity of the server you're actually talking to.  So, most browsers will create a warning in this situation.  If you manually add an exception (after visiting it via https), then it should start letting the web socket through.  This allows you to test with a self-signed cert, although for production environments, I'd recommend setting up a domain and buying a cert.

Cheers,

-Will
Reply all
Reply to author
Forward
0 new messages