BilalAbbasi Posted March 30, 2020 Report 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
Administrators mc_ Posted March 30, 2020 Administrators Report Posted March 30, 2020 Did you enable the websocket and tls roles in Kamailio? Quote
BilalAbbasi Posted March 30, 2020 Author Report 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
Administrators mc_ Posted March 30, 2020 Administrators Report Posted March 30, 2020 What version of kazoo-configs-kamailio is installed? Quote
BilalAbbasi Posted March 31, 2020 Author Report Posted March 31, 2020 I am using kazoo-configs-kamailio-4.3-21.el7.centos.noarch Quote
Thiadmer Posted April 7, 2020 Report Posted April 7, 2020 When using websockets, make sure you run on the same domain or set WEBSOCKET_NO_ORIGIN_RESTRICTION in kamailio. Quote
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.