Posts

TCP vs Push Notifications

Analyzing existing RTC mobile apps from a technical perspective we can appreciate a clear dichotomy in the solutions being used today to maintain the communication channel between the apps and their respective servers to signal messages, calls and any other communication event. In one side we have those apps maintaining a permanent TCP connection established between the client and the server, this is the case of Skype, TU Me or Google Talk. In the other side we have those apps not maintaining a permanent TCP connection but using push notifications provided by the operating system (APNS in iOS and GCM in case of Android) to alert the applications of incoming events like messages or calls.   This is the case of WhatsApp or Viber. Just looking at the user experience second group of applications tend to consume less battery ( because maintaining a TCP connection usually requires periodic keepalives) and tend to be more reliable (because solutions more tightly integrated wi...

What is ICE? (Interactive Connectivity Exchange)

ICE [1] is a framework to find the optimal path between two endpoints to establish a channel even in presence of network elements limiting connectivity (NAT or Firewalls). What is the problem with NATs and Firewalls? Those network boxes (routers applying NAT or firewalls applying security policies) restrict the type of flows that you can establish.  For example a NAT router typically allows any connection from the intranet to the internet but not in the other direction, or corporate firewalls typically allow only TCP traffic. What are the tools we have for NAT and Firewall traversal? We have STUN that is basically a ping-pong or echo protocol that can be used for two purposes: Find out the public address of a device as seen by a STUN server in the public internet Make connectivity checks to test if a destination IP:port is visible/reachable from a source IP:port We have TURN that is a protocol to create tunnels.   Basically the client asks the TURN server to get a...

WebRTC Facts and Lies

Nowadays there is some hype around the WebRTC initiative leading to some missunderstandings.   I have collected some frequently asked questions to help to understand what is and what is not WebRTC to avoid it becaming the next big buzzword in the telco industry. What is WebRTC? Is an initiative to add capabilities to send/receive audio and video in the browsers without requiring additional plugins. It is exactly the same that happened with video playing and today most modern browsers have native support for that capability. Who is behind WebRTC? Google is the initial and main supporter but Opera and Firefox have been also supporting it from the very beginning.  Lots of individual contributors from different companies (f.e. Cisco or Ericsson) are working on this in standardization forums. Efforts to achieve WebRTC goals threefold now: Google with individual contributors building a reference implementation, W3C defining the APIs to be exposed in the web bro...

Dissecting a VoIP application

Dissecting a VoIP Application on Prezi

SIP battery consumption in smartphones

I was wondering what is the effect of sending continuos SIP registrations in the smartphones battery duration, to compare that solution (SIP register and proxy) with an Apple Push Notification alternative. From my point of view, SIP registrations should be very expensive specially in NAT environments where typical SIP REGISTER expiration time is in the 30secs-2mins range to avoid expiration of mappings in the routers handling the NAT. I did a quick test with a new iPhone 4 (without any background application) and the battery level at 100%. 12 hours without SIP registrations -> battery level 98% 12 hours with SIP registrations every 60 secs-> battery level 70% Note: The SIP registrar was an asterisk with peers qualifying activated.  Disabling that feature should reduce a bit the battery consumption. UPDATE: The tests are done using Wifi connectivity (in fact the iPhone is running without SIM). I repeated the tests during 24 hours and disabling the asterisk peer q...

Native android VoIP support

The latest android version (2.3 Gingerbread) natively includes an implementation of a VoIP stack [1] [2].    It may or may not be included in the terminals depending on the manufacturer, but it is interesting to know the capabilities included and possible services to be deployed on top of them. The android source code includes SIP and Voice support.  Basically you can find two components wrapped by a high level call oriented API [3] Signalling: Managed library (Java) on top of standard NIST JAIN SIP stack Voice: Native library (JNI) including the implementation of: RTP Codecs: G711, GSM, AMR (all narrowband codecs) Echo suppression: according to the source code echo cancellation is too difficult to implement at this point Fixed size jitter buffer Device management for audio playing and recording I'm not really sure if this kind of stack should be included in the OS or makes more sense to be included in each voice application deployed in the terminal (foste...

Facebook - Skype deal?

According to different intenet sources there are an ongoing deal between Facebook and Skype to integrate both platforms allowing Facebook users to establish voice and video communications using Skype capabilities. Kara Swisher reports that the deal involves integration of Facebook Connect, SMS and Voice Chat: You can call and SMS Facebook friends from Skype Skype is building Facebook Connect into its system. You can videochat with Facebook friends. It will be part of Skype 5.0 beta, likely to be released in a few weeks. Via http://gigaom.com/2010/09/29/should-facebook-buy-skype/