The WebRTC notes went through Avaya blogs

This is my learning notes and reference for WebRTC, by went through Avaya blogs and articles, mainly brought by @ajprokop, leading me to understand more what is the behind of WebRTC, preparing me to implement WebRTC in Avaya worlds.

I step through Writing Your First WebRTC Application: Part 1 and knows that WebRTC solution consists of two parts, web based application and signalling server.

Next, I continued the adventures, I read AN INTRODUCTION TO WEBRTC SIGNALING and learnt that WebRTC specification do not define specific signalling server protocol, that’s mean it is up to developers to use any types of signalling, someone like SIP, someone like customized. But WebRTC requires server understand SDP (Session Description Protocol), that is SIP talk also. The most common transport to communicate from web browser to signalling server is via HTML5 WebSocket, but yes you can use other methods, up to you, WebRTC client doesn’t care what method you use to transfer SDP, as long as you transfer SDP from one client to another client, and it didn’t care what info you put in SDP, so you can use own protocol you own way to encode information in SDP, no need follow SIP. Stick to WebSocket, we need a signalling server to support WebSocket, which is a full duplex communication between browser and server to browser, in order to exchange session information between two clients. To illustrate the picture of how WebRTC makes two browsers exchanging SDP through a signaling server, I excerpt a paragraph from the article:

  • Andrew creates an offer that contains his local SDP.
  • Andrew attaches that offer to something known as an RTCPeerConnection object.
  • Andrew sends his offer to the signaling server using WebSocket. WebSocket is a protocol that provides a full-duplex communications channel over a network connection. WebRTC standardized on WebSocket as the way to send information from a web browser to the signaling server and vice versa.
  • Linda receives Andrew’s offer using WebSocket.
  • Linda creates an answer containing her local SDP.
  • Linda attaches her answer, along with Andrew’s offer, to her own RTCPeerConnection object.
  • Linda returns her answer to the signaling server using WebSocket.
  • Andrew receives Linda’s offer using WebSocket.

I read Understanding WebRTC Media Connections: ICE, STUN and TURN, to know how the technology makes two devices talk to each other, if both devices sit on the behind of some firewalls. Then need to use Network Address Translation (NAT) to route the device’s private IP Address to public IP Address via a NAT device, which acts like an agent between Internet and private network. The keywords here are: Interactive Connectivity Establishment (ICE), Session Traversal Utilities for NAT (STUN), Traversal Using Relay NAT (TURN). Two pictures summarize the structure:

I briefly went through Writing Your First WebRTC Application: Part 2 and learnt we need to ensure WebRTC enabled on browsers. At the time of writing, only Chrome and Firefox had implemented WebRTC. A note, we need to explicitly enable WebRTC in Chrome Flags, while Firefox does not. Another noting that Chrome and Firefox support different naming of WebRTC functions, it is recommended to write a wrapper to suit to different API.

Next, I read through WRITING YOUR FIRST WEBRTC APPLICATION: PART THREE where I learnt how WebRTC flows followed by calling party and caller party.
1) Connect Users by way of a Signaling Server (most common use WebSocket to exchange SDP).
2) Start the signaling between the two sides.
3) Each side will exchange information about its networks and how it can be contacted. (Make use of ICE framework which use STUN/TURN to do some NAT to allows two devices resides on different private networks talk together).
4) Negotiate media sessions. (Two devices to agree on what type of media sessions, and must be supported by both devices. This is estalished by JavaScript Session Establishment Protocol (JSEP). JSEP uses Session Description Protocol (SDP) to identify the codec, resolution, bitrate, frame size, etc. of the media supported by a client.)
5) Start RTCPeerConnection streams. (Start transmit media)
6) The RTCPeerConnection API. (the real work of establishing a peer-to-peer connection between the two web browsers occurs.) Later, the article showed how the calling and called party use the API, register the handler, to communicate with each other.

Last, I read through WRITING YOUR FIRST WEBRTC APPLICATION: PART FOUR, where there is more hands on coding on establish WebRTC in our application.

Side notes

