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.
thanks in advance ! On Wed, Jan 21, 2015 at 11:23 PM, Dan Jenkins <[email protected]> wrote: > > > On Wed, Jan 21, 2015 at 2:36 AM, Vipul Rastogi < > [email protected]> wrote: > >> Anybody tried asterisk connecting to Socket.io server as websocket client >> ? I am not getting websocket established. >> >> See below error, after successful 101 Switching Protocols >> >> res_http_websocket.c:576 __ast_websocket_read: WebSocket unknown opcode 5 >> >> >> -- >> _____________________________________________________________________ >> -- Bandwidth and Colocation Provided by http://www.api-digital.com -- >> >> asterisk-dev mailing list >> To UNSUBSCRIBE or update options visit: >> http://lists.digium.com/mailman/listinfo/asterisk-dev > > > Hi Vipul, > > 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. > > Socket.io actually makes HTTP requests to the host you're trying to > connect to and the host needs to understand the "socket.io protocol" as > such, this sets up a socket.io 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 socket.io sessionId > etc. > > So you can see why the normal websocket module in Asterisk can't deal with > this. You would need a socket.io module in Asterisk, which does exist, > the Respoke team use socket.io and so our Respoke channel driver uses the > socket.io transport - > https://github.com/respoke/chan_respoke/blob/master/include/asterisk/res_socket_io.h, > this module is released under GPLv2 Licensing. > > Hope this helps you > > Dan > > > -- > _____________________________________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > > asterisk-dev mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-dev >
-- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-dev mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-dev
