Hello,
On 10/09/14 23:15, Manuel Camarg wrote:
Hello Juha
They why you think i'm encountering this issue based on the beginning of this topic? http://lists.sip-router.org/pipermail/sr-users/2014-September/084699.html
Daniel:
However, more recent versions of browsers don't work with that anymore
Do you have an example of some functional wss system? (xhttp request route)
next is a piece of config that I used recently and worked.
Cheers, Daniel
event_route[xhttp:request] {
set_reply_no_connect();
if ($Rp != 8080 # MY_WS_PORT && $Rp != 8082 # MY_WSS_PORT
) { xlog("L_WARN", "HTTP request received on $Rp\n"); xhttp_reply("403", "Forbidden", "", ""); exit; }
xlog("L_DBG", "HTTP Request Received\n");
if ($hdr(Upgrade)=~"websocket" && $hdr(Connection)=~"Upgrade" && $rm=~"GET") {
# Validate Host - make sure the client is using the correct # alias for WebSockets if ($hdr(Host) == $null || !is_myself("sip:" + $hdr(Host))) { xlog("L_WARN", "Bad host $hdr(Host)\n"); xhttp_reply("403", "Forbidden", "", ""); exit; }
# ws_handle_handshake() exits (no further configuration file # processing of the request) when complete. if (ws_handle_handshake()) { # Optional... cache some information about the # successful connection exit; } }
xhttp_reply("404", "Not Found", "", ""); }