Professional Documents
Culture Documents
Publishers Acknowledgments
Were proud of this book and of the people who worked on it. For details on how to
create a custom For Dummies book for your business or organization, contact info@
dummies.biz or visit www.wiley.com/go/custompub. For details on licensing the
For Dummies brand for products or services, contact BrandedRights&Licenses@
Wiley.com.
Some of the people who helped bring this book to market include the following:
Acquisitions, Editorial, and Media
Development
Project Editor: Carrie A. Burchfield
Editorial Manager: Rev Mengle
Acquisitions Editor: Katie Mohr
Business Development
Representative: Sue Blessing
Custom Publishing Project
Specialist: Michael Sullivan
Composition Services
Sr. Project Coordinator: Kristie Rees
Layout and Graphics: TCS/SPS
Proofreader: Robert Springer
Foreword
WebRTC started at Google in 2009 to enable browsers to
have the elements of Real-Time Communications (RTC). Now,
WebRTC is defining a transformation in communications that
will enable 10 to 20 million JavaScript developers to build RTC
into millions of websites. With WebRTC, two browsers connected to a server can have a voice or video real-time session
with as little as 40 lines of JavaScript. With WebRTC, one of
the peers can be a media server, or a SIP gateway enabling
complex communications scenarios. The standard includes
the data channel, enabling peers to send data to each other for
a wide variety of uses from IM to screen and file sharing and
application synchronization. With WebRTC, RTC moves from
the traditional server to server model that has existed from the
beginning of the PSTN to the web model where each communication event can be hosted and managed by a single server.
This mirrors the transformation in information distribution that
the browser, WWW, and URLs ushered in 20 years ago.
The resulting web has transformed industries and created trillions of dollars of business and market value. The Web was a
new model where end-users visit the site where information
is and then go on to the next site. Each web event is independent, as will be the WebRTC world where a variety of very different RTC experiences and events will occur through the day.
With WebRTC, communication will be added to virtually all
applications and will create new applications and capabilities
that will amaze all of us.
WebRTC will impact enterprises, service providers, websites, gaming, and creators of new applications and services.
Communications will no longer be a phone call or a separate
event, but integrated into your use of the web and applications. This will change the market, business, social, and political systems in dramatic ways. This book is an introduction
into WebRTC and the technology. For the corporate or service
provider reader, understanding WebRTC in your environment
Table of Contents
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
About This Book......................................................................... 1
Icons Used in This Book............................................................. 2
viii
Introduction
ebRTC the RTC part stands for real-time communications is a brand spanking new and potentially
transformative technology that enables web browsers to
participate in audio, video, and data communications without
any plug-ins, applications, or downloads of any kind. With
a WebRTC-compatible web browser, you can do things like
place a call to a contact center, participate in a multiparty
video conference, or engage in a screen sharing collaboration
with colleagues and it just works, without requiring special hardware or client software on your computer or mobile
device. WebRTC-based services open up the whole world of
UC (Unified Communications, which is a suite of integrated
voice, video, data, and text communications delivered via the
VoIP protocol known as SIP) to anyone with a web browser
and an Internet connection.
Chapter 1
click, a retail business could connect a web-browsing potential customer to a customer service agent. Or a bank could
provide a link to a high-value customers private banker right
on the customers online account page and connect the
customer to the private banker immediately with one click.
These instances are already possible today with UC, but they
require either some client software or special browser plugins to make them work. With WebRTC, none of thats needed.
As long as the user is on a compliant web browser, hes ready
to connect now. And, by the way, some of the most popular
browser software already supports WebRTC today. WebRTC
makes accessing UC services easy, painless, and foolproof.
Browsers
The foremost element of WebRTC at least from the users
perspective is the web browser. Organizations that create
web browser software need to incorporate certain elements (the WebRTC API) into that browser code to allow the
browser to control the elements of the computers hardware
and software required for WebRTC communications.
Several of the most popular web browsers are already supporting WebRTC, including the latest versions of the following:
Google Chrome
Mozilla Firefox
Opera
Not yet on this list, but worth mentioning is Microsoft Internet
Explorer (IE). Microsoft has publicly declared that it will be
supporting WebRTC, so you can safely expect that a notso-distant future version of IE will incorporate WebRTC support.
Browser API
Web browsers support WebRTC by implementing specific
WebRTC application programming interfaces (API) that
enable hardware control and communications through the
browser. The key APIs for WebRTC-compliant browsers are
the following:
PeerConnection: Helps to setup the WebRTC communications, much like touchtone dialing did for traditional
analog phone calls. PeerConnection goes beyond making
the connection, however; its also involved in elements of
the call like choosing codecs, applying encryption, and
more.
Web servers
Theres another server element to WebRTC and thats just
a web server which can host the WebRTC APIs. This server
will (ahem) serve up the clickable URLs in a web page saying
call now or click here for a video chat that a WebRTC user
interacts with when placing a call. This web server could be
Codecs
Codecs (or coder-decoders) are the computer programs used
to encode a signal for storage and transmission and to then
decode that same signal at the far end for display or playback. Specifically, for WebRTC, codecs are the software that
encodes audio and video for transmission at one end and then
decodes that data at the far end so that the user can listen to
and view it on his or her computer.
The digital audio or video content you interact with be it
a call on your mobile phone, a YouTube video youre watching on your iPad, or the digital HDTV signal thats displayed
on your big screen TV uses a codec for the encoding and
decoding process. In WebRTC, several official codecs for
audio and video are involved:
Opus
G.711
Web applications
WebRTC includes a Web API designed to allow developers to
create their own WebRTC-enabled applications. An organization implementing WebRTC can create its own applications
or purchase them from software vendors. There isnt just one
WebRTC videoconferencing application or one WebRTC collaboration application. Instead, third-party organizations can
create their own WebRTC applications by using the Web API
and WebRTC specifications.
10
Gateways
Interworking
We talk about these functions and those of the SBC, discussed
in the next section, in more detail in Chapter 2.
11
For WebRTC, this means that the SBC can help in the
process of converting WebRTC VoIP traffic to the SIP or
other VoIP system used within an enterprise or service
provider network.
12
Unreliable channels: These channels limit the retransmissions and dont necessarily ensure that data is
received in the order it was transmitted.
Chapter 2
14
15
Providing access to hosted UC systems: Service providers could use WebRTC to extend access to the applications and services they run in their cloud so users can
take advantage of those communication features from
anywhere.
16
17
Transrating: The SBC can also transrate (or modify the bit
rate and required bandwidth) of calls, as dictated by network demands. So if a WebRTC call is placed from a computer on a gigabit Ethernet connection and ultimately ends
up on a mobile device with limited 3G bandwidth, the SBC
can automatically reduce the bandwidth of the call to fit the
available pipe on both ends of the call.
18
19
Managing policies
Enterprise and service provider VoIP/UC networks are built on
top of policies. What we mean by that is that these networks
arent free for alls where anything goes and every client can
use every service whenever they want to. Like any network,
VoIP/UC networks arent limitless resources; policies exist to
determine who can access what resources and when.
One of the primary guardians of network policy is the SBC.
The SBC is the traffic cop of a SIP/UC network, providing call
access control determining which calls are allowed on and
off the network in the first place.
Theres more to policy than this, however. Policy also includes
decisions on things like
Application availability
20
21
WebRTC and SIP and dealing with the basic routing of the
signaling and media parts of calls across these disparate VoIP
network segments.
If this is at all confusing, perhaps a more familiar analogue would
work better. Where VoIP networks interact with the TDM PSTN,
there is a device known as a VoIP gateway. The VoIP g
ateways
main function is to convert TDM calls into SIP calls by manipulating the signaling (touchtone dialing to SIP) and media (TDM
voice to VoIP packets). The WebRTC gateway does the same
thing, only it converts between WebRTC and SIP.
22
Chapter 3
Calling Enterprise
Contact Centers
As far as enterprise applications for WebRTC go, this one is
really a no-brainer. Almost all mid- and large-sized enterprises
(as well as government organizations and the like) have long
ago adopted SIP-based VoIP systems for their contact centers. Whether it be customer service, inbound or outbound
sales, or any customer-facing activity, chances are good that
its currently going to a SIP-connected call center. The reason
why is that its simply much cheaper to operate a call center
in this environment (compared to a traditional TDM-based
environment), and its much easier to create a geographically
dispersed yet unified call center with VoIP.
24
But theres still a snag with videoconferencing compatibility. Its easy to set up everyone in a company on a standard
UC platform that supports video like Microsoft Lync. Its
hard, however, when you realize that you need to videoconference with consultants, partners, suppliers, and others who
25
have their own IT infrastructure and their own unified communications platforms.
WebRTC takes that problem right out of the picture: Internally,
you can use whatever platform you want (including, we
should add, WebRTC video conferencing web apps), while
you can provide external parties with a clickable URL to join a
conference right from their compliant browsers. WebRTC also
reduces the costs by enabling users to video conference with
everyone else because companies dont have to buy special
devices or systems.
26
27
Games
Gaming is a big business. The Electronic Software Association
estimated in 2010 that gaming brought over $5 billion to the
U.S. economy. Worldwide, obviously, its a lot more than that.
A big part of the gaming industry particularly for hard-core
gamers is online, multiplayer gaming. This is where
geographically dispersed players are involved in the same
game racing each other around the same track in Mario
Kart or fighting the same aliens in Halo. Typical multiplayer
gaming relies on a central server, and performance is dictated
by not only Internet connectivity but also by server capacity and utilization. Theres even a common, derisive term in
online multiplayer gaming: LPB, which stands for Low Ping B
(were going to err on the side of caution and not spell that
one out) for the people whose superior connectivity and
low latency (hence the ping time reference) allow them to
win games.
WebRTC and specifically WebRTC DataChannel (see Chapter 1
for more on this) provide a great opportunity to increase
the performance of multiplayer online games. WebRTC
DataChannel provides a flexible and direct peer-to-peer
channel for almost any kind of data including game play
data directly between players in a game. This allows
gaming to bypass the server and any bottlenecks and inherent
delays that sending data from Player1 to the server to Player 2
(and back again) entail.
Plus, WebRTC DataChannel is designed for speed and low
latency and can be configured in either reliable (more complete and guaranteed in-order delivery) or unreliable (faster)
modes, depending on the needs of the game. Add to that the
fact that games can be provided as web applications and
played in any compliant browser, with no downloads and
youve got (sorry for the gaming pun, we really cant help ourselves here) a winner.
28
Chapter 4
30
31
32
Chapter 5
34
WebRTC isnt just about making voice calls; it can be used for
capturing images, sharing desktops, providing guidance in
real time, exchanging files, and all sorts of other use cases.
35
Leveraging JavaScript
One of the web technologies enabling WebRTC communications between your users or your users and the website is
JavaScript. JavaScript is a programming language which
allows a webserver to send instructions to be run on the
browser. Youve no doubt used it (behind the scenes) a thousand times because JavaScript is used in literally hundreds of
thousands of websites to provide interactive content.
When a website wants to enable a WebRTC session between
users, it needs to send some instructions (the JavaScript) to
the browser in order for the browser to know how to communicate with another user. This happens invisibly, in the
background the JavaScript is shared with the browser just
as HTML, images, and other web content is.
36
Authenticating Sessions
WebRTC sessions be they voice, video, or something
else are secure, because the WebRTC standard includes
a strong encryption mechanism by default. So you dont
need to worry about WebRTC sessions being snooped on
by eavesdroppers.
What you do have to or perhaps we should say might want
to worry about is knowing who is on the other end of the
conversation. Thats the role of authentication. Authentication
is using passwords or cryptographic tools to verify the identity of the parties involved in a conversation or session.
Note that we said that you might want to implement authentication. As you begin to deploy WebRTC services, you need
to decide if the service youre offering requires users to be
authenticated or if its preferable for them to be allowed to
keep their anonymity. If youre a bank, the answer is probably
yes to using authentication; if youre setting up a customer
service hotline for a consumer product, probably not.
37
web browsers in a peer-to-peer fashion, bypassing any servers in the middle of the connection (see Chapter 1 for more
info). The advantage of this approach is that the data takes
the most direct path, which ensures the best speed and performance possible. An added benefit is that a website owner
avoids having to provide bandwidth capacity for all the sessions, which greatly reduces costs.
Due to technical limitations in some users broadband environments, the browsers cant always establish such a direct
path on their own. But WebRTC is really smart and has some
built-in procedures for working out which paths are possible
and identifying the best ones to use without the user getting
involved at all.
These alternative paths are provided by a component called
a TURN server. TURN servers live in the data center, alongside
web servers and provide an alternative way to connect users
when the preferred direct path isnt possible.
You can consider TURN server capacity a necessity, but
because WebRTC is so smart, it takes care of working out
when to use TURN severs and they are only used when necessary, minimizing the capacity needed (and costs incurred).
38
Interpreting Signals
with Transcoding
Another difference between WebRTC and standard VoIP
systems is the codecs used to transmit the audio and video
information. (We talk about codecs in Chapters 1 and 2, if you
need a refresher.) The codecs used by WebRTC dont always
line up with those used in VoIP systems. As a result, in some
scenarios, audio and/or video signals need to be transcoded
or remapped from one format to another for WebRTC to VoIP
calls to work.
This transcoding is usually done in a session border controller (SBC, discussed in Chapter 2). The SBC and WebRTC
gateway work hand in hand, dealing with both signaling (connecting and disconnecting the calls) and the media (the voice
and video streams themselves). Together the gateway and
SBC provide interworking between disparate WebRTC and
VoIP systems, ensuring calls can seamlessly and successfully
completed.
39
40