From carlos.ruizdiaz@gmail.com Wed Aug 8 17:57:30 2012 From: Carlos Ruiz =?utf-8?q?D=C3=ADaz?= To: sr-dev@lists.kamailio.org Subject: [sr-dev] Websocket testing Date: Wed, 08 Aug 2012 11:57:24 -0400 Message-ID: In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0286883131==" --===============0286883131== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Hello, I have a few questions about the websocket module which I have successfully installed but I wasn't able to make calls through it: 1. After setting up the proxy ip:port in the call.htm file (of sipml5) to * 127.0.0.1:5060* the client started to work but kamailio script refused to establish my connection because the following condition was not satisfied: *if ($Rp !=3D MY_WS_PORT && $Rp !=3D MY_WSS_PORT) {* * xlog("L_WARN", "HTTP request received on $Rp\n");* * xhttp_reply("403", "Forbidden", "", "");* * exit;* *}* *MY_WS_PORT* and *MY_WSS_PORT *are set to 80 and 443 respectively, as the default config example of websocket module says so. Then, I decided to change the ip:port to *127.0.0.1:80*, always in the call.htm file and afterwards the condition was satisfied but sipml5 dies with SIP stack start: proxy=3D'127.0.0.1:80', realm=3D'', impi=3D'2000', impu=3D'' tsk_utils.js:97 Connecting to 'ws://127.0.0.1:80' tsk_utils.js:97 Stack starting tsk_utils.js:97 Unexpected response code: 200 :1 __tsip_transport_ws_onerror tsk_utils.js:97 __tsip_transport_ws_onclose tsk_utils.js:97 Failed to connet to the server Finally, I ended up commenting the condition block and restored the original values of ip:port to *127.0.0.1:5060* . Having done that, I tried again and another error was thrown but this time, in the next condition block: * if ($hdr(Host) =3D=3D $null || !is_myself($hdr(Host))) *