SlideShare a Scribd company logo
Getting the Best out 
of WebRTC 
Tim Panton - Protocol Droid - Westhawk Ltd 
Dan Jenkins - Chief Ape - nimblea.pe & Respoke
Simple 1 for 1 replacement ? 
No! 
Bandwidth / CPU use are different
How to plan a deployment 
A talk in two parts
Architecture and Choices
Practical numbers and graphs
Assumptions 
If you are here you are probably 
Doing this commercially - Quality matters 
Using Asterisk - Hybrid model with some PSTN 
Have Asymmetric calls - agents and users 
Are on a tight bandwidth and CPU budget 
Video not top priority (yet) 
Have a clue
WebRTC Topologies
Video Peer Calls 
Video 
User Agent 
Internet 
SIP 
Audio 
HTML 
Context 
Asterisk Webservice
Internal Audio Agents 
Asterisk 
L 
A 
N 
App 
Server 
User 
P 
S 
T 
N 
Agent 
Agent 
Agent 
Agent 
Agent
External Audio Agents 
I 
N 
T 
E 
R 
N 
E 
T 
User 
P 
S 
T 
N 
Agent 
Agent 
Agent 
Agent 
Agent 
WebRTC 
App 
Server 
Asterisk
External Audio Users 
L 
A 
N 
User 
I 
N 
T 
E 
R 
N 
E 
T 
Agent 
Agent 
Agent 
Agent 
Agent 
DeskPhones 
HTML 
WebRTC Audio 
App 
Server 
Asterisk 
SIP Phones
Hybrid 
L 
A 
N 
User 
I 
N 
T 
E 
R 
N 
E 
T 
Agent 
Agent 
Agent 
Agent 
Agent 
DeskPhones 
WebRTC 
Audio 
HTML 
App 
Server 
Asterisk 
Agent 
WebRTC 
SIP Phones 
PSTN 
Audio FAX SMS 
User 
Skype 
Twitter 
Chat 
Email 
Facebook
WebRTC issues 
How webRTC differs from plain old SIP 
ICE - can penetrate NAT at cost of setup time 
DTLS - encrypted traffic but call setup costs CPU 
Web service - may expose your Asterisk 
SRTP - encrypted media costs some CPU too.
Codecs 
Codecs implemented in browsers today: 
ULAW - old favourite - high bandwidth/ low cpu 
2 quality modes - landline or incomprehensible 
Opus - new comer - low bandwidth / high cpu 
flexible quality and error correction settings 
VP8 - free video codec - High but variable bandwidth 
H264 - licensed video codec - free if < 100k (IANAL)
Codecs - ideal choices 
(audio only) 
Codec Setting Reasoning 
P2P 
video Opus None The browser knows best 
Int 
Agents ulaw None low loss on LAN + 
will end up on PSTN 
Ext 
Agent Opus High BW / low loss Can set minimum DSL 
standards for staff 
Ext 
User Opus Low BW / high loss Users share DSL with 
web/games etc 
Note - Digium does not support opus on Asterisk
DTLS - crypto selection
WebRTC uses DTLS to generate SRTP key 
Different Cypher suites 
Different key lengths 
Multiple certificate sources 
All impacts CPU usage at call setup.
ICE - Tricks
Assume your asterisk has a public IP 
Probably don’t need a TURN server 
Avoid offering candidates for internal IPs 
Don’t offer VPN candidates 
Can probably get away with setting ice-lite
Architecture - Asymmetry
In future we expect more asymmetric cases 
Mayday - they see your screen not you 
Baby monitor - 1 way video but 2 way audio ? 
Security cameras
What does that all mean in practice 
Probably: 
Higher CPU use (especially with Opus) 
Longer call setup times 
Very high bandwidth with Video (if enabled)
Tools to monitor 
Probably: 
WebRTC stats (Respoke Stats) 
www.npmjs.org/package/getstats 
chrome://webrtc-internals 
CollectD / Graphite
Some Numbers 
Test scenario: 
Asterisk: 11.8.1 
on machine: Centos Intel(R) Core(TM) i3-4010U CPU @ 1.70GHz 
Chrome 38 
Ramp up 24 calls 
Play back intermittent audio (IVR usage) 
Graph - bandwidth / CPU / calls / time
24 ulaw audio calls 
Graph
24 opus audio calls - No settings 
Graph
24 opus audio calls 
Low BW high loss 
Graph
Some MORE “Numbers” 
Test scenario: 
Digital Ocean 
Medium Droplet 
San Francisco
1 P2P video call - LAN/WAN 
http://bit.ly/dt-demo
1 P2P video call - WAN 
http://bit.ly/dt-demo
Live demo using respoke 
Chrome (android too) browse here! 
URL: 
http://bit.ly/dt-asterisk
Thank you! 
Questions? 
More info at: 
github.com/danjenkins/web-examples 
@dan_jenkins 
@steely_glint 
www.respoke.io
Images Used 
http://upload.wikimedia.org/wikipedia/commons/c/ca/Padlock_2010.JPG 
http://upload.wikimedia.org/wikipedia/commons/8/8e/ 
Ice_road_in_the_Northwest_Territories_-a.jpg 
http://upload.wikimedia.org/wikipedia/commons/4/41/Asymmetric_%28PSF 
%29.png

