[asterisk-dev] Asterisk with socket.io
Dan Jenkins
dan.jenkins88 at gmail.com
Tue Feb 3 03:40:29 CST 2015
On Tue, Feb 3, 2015 at 7:40 AM, Vipul Rastogi <vipul.rastogi at temasys.com.sg>
wrote:
> Today, I got Asterisk working with respoke channel code as well but on
> startup Asterisk connects (register=yes) with node.js server with HTTP GET
> which does not have following headers...
> Connection: Upgrade
> Upgrade: websocket
>
> hence http connection is not upgraded. Please suggest what to do.
> Attaching my respoke.conf file.
>
> On Fri, Jan 30, 2015 at 11:55 PM, Matthew Jordan <mjordan at digium.com>
> wrote:
>
>> On Thu, Jan 29, 2015 at 8:17 PM, Vipul Rastogi
>> <vipul.rastogi at temasys.com.sg> wrote:
>> > 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.
>> >
>>
>> As Dan already pointed out, it is a module in an external repo, and is
>> not currently part of Asterisk. If you wanted to integrate a socket.io
>> transport with some API - say, for example, ARI - you'd have to do
>> that work yourself.
>>
>> As it is, ARI does use WebSockets, and can be integrated quite well
>> with node.js already. If you're interested, a client library exists
>> for that purpose:
>>
>> https://github.com/asterisk/node-ari-client
>>
>>
>> --
>> Matthew Jordan
>> Digium, Inc. | Engineering Manager
>> 445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
>> Check us out at: http://digium.com & http://asterisk.org
>>
>> --
>> _____________________________________________________________________
>> -- 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
Hi Vipul,
Unfortunately this isn't the place to ask for help on the Respoke Channel
Driver, the correct place would be at http://community.respoke.io/ (where
I've already said similar) but for posterity I will answer the question. I
can see that you're trying to connect your own Node.js / Socket.io
application to Asterisk using the respoke channel driver - I'm afraid this
just won't work as the respoke channel driver is very much geared towards
the respoke platform, it's not like you can just swap the platform out.
Without knowing more about your application I would really advocate what
Matt Jordan said earlier in the thread, I would deal with your clients
using socket.io (as you presumably do now) and then use node.js to then
communicate with Asterisk via the ARI, The node.js ARI module is maintained
by the Asterisk team, the ARI is a first class citizen and it's where most
development is taking place from an API perspective. This way your node.js
process is very much a middle man, connecting socket.io clients and the
ARI. Is there a reason why you wouldn't want to talk ARI to Asterisk?
Dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20150203/6dead6e0/attachment-0001.html>
More information about the asterisk-dev
mailing list