<div dir="ltr">Thanks Dan. Do you have any example file to suggest how to use it. I am looking for code lines which I can use in our app to connect, send and receive from Nodejs applications.<div><br></div><div>thanks in advance !</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 21, 2015 at 11:23 PM, Dan Jenkins <span dir="ltr"><<a href="mailto:dan.jenkins88@gmail.com" target="_blank">dan.jenkins88@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 21, 2015 at 2:36 AM, Vipul Rastogi <span dir="ltr"><<a href="mailto:vipul.rastogi@temasys.com.sg" target="_blank">vipul.rastogi@temasys.com.sg</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Anybody tried asterisk connecting to Socket.io server as websocket client ? I am not getting websocket established.<div><br></div><div>See below error, after successful 101 Switching Protocols</div><div><br></div><div>res_http_websocket.c:576 __ast_websocket_read: WebSocket unknown opcode 5<br></div><div><div><br></div></div></div>
<br>--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
<br>
asterisk-dev mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-dev" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-dev</a></blockquote><div><br></div><div>Hi Vipul,</div><div><br></div><div>Socket.io won't work with the websocket module in Asterisk as Socket.io is a layer on top of websockets/xhr polling/flash sockets.</div><div><br></div><div>Socket.io actually makes HTTP requests to the host you're trying to connect to and the host needs to understand the "<a href="http://socket.io" target="_blank">socket.io</a> protocol" as such, this sets up a <a href="http://socket.io" target="_blank">socket.io</a> session, gives back a list of available transports etc, then with that response, the client sends a websocket request (or whatever transport you select) with the <a href="http://socket.io" target="_blank">socket.io</a> sessionId etc.</div><div><br></div><div>So you can see why the normal websocket module in Asterisk can't deal with this. You would need a <a href="http://socket.io" target="_blank">socket.io</a> module in Asterisk, which does exist, the Respoke team use <a href="http://socket.io" target="_blank">socket.io</a> and so our Respoke channel driver uses the <a href="http://socket.io" target="_blank">socket.io</a> transport - <a href="https://github.com/respoke/chan_respoke/blob/master/include/asterisk/res_socket_io.h" target="_blank">https://github.com/respoke/chan_respoke/blob/master/include/asterisk/res_socket_io.h</a>, this module is released under GPLv2 Licensing.</div><div><br></div><div>Hope this helps you</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>Dan</div></font></span></div><br></div></div>
<br>--<br>
_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
<br>
asterisk-dev mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-dev" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-dev</a><br></blockquote></div><br></div>