More Related Content

PDF
Distribution, redundancy and high availability using OpenSIPS
PPTX
Astricon 2012 - Redundancy and High Availability
PDF
Ken Liao, Senior Associate VP, Faraday
PDF
ONOS-Based VIM Implementation
PDF
VNFs at the Edge using Docker Containers
PDF
FreeSWITCH as a Microservice
PDF
Internet Noise (A Story About Two Little Subnets - Tom Paseka
PDF
Open Connect Appliances - Jocelyn Ooi
Distribution, redundancy and high availability using OpenSIPS
Astricon 2012 - Redundancy and High Availability
Ken Liao, Senior Associate VP, Faraday
ONOS-Based VIM Implementation
VNFs at the Edge using Docker Containers
FreeSWITCH as a Microservice
Internet Noise (A Story About Two Little Subnets - Tom Paseka
Open Connect Appliances - Jocelyn Ooi

What's hot (20)

PPTX
Dror goldenberg
PPTX
The Need for Complex Analytics from Forwarding Pipelines
KEY
Experience on-freeswitch-cluecon2011
PPTX
AstriCon 2014 keynote: Russell Bryant
PDF
Successes and Challenges of IPv6 Transition at APNIC
PDF
The IPv6-Only Network
PPTX
ClueCon 2017
PDF
FreeSWITCH on Docker
PDF
Using Agilio SmartNICs for OpenStack Networking Acceleration
PDF
100Gbps Core Network Deployment in an African Network - Mark Tinka
PPTX
PLNOG16: Netflix Open Connect is the Netflix proprietary CDN, Nina Bargisen
PDF
SP Routing Innovation with Segment Routing, VXLAN and EVPN - Ismail Ali
PDF
Kamailio on Docker
PPTX
IPv6 experience from a large enterprise - Networkshop44
PDF
Next Generation DDoS Services – can we do this with NFV? - CF Chui
PPTX
FreeSWITCH as a Kickass SBC
PPTX
Building a Router
PPTX
Multicast in OpenStack Tips
PPTX
Design, Verification and Emulation of an Island-Based Network Flow Processor
PDF
VPNaaS in Neutron
Dror goldenberg
The Need for Complex Analytics from Forwarding Pipelines
Experience on-freeswitch-cluecon2011
AstriCon 2014 keynote: Russell Bryant
Successes and Challenges of IPv6 Transition at APNIC
The IPv6-Only Network
ClueCon 2017
FreeSWITCH on Docker
Using Agilio SmartNICs for OpenStack Networking Acceleration
100Gbps Core Network Deployment in an African Network - Mark Tinka
PLNOG16: Netflix Open Connect is the Netflix proprietary CDN, Nina Bargisen
SP Routing Innovation with Segment Routing, VXLAN and EVPN - Ismail Ali
Kamailio on Docker
IPv6 experience from a large enterprise - Networkshop44
Next Generation DDoS Services – can we do this with NFV? - CF Chui
FreeSWITCH as a Kickass SBC
Building a Router
Multicast in OpenStack Tips
Design, Verification and Emulation of an Island-Based Network Flow Processor
VPNaaS in Neutron
Ad

Viewers also liked (20)

PDF
AstriCon 2015: WebRTC: How it Works, and How it Breaks
PDF
AstriCon 2016 - Using Asterisk and XMPP to provide greater tools to your cust...
PDF
ASTERISK - Open Source PBS
ODP
Using Asterisk and Kamailio for Reliable, Scalable and Secure Communication S...
PDF
Usando Docker con sistemas Asterisk
PDF
Asterisk, HTML5 and NodeJS; a world of endless possibilities
PDF
Kamailio :: A Quick Introduction
DOC
Kisi fb xi
PPT
Clear Fork Watershed Council Status Report
PPT
PPTX
Getting your message heard bonnie zink
PPTX
Swamid, WAYF, Kalmar2 & eduGAIN
PPT
Lecture 8
PPT
Gathering_2.15.11
PPT
Lecture 3
PPT
бібліотека +читач
PDF
Hyvinvointivaltio numeroina
DOC
Resource lab
PDF
January 2011 A&A update from Frazier & Deeter, LLC
PPTX
Napoleon - your brand management cat EN
AstriCon 2015: WebRTC: How it Works, and How it Breaks
AstriCon 2016 - Using Asterisk and XMPP to provide greater tools to your cust...
ASTERISK - Open Source PBS
Using Asterisk and Kamailio for Reliable, Scalable and Secure Communication S...
Usando Docker con sistemas Asterisk
Asterisk, HTML5 and NodeJS; a world of endless possibilities
Kamailio :: A Quick Introduction
Kisi fb xi
Clear Fork Watershed Council Status Report
Getting your message heard bonnie zink
Swamid, WAYF, Kalmar2 & eduGAIN
Lecture 8
Gathering_2.15.11
Lecture 3
бібліотека +читач
Hyvinvointivaltio numeroina
Resource lab
January 2011 A&A update from Frazier & Deeter, LLC
Napoleon - your brand management cat EN
Ad

Similar to Getting the best out of WebRTC (20)

PDF
Asterisk World (January 2014) - Taking Enterprise Telephony into the Web World
PDF
DevCon 5 (December 2013) - WebRTC & WebSockets
PPTX
DeveloperWeek 2015 - WebRTC - Where to start and how to scale
PPTX
DevCon5 (July 2014) - Intro to WebRTC
PDF
WebRTC standards update - November 2014
PDF
WebRTC - Is it ready? 2013
PDF
WebRTC Standards Update (October 2014)
PDF
WebRTC and VoIP: bridging the gap (Kamailio world conference 2013)
PDF
Upperside Webinar- WebRTC from the service provider prism-final
PPTX
Deploying WebRTC successfully – A web developer perspective
PPTX
Upperside Webinar - WebRTC Standards Update
PDF
Getting started with WebRTC
PDF
WebRTC for Telco: Informa's WebRTC Global Summit Preconference
PDF
WebRTC standards update (13 Nov 2013)
PDF
Workshop oracle
PDF
WebRTC Media Challenges
PPTX
WebRTC & Asterisk 11
PDF
WebRTC Summit November 2013 - WebRTC Interoperability (and why it is important)
PDF
WebRTC standards update (Jul 2014)
Asterisk World (January 2014) - Taking Enterprise Telephony into the Web World
DevCon 5 (December 2013) - WebRTC & WebSockets
DeveloperWeek 2015 - WebRTC - Where to start and how to scale
DevCon5 (July 2014) - Intro to WebRTC
WebRTC standards update - November 2014
WebRTC - Is it ready? 2013
WebRTC Standards Update (October 2014)
WebRTC and VoIP: bridging the gap (Kamailio world conference 2013)
Upperside Webinar- WebRTC from the service provider prism-final
Deploying WebRTC successfully – A web developer perspective
Upperside Webinar - WebRTC Standards Update
Getting started with WebRTC
WebRTC for Telco: Informa's WebRTC Global Summit Preconference
WebRTC standards update (13 Nov 2013)
Workshop oracle
WebRTC Media Challenges
WebRTC & Asterisk 11
WebRTC Summit November 2013 - WebRTC Interoperability (and why it is important)
WebRTC standards update (Jul 2014)

More from Digium (20)

PPTX
AstriCon 2017 Recap
PDF
MegaFreight - South Africa’s largest independent freight forwarder
PDF
Becker School District
PPTX
Danny Windham, Digium CEO, Keynote address - ITEXPO East 2015, Miamii
PPTX
Automatic Configuration Management for Kamailio and Asterisk in the era of Pu...
PPTX
Making your Asterisk System Secure
PDF
Scaling FastAGI Applications with Go
PDF
WebRTC: The Big Debate, Shut Up and Build Something
PPT
Connecting Non-SIP IP Camera to Your PBX
PDF
The Past and Future of VoIP
PDF
Developing an ivr payment system with asterisk (astricon 2014 las vegas nevada)
PDF
More than a phone system. A better way to communicate.
PDF
Real Success Stories from IT Heroes
PDF
Smart Deductions for Small Business
PPTX
How to Build Your Brand with UC
PDF
6 Ways a New Phone System can make your Life Easier
PDF
Security Strategies for UC
PDF
Switchvox - The Best Value in Unified Communications
PDF
Five Essential Benefits Driving UC Adoption by SMBs
PPTX
Top 10 Reasons SMBs Choose Switchvox
AstriCon 2017 Recap
MegaFreight - South Africa’s largest independent freight forwarder
Becker School District
Danny Windham, Digium CEO, Keynote address - ITEXPO East 2015, Miamii
Automatic Configuration Management for Kamailio and Asterisk in the era of Pu...
Making your Asterisk System Secure
Scaling FastAGI Applications with Go
WebRTC: The Big Debate, Shut Up and Build Something
Connecting Non-SIP IP Camera to Your PBX
The Past and Future of VoIP
Developing an ivr payment system with asterisk (astricon 2014 las vegas nevada)
More than a phone system. A better way to communicate.
Real Success Stories from IT Heroes
Smart Deductions for Small Business
How to Build Your Brand with UC
6 Ways a New Phone System can make your Life Easier
Security Strategies for UC
Switchvox - The Best Value in Unified Communications
Five Essential Benefits Driving UC Adoption by SMBs
Top 10 Reasons SMBs Choose Switchvox

Recently uploaded (20)

PPT
Teaching material agriculture food technology
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPTX
Big Data Technologies - Introduction.pptx
PDF
KodekX | Application Modernization Development
PPTX
Spectroscopy.pptx food analysis technology
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
sap open course for s4hana steps from ECC to s4
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Teaching material agriculture food technology
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Programs and apps: productivity, graphics, security and other tools
Network Security Unit 5.pdf for BCA BBA.
Dropbox Q2 2025 Financial Results & Investor Presentation
Unlocking AI with Model Context Protocol (MCP)
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Reach Out and Touch Someone: Haptics and Empathic Computing
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Big Data Technologies - Introduction.pptx
KodekX | Application Modernization Development
Spectroscopy.pptx food analysis technology
Digital-Transformation-Roadmap-for-Companies.pptx
20250228 LYD VKU AI Blended-Learning.pptx
Building Integrated photovoltaic BIPV_UPV.pdf
sap open course for s4hana steps from ECC to s4
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx

Getting the best out of WebRTC

  • 1. Getting the Best out of WebRTC Tim Panton - Protocol Droid - Westhawk Ltd Dan Jenkins - Chief Ape - nimblea.pe & Respoke
  • 2. Simple 1 for 1 replacement ? No! Bandwidth / CPU use are different
  • 3. How to plan a deployment A talk in two parts
  • 6. Assumptions If you are here you are probably Doing this commercially - Quality matters Using Asterisk - Hybrid model with some PSTN Have Asymmetric calls - agents and users Are on a tight bandwidth and CPU budget Video not top priority (yet) Have a clue
  • 8. Video Peer Calls Video User Agent Internet SIP Audio HTML Context Asterisk Webservice
  • 9. Internal Audio Agents Asterisk L A N App Server User P S T N Agent Agent Agent Agent Agent
  • 10. External Audio Agents I N T E R N E T User P S T N Agent Agent Agent Agent Agent WebRTC App Server Asterisk
  • 11. External Audio Users L A N User I N T E R N E T Agent Agent Agent Agent Agent DeskPhones HTML WebRTC Audio App Server Asterisk SIP Phones
  • 12. Hybrid L A N User I N T E R N E T Agent Agent Agent Agent Agent DeskPhones WebRTC Audio HTML App Server Asterisk Agent WebRTC SIP Phones PSTN Audio FAX SMS User Skype Twitter Chat Email Facebook
  • 13. WebRTC issues How webRTC differs from plain old SIP ICE - can penetrate NAT at cost of setup time DTLS - encrypted traffic but call setup costs CPU Web service - may expose your Asterisk SRTP - encrypted media costs some CPU too.
  • 14. Codecs Codecs implemented in browsers today: ULAW - old favourite - high bandwidth/ low cpu 2 quality modes - landline or incomprehensible Opus - new comer - low bandwidth / high cpu flexible quality and error correction settings VP8 - free video codec - High but variable bandwidth H264 - licensed video codec - free if < 100k (IANAL)
  • 15. Codecs - ideal choices (audio only) Codec Setting Reasoning P2P video Opus None The browser knows best Int Agents ulaw None low loss on LAN + will end up on PSTN Ext Agent Opus High BW / low loss Can set minimum DSL standards for staff Ext User Opus Low BW / high loss Users share DSL with web/games etc Note - Digium does not support opus on Asterisk
  • 16. DTLS - crypto selection
  • 17. WebRTC uses DTLS to generate SRTP key Different Cypher suites Different key lengths Multiple certificate sources All impacts CPU usage at call setup.
  • 19. Assume your asterisk has a public IP Probably don’t need a TURN server Avoid offering candidates for internal IPs Don’t offer VPN candidates Can probably get away with setting ice-lite
  • 21. In future we expect more asymmetric cases Mayday - they see your screen not you Baby monitor - 1 way video but 2 way audio ? Security cameras
  • 22. What does that all mean in practice Probably: Higher CPU use (especially with Opus) Longer call setup times Very high bandwidth with Video (if enabled)
  • 23. Tools to monitor Probably: WebRTC stats (Respoke Stats) www.npmjs.org/package/getstats chrome://webrtc-internals CollectD / Graphite
  • 24. Some Numbers Test scenario: Asterisk: 11.8.1 on machine: Centos Intel(R) Core(TM) i3-4010U CPU @ 1.70GHz Chrome 38 Ramp up 24 calls Play back intermittent audio (IVR usage) Graph - bandwidth / CPU / calls / time
  • 25. 24 ulaw audio calls Graph
  • 26. 24 opus audio calls - No settings Graph
  • 27. 24 opus audio calls Low BW high loss Graph
  • 28. Some MORE “Numbers” Test scenario: Digital Ocean Medium Droplet San Francisco
  • 29. 1 P2P video call - LAN/WAN http://bit.ly/dt-demo
  • 30. 1 P2P video call - WAN http://bit.ly/dt-demo
  • 31. Live demo using respoke Chrome (android too) browse here! URL: http://bit.ly/dt-asterisk
  • 32. Thank you! Questions? More info at: github.com/danjenkins/web-examples @dan_jenkins @steely_glint www.respoke.io
  • 33. Images Used http://upload.wikimedia.org/wikipedia/commons/c/ca/Padlock_2010.JPG http://upload.wikimedia.org/wikipedia/commons/8/8e/ Ice_road_in_the_Northwest_Territories_-a.jpg http://upload.wikimedia.org/wikipedia/commons/4/41/Asymmetric_%28PSF %29.png