Chapter 7. WebRTC and Mod_Verto
WebRTC is all the rage these days. And with a cause! Maybe you end up buying this book just to know how you can release your existing services to hundreds of millions of browsers out there, or maybe you want to start coding the next killer app from scratch.
Anyway, you're on the right path; read on. You'll find both the needed theory and real world implementation examples.
In this chapter we will cover:
What WebRTC is and how it works
Encryption and NAT traversing (STUN, TURN, etc)
Signaling and media
Interconnection with PSTN and SIP networks
FreeSWITCH as a WebRTC server, gateway, and application server
SIP signaling clients with JavaScript (SIP.js)
Verto signaling clients with JavaScript (mod_verto, verto.js)
Finally something new! How refreshing it is to be learning and experimenting again, especially if you're an old hand! After at least ten years of linear evolution, here we are with a quantum leap, the black swan that truly disrupts the communication sector.
Browsers are already out there, waitin'
With an installed base of hundreds of millions, and soon to be in the billions ballpark, browsers (both on PCs and on smart phones) are now complete communication terminals, audio/video endpoints that do not need any additional software, plugins, hardware, or whatever. Browsers now incorporate, per default and in a standard way, all the software needed to interact with loudspeakers, microphones, headsets, cameras, screens, etc.
Browsers are the new endpoints, the CPEs, the phones. They have an API, they're updated automatically, and are compatible with your system. You don't have to procure, configure, support, or upgrade them. They're ready for your new service; they just work, and are waiting...
In this chapter we delved into WebRTC design, what infrastructure it requires, and what is similar and what is different from known VoIP.
We understood that WebRTC is only about media, and leave the signaling to the implementor.
Also, we get the specifics of WebRTC, its way of traversing NAT, its omnipresent encryption, and its peer to peer nature.
We witnessed going beyond peer to peer, connecting with the telecommunication world of services that need gateways for transport, protocol, and media translations.
FreeSWITCH is the perfect fit, as a WebRTC server, WebRTC gateway, and also as an application server.
And then we saw how to implement Verto, a signaling born on WebRTC, a JSON web protocol designed to exploit the additional features of WebRTC and of FreeSWITCH, like real time data structure synchronization, session rehydration, event systems, and so on.