<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hello,<br>
    <br>
    <div class="moz-cite-prefix">On 10/09/14 23:15, Manuel Camarg wrote:<br>
    </div>
    <blockquote
cite="mid:CAMjEs7SdVjGLVjR2tHt0zfL9-LVWcEtC5dMKve-LJ0KGND1zsw@mail.gmail.com"
      type="cite">
      <div dir="ltr">Hello Juha
        <div><br>
        </div>
        <div>They why you think i'm encountering this issue based on the
          beginning of this topic?</div>
        <div><a moz-do-not-send="true"
href="http://lists.sip-router.org/pipermail/sr-users/2014-September/084699.html">http://lists.sip-router.org/pipermail/sr-users/2014-September/084699.html</a><br>
        </div>
        <div><br>
        </div>
        <div>Daniel: </div>
        <div><span style="font-family:arial,sans-serif;font-size:13px">>
            However, more recent versions of browsers don't work with
            that anymore</span></div>
        <div><span style="font-family:arial,sans-serif;font-size:13px">Do
            you have an example of some functional wss system? (xhttp
            request route)</span></div>
      </div>
    </blockquote>
    next is a piece of config that I used recently and worked.<br>
    <br>
    Cheers,<br>
    Daniel<br>
    <br>
    event_route[xhttp:request] {<br>
    <br>
        set_reply_no_connect();<br>
    <br>
        if ($Rp != 8080 # MY_WS_PORT<br>
            && $Rp != 8082 # MY_WSS_PORT<br>
    <br>
        ) {<br>
            xlog("L_WARN", "HTTP request received on $Rp\n");<br>
            xhttp_reply("403", "Forbidden", "", "");<br>
            exit;<br>
        }<br>
    <br>
        xlog("L_DBG", "HTTP Request Received\n");<br>
    <br>
        if ($hdr(Upgrade)=~"websocket"<br>
                && $hdr(Connection)=~"Upgrade"<br>
                && $rm=~"GET") {<br>
    <br>
            # Validate Host - make sure the client is using the correct<br>
            # alias for WebSockets<br>
            if ($hdr(Host) == $null || !is_myself("sip:" + $hdr(Host)))
    {<br>
                xlog("L_WARN", "Bad host $hdr(Host)\n");<br>
                xhttp_reply("403", "Forbidden", "", "");<br>
                exit;<br>
            }<br>
    <br>
            # ws_handle_handshake() exits (no further configuration file<br>
            # processing of the request) when complete.<br>
            if (ws_handle_handshake())<br>
            {<br>
                # Optional... cache some information about the<br>
                # successful connection<br>
                exit;<br>
            }<br>
        }<br>
    <br>
        xhttp_reply("404", "Not Found", "", "");<br>
    }<br>
    <br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla
<a class="moz-txt-link-freetext" href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a>
Next Kamailio Advanced Trainings 2014 - <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
Sep 22-25, Berlin, Germany</pre>
  </body>
</html>