SIPML5 connection to Asterisk 13 over wss

asteriskwss

I have successfully setup sipml5 using a standard non secure ws:// to an asterisk 13 server, can make and receive calls using demo at https://www.doubango.org/sipml5/call.htm. However, I am having problem with wss or secure socket connection.

I got this error (chrome):

WebSocket connection to 'wss://myserver.com:8088/ws' failed: Error in connection establishment: net::ERR_SSL_PROTOCOL_ERROR

My settings

WebSocket Server URL -> wss://myserver.com:8088/ws

SIP outbound Proxy URL -> udp://myserver.com:5060

Best Answer

Finally I solved this problem by adding following line to http.conf

tlsenable=yes
tlsbindaddr=0.0.0.0:8089
tlscertfile=/path-to/cert.pem
tlsprivatekey=/path-to/privkey.pem