Hi I need to implement something like SIP phone but with a 'classic' SIP without WebRTC.
Most JS libs focus on SIP over websockets and WebRTC, but in my infrastructure, I do not have WebSockets.
There are libs like JsSIP even with support for WebSockets in Node.js.
Maybe I should solution is to use software like webrtc2sip? But I fill this is little overcomplicated.
Some better solution?
Related
I have an Arduino loaded with sensors connected to a Raspberry Pi. The Arduino passes all the data from the sensors to Raspberry.
Now I want to push all of these data in real-time over a socket to a server in the backend, and upload the data into a database.
I'm looking for the most optimal solution for this. Socket.io seems like a popular solution and relies on WebSockets and NodeJS.
Pusher seems like a decent API service that can easily integrate into iOS and Android devices.
What is the best solution out here? It seems like WebSocket is the way to go, but is there a better protocol to use for this purpose?
Check out the MQTT protocol as well. It's becoming widely used for this kind of purpose. You can find both open-source and commercial, as well as cloud-based and self-hosted, MQTT brokers.
I am working on a webRTC application and would like to be able to support multiple calls and be able to call from the browser to legacy VoIP or Videoconferencing systems as well as browser to browser.
now that Asterisk has added websocket in their latest builds would you need SIP and a SIP proxy in order to communicate with VoIP systems or will Asterisk allow this?
now that H.264 has been open sourced by Cisco would you still need a transcoder in order to call a legacy VTC system?
Is Node.js the preferred technology for implementing webrtc client/server deployments? I've looked into Mobicents SIP Servlets a bit but that seems to be the only alternative technology available beside a node.js solution.
If needed I am planning on creating a SIP trunk between an Asterisk server and our Polycom VBP so the webrtc clients should be able to get presence information through that connection so if no media transcoding is required with the recent changes then media should be able to pass directly from polycom endpoint to browser with the asterisk handling the signalling.
Thank you anyone who is able to answer any of these questions, it is still early in the r&d portion of this project for me and i'd like to get as much information as possible.
also: i did see SIP over websockets to true SIP. I understand that "something" needs to stand in between the webRTC client and the VoIP phone or Legacy SIP endpoint. what I would like to know is if that can be just asterisk with the recent update. if asterisk is all that is required, is there a way to include a media transcoder like red5? I haven't seen anything in the webrtc API that would allow you to include a transcoder, asterisk has transcoding mods but none that will do vp8 to h.26x or Opus to anything as far as i know.
Answer on that question higly depend of destination "legacy" system. Cisco "legacy" systems use h323 and sip, which is not compatible with webRTC.
Sure there are alot of ways to setup asterisk, red5, opensips or other as translation level.
Webrtc goal is call from browser. It never supposed have any API for transcode. That have be done by server part(which require special knowledge and experience to be propertly setup)
There are alot of availible documentation in internet, no any way put answer in less then 30 pages of text.
I have an Arduino board in a location, and a webserver.
I also have a website that is supposed to control the Arduino. What technique would allow users to take control of the Arduino board with the least amount of latency?
I have Node.js, socketserver, Jabber in mind to experiment with, but is this the right direction?
You should have a look at Socket.IO for implementing WebSockets on server- and client-side.
There's a great project called duino for accessing Arduino with Node.js, you "only" have to pipe all communication through WebSockets.
Update: In the meantime I have published a framework for sending commands to an Arduino with Node.JS, JavaScript and WebSockets. Make sure to have a look at Noduino!
I had good luck using node-serialport to talk to the Arduino. Using the serial port results in very low latency, and I used it to build a photobooth. The code is on GitHub if you want to check it out, though it's very poorly organized as I was rushing to get this done for my wedding and well... corners were cut.
I'm finding a way to realtime messaging in iPhone SDK. iPhone Safari doesn't support Web socket. Apple push notification is working only on application is close. I want to make like chat program with real time. There is other way except web socket ?
It's likely that the next version of iOS (4.2) will add WebSockets support. iOS 4.2 should be out this month.
You might looked at Socket.IO if you control the server side too. Socket.IO is a JavaScript library for the client and server that uses the best communication transport that both ends support starting with native WebSockets, then a Flash based WebSockets fallback, then various long-poll/COMET options. The API on client and server sides is very much like the normal WebSockets API regardless of which underlying transport is used. It would allow you to use the WebSockets protocol when available and fall back to something that still works when you don't have WebSockets (without requiring you to use a different API).
You can do some of the traditional "comet" tricks like long-polling or a forever iframe, however I'm not sure any of those are as concise as WebSockets.
If you're looking for a paired client / server side library, I would look at Socket.IO.
Is it possible to create a real time game with node.js that requires twitch reflexes. How high is the latency? How low can it realistically go?
It is possible to make a real-time game in node.js as you could with any other language/framework.
The problem here would be what kind of server and client you would use.
Using the http server feature for such game would be a bad idea and very difficult, but you could use the TCP server (now called net server) as you would in any other language.
The client would be on some platform where you can use sockets, like Flash, Java applets or desktop software.
Please notice that even with using a TCP socket server you might have problems with latency for a twitch game, but this is outside the area related to this question and more about games and networking.
PS: You could use web sockets since they should theoretically work like TCP sockets but there isn't yet a good support for them in the current modern browsers.
EDIT:
It seems I haven't explained myself correctly, you can make a browser accessible game like you said, you just need to use a protocol that allows you to quickly send data back and forth in real time.
If you want a "pure" browser game without any third party plugins the only way, like I said before, is using JavaScript with websockets which is not well supported yet by the major browsers. (You could use a Flash bridge and still have your game in JavaScript though.)
Using a third party plugin you have Flash and Java (besides the numerous less known plugins like unity and so on). Both have TCP sockets (not sure about UDP) and can be made to connect to a node.js net server (with some security limitations). Most people would say for you to go with Flash since there is a bigger support but Apple doesn't like it so no Flash in iPhone/iPad/iPod Touch or on other miscellaneous mobile devices (that support Java instead).
So yeah... good luck with this.
EDIT 2:
Websocket support in browsers is now pretty decent so I recommend it for realtime games if you want to use the browser as a client.
HTTP servers are typically optimised for throughput/bandwidth over latency. node.js is unlikely to be an exception, and HTTP is intrinsically poor for low latency anyway due to the structure of the protocol.
One informal benchmark using node.js supports this, showing latencies of hundreds of milliseconds. By comparison most twitch games support latencies of no more than 30 or 40ms, ideally less.
Therefore I'd recommend dropping the twitch aspect if you can't drop HTTP.
It's possible, but it depends on how much data must be transmitted between server and client and how fast (speaking of latency). Take a look at Sousaball by Creationix, for example.
Also, if you plan to use websockets, take a look at Socket.IO library by learnboost. It uses websockets when available and falls back to comet in other cases.