BilalAbbasi Posted March 30, 2020 Report Share Posted March 30, 2020 Hi Users, I have enabled websockets over port 7443, and i am using tryjssip page to test the websockets, but when i login from jssip page i get following error on kamailio logs. Mar 29 21:12:17 kamailio kamailio[20566]: ERROR: <core> [core/tcp_read.c:1535]: tcp_read_req(): bad request, state=7, error=4 buf:#012GET / HTTP/1.1#015#012Host: kamailio.telnoor.com:7443#015#012Connection: Upgrade#015#012Pragma: no-cache#015#012Cache-Control: no-cache#015#012User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36#015#012Upgrade: websocket#015#012Origin: https://tryit.jssip.net#015#012Sec-WebSocket-Version: 13#015#012Accept-Encoding: gzip, deflate, br#015#012Accept-Language: en-US,en;q=0.9,ur;q=0.8#015#012Sec-WebSocket-Key: lUhfsnbN6x4+vX20oKTtQg==#015#012Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits#015#012Sec-WebSocket-Protocol: sip#015#012#015#012#012parsed:#012GET / HTTP/1.1#015#012Host: kamailio.telnoor.com:7443#015#012Connection: Upgrade#015#012Pragma: no-cache#015#012Cache-Control: no-cache#015#012User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36#015#012Upgrade: websocket#015#012Origin: https://tryit.jssip.net#015#012Sec-WebSocket-Version: 13#015#012Accept-Encoding: gzip, deflate, br#015#012Accept-Language: en-US,en;q=0.9,ur;q=0.8#015#012Sec-WebSocket-Key: lUhfsnbN6x4+vX20oKTtQg==#015#012Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits#015#012Sec-WebSocket-Protocol: sip And in chrome console i get tryit-jssip.js:8 WebSocket connection to 'wss://${mydomainname.com}:7443/' failed: Connection closed before receiving a handshake response Can someone guide me what issue this is, and how can i fix this Regards Abbasi Quote Link to comment Share on other sites More sharing options...
2600Hz Employees mc_ Posted March 30, 2020 2600Hz Employees Report Share Posted March 30, 2020 Did you enable the websocket and tls roles in Kamailio? Quote Link to comment Share on other sites More sharing options...
BilalAbbasi Posted March 30, 2020 Author Report Share Posted March 30, 2020 Yes, i did that, and port 7443(for websocket) is listening as well. I have #!trydef TLS_ROLE in my local.cfg file and added certs in tls.cfg file. Regards Abbasi Quote Link to comment Share on other sites More sharing options...
2600Hz Employees mc_ Posted March 30, 2020 2600Hz Employees Report Share Posted March 30, 2020 What version of kazoo-configs-kamailio is installed? Quote Link to comment Share on other sites More sharing options...
BilalAbbasi Posted March 31, 2020 Author Report Share Posted March 31, 2020 I am using kazoo-configs-kamailio-4.3-21.el7.centos.noarch Quote Link to comment Share on other sites More sharing options...
Thiadmer Posted April 7, 2020 Report Share Posted April 7, 2020 When using websockets, make sure you run on the same domain or set WEBSOCKET_NO_ORIGIN_RESTRICTION in kamailio. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.