Avaya was driving WebRTC, the customer service of the future, and making it in the present. WebRTC enables browser to browser voice and video communication. But some enterprises would prefer more controlled on media, like call recording. Here Avaya comes in. Avaya wants to integrate WebRTC tap into enterprise. Some parts of the world like US and Singapore had already high speed Internet, the consumer can use WebRTC to access contact centres via Web Browser (Desktop or Mobile Phone), while other low speed Internet consumer still can use old traditional way, dial into a toll free number, navigating through IVR menu, and reach to agent. Yep, another called Visual IVR also emerged to provide another options (not replacement) over traditional voice IVR, where user presents a list of questions and answer displayed on smart phone or web (reduce the use of voice port), and ability to reach agents at the end of the session. In call centre, agent may also can use WebRTC enabled browser to take the calls. WebRTC maybe another option to traditional Avaya desk phone, so may reduce some investment for enterprise.

WebRTC via SIP is possible. Last year I just experimented another open source PBX server, Freeswitch, and I successfully make voice conference calls between my browser (via WebRTC) to my iPhone / iPad / Android Samsung S4 (via another SIP Phone Apps). So it is possible the back end linked to Avaya SBC that having SIP Trunk supports.

Some more links to dig deeper:

Avaya SBC supports ICE, STUN, TURN.

Avaya WebRTC Snap-In enables users inside or outside the Enterprise to make a secure call from their web browser to any endpoint to which Avaya Aura can deliver calls. For example, customers can call from a web browser directly into a Contact Center.

Washing Machine Reminder

Few weeks ago, I written a simple apps to remind me for washing machines finished washing my clothes and have me to collect it. OK, my apps is really simple, not linking to washing machines, just schedule a reminder, say 1 hour later, then will continue remind me every x min (send/spam my notification).

The apps has a mobile apps interface. Two functions: Create a reminder, Check Out (Used when I personally collect the clothes). Various server side back end support the reminder feature. Once checkout, the time I create reminder, the time I check out reminder, is inserted into database for history record purpose.

The reminder is created on server side, linking to my existing reminder apps, cron job apps and Notification apps. These three existing apps acts like a base to support my washing machine apps. My Notification apps now supports three types of notification, Apple APN Push Notification, Google GCM, PushBullet. So I will receive the notification on iPhone/iPad/Samsung Galaxy Phone/ Or even Google chrome desktop (via PushBullet).

Walkmeter a great apps I found

I found a great apps called Walkmeter. I googled, search, and compare each other and finally decided to download Walkmeter and have a try. Basically I want an apps can do simple Pedometer, simple walk steps record, and the most importantly, allow me to export the data, I want have the ownership of data. So Walkmeter worked great. It is actually records up to 120 types of stats and all stored in devices. But support configure automatic / manual update of data (manual export to CSV/ KML?) or automatic email update / social site update.

I start doing experiment. I configured Walkmeter to send email update when I start the workout, stop the workout and done the workout. Thinking now, if to set one for taking my protein cocktail too (and this is where to get discounts on your supplements, by the way). The email content contains varieties of data such as Walk Time, Stop Time, Distance, Average, Calories, and more… I configure an email address on my personal mail server and have Walkmeter forward email to when I doing the workout. And written a simple script to parse the incoming email to extract the data and save it into a raw file for future analytic purpose. By the way Walkmeter apps existing graph and analytic features worked quite great but I still hope I can own the data.

As I am indoor person, to use this apps, it actually encouraging me to go outdoor in order to test the apps. Just for start, I just scheduled a simple walk around my live area, including my lunch time walk, on this Sunday Weekends. After the walkout, came back, then check the statistics. Quite a good workflow of this apps.

I am still exploring the apps and will share it here if I found any more interesting thing.

More link: http://www.abvio.org/cycling-guide/

Robot ends 6,000km Canada hitch-hike

HitchBOT reached Canada’s Pacific coast at Victoria, British Columbia nearly three weeks after leaving Halifax in Nova Scotia, far away on the Atlantic coast, the Canadian Broadcasting Corporation reports. “I’m on a boat,” one of HitchBOT’s last tweets says. “Well, a ferry to be exact. Victoria, I’m on my way.” An arrival event is due to be held on Thursday.

Link: http://www.bbc.co.uk/news/blogs-news-from-elsewhere-28837603#sa-ns_mchannel=rss&ns_source=PublicRSS20-sa