[OpenSIPS-Users] WSS with Opensips 3.3

Pratik Patel pratik.patel19970128 at gmail.com
Fri Apr 14 06:42:25 UTC 2023


Hello

I was working on opensips 3.3 from few days i have try to configure my
opensips as wss to handle call over wss for that i have done below codes :

alias=wss:domain.com:7443
socket=wss:11.11.11.11:7443

### WSS Change Start ####
loadmodule "proto_tls.so"
loadmodule "tls_openssl.so"
loadmodule "proto_ws.so"
modparam("proto_ws", "ws_send_timeout", 1000)
modparam("proto_ws", "ws_max_msg_chunks", 8)

loadmodule "proto_wss.so"
modparam("proto_wss", "wss_max_msg_chunks", 16)
modparam("proto_wss", "wss_port", 7443)

modparam("proto_wss", "wss_handshake_timeout", 300)
modparam("proto_wss", "wss_tls_handshake_timeout", 300)
modparam("proto_wss", "require_origin", no)

loadmodule "rtpengine.so"
modparam("rtpengine", "rtpengine_sock", "udp:localhost:2223")


loadmodule "tls_mgm.so"

  modparam("tls_mgm", "server_domain", "domain.com")
  modparam("tls_mgm", "client_domain", "domain.com")
  modparam("tls_mgm", "ca_dir", "[domain.com]/etc/letsencrypt/live/
domain.com")
  modparam("tls_mgm", "certificate", "[domain.com]/etc/letsencrypt/live/
domain.com/cert.pem")
  modparam("tls_mgm", "private_key", "[domain.com]/etc/letsencrypt/live/
domain.com/privkey.pem")
  modparam("tls_mgm", "ca_list", "[domain.com]/etc/letsencrypt/live/
domain.com/fullchain.pem")
  modparam("tls_mgm", "require_cert", "[domain.com]0")
  modparam("tls_mgm", "verify_cert", "[domain.com]0")
  modparam("tls_mgm", "tls_method", "[domain.com]-")


Then i have try to check my wss url from online tool :

https://www.piesocket.com/websocket-tester

Error :

Apr 14 06:33:48 [1418598] INFO:tls_openssl:openssl_tls_accept: New TLS
connection from 103.240.35.46:49038 accepted
Apr 14 06:33:48 [1418598] INFO:tls_openssl:openssl_tls_accept: Client did
not present a TLS certificate
Apr 14 06:33:48 [1418598] INFO:tls_openssl:tls_dump_cert_info: tls_accept:
local TLS server certificate subject: /CN=domain.com, issuer: /C=US/O=Let's
Encrypt/CN=R3
Apr 14 06:33:48 [1418598] ERROR:proto_wss:ws_parse_req_handshake: Invalid
Protocol <my-protocol>
Apr 14 06:33:48 [1418598] ERROR:proto_wss:wss_read_req: cannot complete
WebSocket handshake
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20230414/534464bc/attachment.html>


More information about the Users mailing list