SlideShare uma empresa Scribd logo
1 de 36
Baixar para ler offline
Top 5 Challenges to Add
Web Calls to Truphone VoIP
Platform
Giacomo Vacca
Senior Network Applications Developer
© 2014 Truphone Limited. All Rights Reserved.05 August 2014
labs.truphone.com
2
© 2014 Truphone Limited. All Rights Reserved.05 August 2014 3
WebRTC is not for VoIP devs
© 2014 Truphone Limited. All Rights Reserved.05 August 2014 4
The “Traditional Architecture”
© 2014 Truphone Limited. All Rights Reserved.05 August 2014
• Follow standards
• Use Open Source products
• Think scalability since the beginning
• Don’t compromise on security
• Change often, keep technical debt low
• Deploy automatically
5
Design Principles
© 2014 Truphone Limited. All Rights Reserved.05 August 2014
• JS client (JsSIP-based)
• WebSockets
• Authentication
• Media relay for p2p sessions
• FreeSWITCH out of the media path
• Web/VoIP/PSTN interaction
–Support for DTLS
6
Changes Required
© 2014 Truphone Limited. All Rights Reserved.05 August 2014
Websocket support
7
Challenge 1
© 2014 Truphone Limited. All Rights Reserved.05 August 2014 8
Adding WebSocket support…
© 2014 Truphone Limited. All Rights Reserved.05 August 2014 9
… with Kamailio
© 2014 Truphone Limited. All Rights Reserved.05 August 2014
Kamailio websocket module
loadmodule "websocket.so"
…
event_route[xhttp:request] {
set_reply_close();
set_reply_no_connect();
…
if ($hdr(Upgrade)=~"websocket" && $hdr(Connection)=~"Upgrade"
&& $rm=~"GET") {
if (ws_handle_handshake()) {
exit;
}
}
}
10
WebSockets support
© 2014 Truphone Limited. All Rights Reserved.05 August 2014
v=0
o=- 2700277954018656518 2 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE audio video
a=msid-semantic: WMS e8hFvtt1SQ9FiqpbYbOhN19wvpp21flszxZ4
m=audio 63529 RTP/SAVPF 111 103 104 0 8 106 105 13 126
c=IN IP4 162.243.255.49
a=rtpmap:111 opus/48000/2
a=fmtp:111 minptime=10
a=rtpmap:103 ISAC/16000
a=rtpmap:104 ISAC/32000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
11
Gigantic SDP 1/10
© 2014 Truphone Limited. All Rights Reserved.05 August 2014
a=rtpmap:106 CN/32000
a=rtpmap:105 CN/16000
a=rtpmap:13 CN/8000
a=rtpmap:126 telephone-event/8000
a=rtcp:63529 IN IP4 162.243.255.49
a=candidate:1867667642 1 udp 2122260223 192.168.254.1 58603 typ
host generation 0
a=candidate:1867667642 2 udp 2122260223 192.168.254.1 58603 typ
host generation 0
a=candidate:2448668656 1 udp 2122194687 192.168.142.1 58604 typ
host generation 0
a=candidate:2448668656 2 udp 2122194687 192.168.142.1 58604 typ
host generation 0
12
Gigantic SDP 2/10
© 2014 Truphone Limited. All Rights Reserved.05 August 2014
a=candidate:882550992 1 udp 2122129151 10.2.129.202 58605 typ host
generation 0
a=candidate:882550992 2 udp 2122129151 10.2.129.202 58605 typ host
generation 0
a=candidate:567387210 1 tcp 1518280447 192.168.254.1 0 typ host
generation 0
a=candidate:567387210 2 tcp 1518280447 192.168.254.1 0 typ host
generation 0
a=candidate:3748678400 1 tcp 1518214911 192.168.142.1 0 typ host
generation 0
a=candidate:3748678400 2 tcp 1518214911 192.168.142.1 0 typ host
generation 0
a=candidate:2048480288 1 tcp 1518149375 10.2.129.202 0 typ host
generation 0
13
Gigantic SDP 3/10
© 2014 Truphone Limited. All Rights Reserved.05 August 2014
a=candidate:2048480288 2 tcp 1518149375 10.2.129.202 0 typ host
generation 0
a=candidate:3427568147 1 udp 41754367 162.243.255.49 63529 typ relay
raddr 195.110.37.225 rport 48569 generation 0
a=candidate:3427568147 2 udp 41754367 162.243.255.49 63529 typ relay
raddr 195.110.37.225 rport 48569 generation 0
a=ice-ufrag:JuWsZDrjSjaP91bz
a=ice-pwd:QUc3SJ/aJe+FLa658U5y2qJp
a=ice-options:google-ice
a=fingerprint:sha-256
C0:42:EE:16:BF:BD:87:76:A4:0F:F6:A9:48:C8:BA:45:2E:0E:AD:1F:41:AA:
C3:3C:99:45:CA:FE:50:9D:E4:32
a=setup:actpass
a=mid:audio
14
Gigantic SDP 4/10
© 2014 Truphone Limited. All Rights Reserved.05 August 2014
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=rtcp-mux
a=maxptime:60
a=ssrc:2566549015 cname:TdImtoO7ee/QmnJN
a=ssrc:2566549015 msid:e8hFvtt1SQ9FiqpbYbOhN19wvpp21flszxZ4
d7516c7a-7f81-4598-a2e6-aa71b7ceb8db
a=ssrc:2566549015 mslabel:e8hFvtt1SQ9FiqpbYbOhN19wvpp21flszxZ4
a=ssrc:2566549015 label:d7516c7a-7f81-4598-a2e6-aa71b7ceb8db
m=video 63529 RTP/SAVPF 100 116 117 96
c=IN IP4 162.243.255.49
a=rtpmap:100 VP8/90000
a=rtpmap:116 red/90000
a=rtpmap:117 ulpfec/90000
15
Gigantic SDP 5/10
© 2014 Truphone Limited. All Rights Reserved.05 August 2014
a=rtpmap:96 rtx/90000
a=fmtp:96 apt=100
a=rtcp:63529 IN IP4 162.243.255.49
a=candidate:1867667642 1 udp 2122260223 192.168.254.1 58603 typ
host generation 0
a=candidate:1867667642 2 udp 2122260223 192.168.254.1 58603 typ
host generation 0
a=candidate:2448668656 1 udp 2122194687 192.168.142.1 58604 typ
host generation 0
a=candidate:2448668656 2 udp 2122194687 192.168.142.1 58604 typ
host generation 0
a=candidate:882550992 1 udp 2122129151 10.2.129.202 58605 typ host
generation 0
a=candidate:882550992 2 udp 2122129151 10.2.129.202 58605 typ host
generation 0
16
Gigantic SDP 6/10
© 2014 Truphone Limited. All Rights Reserved.05 August 2014
a=candidate:567387210 1 tcp 1518280447 192.168.254.1 0 typ host
generation 0
a=candidate:567387210 2 tcp 1518280447 192.168.254.1 0 typ host
generation 0
a=candidate:3748678400 1 tcp 1518214911 192.168.142.1 0 typ host
generation 0
a=candidate:3748678400 2 tcp 1518214911 192.168.142.1 0 typ host
generation 0
a=candidate:2048480288 1 tcp 1518149375 10.2.129.202 0 typ host
generation 0
a=candidate:2048480288 2 tcp 1518149375 10.2.129.202 0 typ host
generation 0
a=candidate:3427568147 1 udp 41754367 162.243.255.49 63529 typ relay
raddr 195.110.37.225 rport 48569 generation 0
a=candidate:3427568147 2 udp 41754367 162.243.255.49 63529 typ relay
raddr 195.110.37.225 rport 48569 generation 0
17
Gigantic SDP 7/10
© 2014 Truphone Limited. All Rights Reserved.05 August 2014
a=ice-ufrag:JuWsZDrjSjaP91bz
a=ice-pwd:QUc3SJ/aJe+FLa658U5y2qJp
a=ice-options:google-ice
a=fingerprint:sha-256
C0:42:EE:16:BF:BD:87:76:A4:0F:F6:A9:48:C8:BA:45:2E:0E:AD:1F:41:AA:
C3:3C:99:45:CA:FE:50:9D:E4:32
a=setup:actpass
a=mid:video
a=extmap:2 urn:ietf:params:rtp-hdrext:toffset
a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=rtcp-mux
a=rtcp-fb:100 ccm fir
a=rtcp-fb:100 nack
a=rtcp-fb:100 nack pli
a=rtcp-fb:100 goog-remb
18
Gigantic SDP 8/10
© 2014 Truphone Limited. All Rights Reserved.05 August 2014
a=ssrc-group:FID 1964375756 3405612694
a=ssrc:1964375756 cname:TdImtoO7ee/QmnJN
a=ssrc:1964375756 msid:e8hFvtt1SQ9FiqpbYbOhN19wvpp21flszxZ4
fb4cdb67-4167-4f63-a934-fa49977f955a
a=ssrc:1964375756 mslabel:e8hFvtt1SQ9FiqpbYbOhN19wvpp21flszxZ4
a=ssrc:1964375756 label:fb4cdb67-4167-4f63-a934-fa49977f955a
a=ssrc:3405612694 cname:TdImtoO7ee/QmnJN
a=ssrc:3405612694 msid:e8hFvtt1SQ9FiqpbYbOhN19wvpp21flszxZ4
fb4cdb67-4167-4f63-a934-fa49977f955a
a=ssrc:3405612694 mslabel:e8hFvtt1SQ9FiqpbYbOhN19wvpp21flszxZ4
a=ssrc:3405612694 label:fb4cdb67-4167-4f63-a934-fa49977f955a
19
Gigantic SDP 9/10
© 2014 Truphone Limited. All Rights Reserved.05 August 2014 20
Gigantic SDP 10/10
Increase tcp_rd_buf_size!
© 2014 Truphone Limited. All Rights Reserved.05 August 2014
WebRTC/VoIP and WebRTC/PSTN
21
Challenge 2
© 2014 Truphone Limited. All Rights Reserved.05 August 2014
• FreeSWITCH to the rescue
– session:execute("export", "media_webrtc=true")
– session:setVariable("bypass_media", "true")
• Certs for DTLS
– /etc/freeswitch/tls/dtls-srtp.crt
• Transcoding (mod_opus)
– <load module="mod_opus"/>
22
WebRTC/VoIP (and PSTN)
© 2014 Truphone Limited. All Rights Reserved.05 August 2014 23
WebRTC/VoIP - WebRTC/PSTN
© 2014 Truphone Limited. All Rights Reserved.05 August 2014
Authentication
24
Challenge 3
© 2014 Truphone Limited. All Rights Reserved.05 August 2014 25
Ephemeral Authentication
© 2014 Truphone Limited. All Rights Reserved.05 August 2014
Kamailio auth_ephemeral module
loadmodule "auth.so“
loadmodule "auth_ephemeral.so“
…
modparam("auth_ephemeral", "secret", AUTH_EPHEMERAL_SECRET)
…
if (!autheph_proxy("$fd")) {
auth_challenge("$fd", "0");
exit;
}
26
Ephemeral Authentication
© 2014 Truphone Limited. All Rights Reserved.05 August 2014
Media relay for p2p
27
Challenge 4
© 2014 Truphone Limited. All Rights Reserved.05 August 2014
• rfc-5766-turn-server
–Open Source
–Easy to set up (e.g. Puppet)
–Ephemeral auth. applies here too!
• JsSIP configuration easy:
– turn_servers: { urls: [“turn:myturn.com”],
username: “u”, credentials: “c”}
28
Media relay (TURN + STUN)
© 2014 Truphone Limited. All Rights Reserved.05 August 2014 29
Media relay (TURN + STUN)
© 2014 Truphone Limited. All Rights Reserved.05 August 2014
Testing
30
Challenge 5
© 2014 Truphone Limited. All Rights Reserved.05 August 2014
• From sipp & PJSUA to… Selenium?
• Chrome and FF change
–A lot
–Often
• JsSIP master vs develop (re-INVITEs)
• FreeSWITCH 1.5 or 1.4?
31
5. Testing
© 2014 Truphone Limited. All Rights Reserved.05 August 2014
Dealing with Web Developers 
32
Bonus challenge
© 2014 Truphone Limited. All Rights Reserved.05 August 2014
• Different tools/processes
• Bleeding edge libs/apps
• Automating deployment of non-stock apps?
• Don’t care about signalling/media
33
Web Development
© 2014 Truphone Limited. All Rights Reserved.05 August 2014 34
findable.io
© 2014 Truphone Limited. All Rights Reserved.05 August 2014
• Big shift to web technologies
• No need to revolutionize your VoIP platform
• SIP can do the job, but…
–verto endpoint for FreeSWITCH?
• (Automated) Testing is hard
• chrome://webrtc-internals is cool
35
Wrapping up
© 2014 Truphone Limited. All Rights Reserved.05 August 2014
Q&A
Giacomo Vacca - @giavac
labs@truphone.com
https://labs.truphone.com/about/
36

Mais conteúdo relacionado

Mais procurados

Mais procurados (20)

SIPREC RTPEngine Media Forking
SIPREC RTPEngine Media ForkingSIPREC RTPEngine Media Forking
SIPREC RTPEngine Media Forking
 
ARI and AGI, a powerful combination
ARI and AGI, a powerful combinationARI and AGI, a powerful combination
ARI and AGI, a powerful combination
 
Kamailio - SIP Routing in Lua
Kamailio - SIP Routing in LuaKamailio - SIP Routing in Lua
Kamailio - SIP Routing in Lua
 
FreeSWITCH on Docker
FreeSWITCH on DockerFreeSWITCH on Docker
FreeSWITCH on Docker
 
Quic illustrated
Quic illustratedQuic illustrated
Quic illustrated
 
Three Ways Kamailio Can Help Your FreeSWITCH Deployment
Three Ways Kamailio Can Help Your FreeSWITCH DeploymentThree Ways Kamailio Can Help Your FreeSWITCH Deployment
Three Ways Kamailio Can Help Your FreeSWITCH Deployment
 
SIP security in IP telephony
SIP security in IP telephonySIP security in IP telephony
SIP security in IP telephony
 
Virtual Extensible LAN (VXLAN)
Virtual Extensible LAN (VXLAN)Virtual Extensible LAN (VXLAN)
Virtual Extensible LAN (VXLAN)
 
Kamailio - Load Balancing Load Balancers
Kamailio - Load Balancing Load BalancersKamailio - Load Balancing Load Balancers
Kamailio - Load Balancing Load Balancers
 
NSO: Network Service Orchestrator enabled by Tail-f Hands-on Lab
NSO: Network Service Orchestrator enabled by Tail-f Hands-on LabNSO: Network Service Orchestrator enabled by Tail-f Hands-on Lab
NSO: Network Service Orchestrator enabled by Tail-f Hands-on Lab
 
Tutorial: Using GoBGP as an IXP connecting router
Tutorial: Using GoBGP as an IXP connecting routerTutorial: Using GoBGP as an IXP connecting router
Tutorial: Using GoBGP as an IXP connecting router
 
Traffic Control with Envoy Proxy
Traffic Control with Envoy ProxyTraffic Control with Envoy Proxy
Traffic Control with Envoy Proxy
 
Segment Routing: A Tutorial
Segment Routing: A TutorialSegment Routing: A Tutorial
Segment Routing: A Tutorial
 
Dhcpv6 Tutorial Overview, DHCP for Ipv6 ,RFC 3315 - IETF
Dhcpv6 Tutorial Overview, DHCP for Ipv6 ,RFC 3315 - IETFDhcpv6 Tutorial Overview, DHCP for Ipv6 ,RFC 3315 - IETF
Dhcpv6 Tutorial Overview, DHCP for Ipv6 ,RFC 3315 - IETF
 
Sip
SipSip
Sip
 
Introduction to SIP
Introduction to SIP  Introduction to SIP
Introduction to SIP
 
SIP (Session Initiation Protocol)
SIP (Session Initiation Protocol)SIP (Session Initiation Protocol)
SIP (Session Initiation Protocol)
 
Session Initiation Protocol
Session Initiation ProtocolSession Initiation Protocol
Session Initiation Protocol
 
Istio service mesh introduction
Istio service mesh introductionIstio service mesh introduction
Istio service mesh introduction
 
SIP for geeks
SIP for geeksSIP for geeks
SIP for geeks
 

Destaque

KazooCon 2014 - Kazoo Scalability
KazooCon 2014 - Kazoo ScalabilityKazooCon 2014 - Kazoo Scalability
KazooCon 2014 - Kazoo Scalability
2600Hz
 
WebRTC and VoIP: bridging the gap (Kamailio world conference 2013)
WebRTC and VoIP: bridging the gap (Kamailio world conference 2013)WebRTC and VoIP: bridging the gap (Kamailio world conference 2013)
WebRTC and VoIP: bridging the gap (Kamailio world conference 2013)
Victor Pascual Ávila
 

Destaque (11)

Provisioning Q and A
Provisioning Q and AProvisioning Q and A
Provisioning Q and A
 
KazooCon 2014 - Kazoo Scalability
KazooCon 2014 - Kazoo ScalabilityKazooCon 2014 - Kazoo Scalability
KazooCon 2014 - Kazoo Scalability
 
Continuous Integration and Kamailio
Continuous Integration and KamailioContinuous Integration and Kamailio
Continuous Integration and Kamailio
 
WebRTC and VoIP: bridging the gap (Kamailio world conference 2013)
WebRTC and VoIP: bridging the gap (Kamailio world conference 2013)WebRTC and VoIP: bridging the gap (Kamailio world conference 2013)
WebRTC and VoIP: bridging the gap (Kamailio world conference 2013)
 
Docker and Puppet for Continuous Integration
Docker and Puppet for Continuous IntegrationDocker and Puppet for Continuous Integration
Docker and Puppet for Continuous Integration
 
KazooCon 2014 - Playing Kazoo Dudka Style
KazooCon 2014 - Playing Kazoo Dudka StyleKazooCon 2014 - Playing Kazoo Dudka Style
KazooCon 2014 - Playing Kazoo Dudka Style
 
2600Hz - Telecom Rating and Limits
2600Hz - Telecom Rating and Limits2600Hz - Telecom Rating and Limits
2600Hz - Telecom Rating and Limits
 
Kamailio and VoIP Wild World
Kamailio and VoIP Wild WorldKamailio and VoIP Wild World
Kamailio and VoIP Wild World
 
SIPLABS - Hard Rocking Kazoo - KazooCon 2015
SIPLABS - Hard Rocking Kazoo - KazooCon 2015SIPLABS - Hard Rocking Kazoo - KazooCon 2015
SIPLABS - Hard Rocking Kazoo - KazooCon 2015
 
2600Hz - Tuning Kazoo to 10,000 Handsets - KazooCon 2015
2600Hz - Tuning Kazoo to 10,000 Handsets - KazooCon 20152600Hz - Tuning Kazoo to 10,000 Handsets - KazooCon 2015
2600Hz - Tuning Kazoo to 10,000 Handsets - KazooCon 2015
 
2600Hz - Billing Data with Kazoo
2600Hz - Billing Data with Kazoo2600Hz - Billing Data with Kazoo
2600Hz - Billing Data with Kazoo
 

Semelhante a Top 5 Challenges To Add Web Calls to Truphone VoIP Platform

Pau Oliva – Bypassing wifi pay-walls with Android [Rooted CON 2014]
Pau Oliva – Bypassing wifi pay-walls with Android [Rooted CON 2014]Pau Oliva – Bypassing wifi pay-walls with Android [Rooted CON 2014]
Pau Oliva – Bypassing wifi pay-walls with Android [Rooted CON 2014]
RootedCON
 
Anguruwathota [wb klt-2106]-umts2100 swap site ssv report_v2.0
Anguruwathota [wb klt-2106]-umts2100 swap site ssv report_v2.0Anguruwathota [wb klt-2106]-umts2100 swap site ssv report_v2.0
Anguruwathota [wb klt-2106]-umts2100 swap site ssv report_v2.0
Yasas Anuradha
 

Semelhante a Top 5 Challenges To Add Web Calls to Truphone VoIP Platform (20)

WebRTC: A front-end perspective
WebRTC: A front-end perspectiveWebRTC: A front-end perspective
WebRTC: A front-end perspective
 
Network Security Best Practice (BCP38 & 140)
Network Security Best Practice (BCP38 & 140) Network Security Best Practice (BCP38 & 140)
Network Security Best Practice (BCP38 & 140)
 
Pau Oliva – Bypassing wifi pay-walls with Android [Rooted CON 2014]
Pau Oliva – Bypassing wifi pay-walls with Android [Rooted CON 2014]Pau Oliva – Bypassing wifi pay-walls with Android [Rooted CON 2014]
Pau Oliva – Bypassing wifi pay-walls with Android [Rooted CON 2014]
 
Clarification material for morocco nis frame bidding 2014 v102
Clarification material for morocco nis frame bidding 2014 v102Clarification material for morocco nis frame bidding 2014 v102
Clarification material for morocco nis frame bidding 2014 v102
 
HTML5 WebSocket for the Real-Time Web and the Internet of Things
HTML5 WebSocket for the Real-Time Weband the Internet of ThingsHTML5 WebSocket for the Real-Time Weband the Internet of Things
HTML5 WebSocket for the Real-Time Web and the Internet of Things
 
Anguruwathota [wb klt-2106]-umts2100 swap site ssv report_v2.0
Anguruwathota [wb klt-2106]-umts2100 swap site ssv report_v2.0Anguruwathota [wb klt-2106]-umts2100 swap site ssv report_v2.0
Anguruwathota [wb klt-2106]-umts2100 swap site ssv report_v2.0
 
002-OBF400013 GPON MA5608T Hardware Installation ISSUE1.00 - update.pdf
002-OBF400013 GPON MA5608T Hardware Installation ISSUE1.00 - update.pdf002-OBF400013 GPON MA5608T Hardware Installation ISSUE1.00 - update.pdf
002-OBF400013 GPON MA5608T Hardware Installation ISSUE1.00 - update.pdf
 
Cohesive Networks Support Docs: VNS3 Trend Micro Agent
Cohesive Networks Support Docs: VNS3 Trend Micro Agent Cohesive Networks Support Docs: VNS3 Trend Micro Agent
Cohesive Networks Support Docs: VNS3 Trend Micro Agent
 
phan phoi airlive camera
phan phoi airlive cameraphan phoi airlive camera
phan phoi airlive camera
 
Prevent ssh-tunneling
Prevent ssh-tunnelingPrevent ssh-tunneling
Prevent ssh-tunneling
 
How to prevent ssh-tunneling using Palo Alto Networks NGFW
How to prevent ssh-tunneling using Palo Alto Networks NGFWHow to prevent ssh-tunneling using Palo Alto Networks NGFW
How to prevent ssh-tunneling using Palo Alto Networks NGFW
 
Sangoma Vega Gateway Training Presentation
Sangoma Vega Gateway Training PresentationSangoma Vega Gateway Training Presentation
Sangoma Vega Gateway Training Presentation
 
Kubernetes at Datadog Scale
Kubernetes at Datadog ScaleKubernetes at Datadog Scale
Kubernetes at Datadog Scale
 
AutoIP -A mechanism for IPv6 migration and IPv4 sunsetting by Shishio Tsuchiy...
AutoIP -A mechanism for IPv6 migration and IPv4 sunsetting by Shishio Tsuchiy...AutoIP -A mechanism for IPv6 migration and IPv4 sunsetting by Shishio Tsuchiy...
AutoIP -A mechanism for IPv6 migration and IPv4 sunsetting by Shishio Tsuchiy...
 
HITCON 2015: Your Lightbulb Is Not Hacking You: Observation from a Honeypot B...
HITCON 2015: Your Lightbulb Is Not Hacking You: Observation from a Honeypot B...HITCON 2015: Your Lightbulb Is Not Hacking You: Observation from a Honeypot B...
HITCON 2015: Your Lightbulb Is Not Hacking You: Observation from a Honeypot B...
 
Autoscaling Cloud Foundry with BOSH (Cloud Foundry Summit 2014)
Autoscaling Cloud Foundry with BOSH (Cloud Foundry Summit 2014)Autoscaling Cloud Foundry with BOSH (Cloud Foundry Summit 2014)
Autoscaling Cloud Foundry with BOSH (Cloud Foundry Summit 2014)
 
CPU
CPUCPU
CPU
 
Introducing the OSA 5335 PTP Grandmaster
Introducing the OSA 5335 PTP GrandmasterIntroducing the OSA 5335 PTP Grandmaster
Introducing the OSA 5335 PTP Grandmaster
 
Ficstar Software: Cassandra Installation to Optimization
Ficstar Software: Cassandra Installation to OptimizationFicstar Software: Cassandra Installation to Optimization
Ficstar Software: Cassandra Installation to Optimization
 
SIP Pap2 T Sip 1 SETTING
SIP Pap2 T Sip 1 SETTINGSIP Pap2 T Sip 1 SETTING
SIP Pap2 T Sip 1 SETTING
 

Mais de Giacomo Vacca

Mais de Giacomo Vacca (10)

STUN protocol
STUN protocolSTUN protocol
STUN protocol
 
Modern VoIP in modern infrastructures
Modern VoIP in modern infrastructuresModern VoIP in modern infrastructures
Modern VoIP in modern infrastructures
 
RIPP Notes
RIPP NotesRIPP Notes
RIPP Notes
 
Modern VoIP in Modern Infrastructures
Modern VoIP in Modern InfrastructuresModern VoIP in Modern Infrastructures
Modern VoIP in Modern Infrastructures
 
Kamailio World 2018 - Workshop: kamailio-tests
Kamailio World 2018 - Workshop: kamailio-testsKamailio World 2018 - Workshop: kamailio-tests
Kamailio World 2018 - Workshop: kamailio-tests
 
Homer - Workshop at Kamailio World 2017
Homer - Workshop at Kamailio World 2017Homer - Workshop at Kamailio World 2017
Homer - Workshop at Kamailio World 2017
 
[workshop] The Revolutionary WebRTC
[workshop] The Revolutionary WebRTC[workshop] The Revolutionary WebRTC
[workshop] The Revolutionary WebRTC
 
Docker - From Walking To Running
Docker - From Walking To RunningDocker - From Walking To Running
Docker - From Walking To Running
 
Docker From Scratch
Docker From ScratchDocker From Scratch
Docker From Scratch
 
Automatic Kamailio Deployments With Puppet
Automatic Kamailio Deployments With PuppetAutomatic Kamailio Deployments With Puppet
Automatic Kamailio Deployments With Puppet
 

Último

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Último (20)

MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 

Top 5 Challenges To Add Web Calls to Truphone VoIP Platform

  • 1. Top 5 Challenges to Add Web Calls to Truphone VoIP Platform Giacomo Vacca Senior Network Applications Developer
  • 2. © 2014 Truphone Limited. All Rights Reserved.05 August 2014 labs.truphone.com 2
  • 3. © 2014 Truphone Limited. All Rights Reserved.05 August 2014 3 WebRTC is not for VoIP devs
  • 4. © 2014 Truphone Limited. All Rights Reserved.05 August 2014 4 The “Traditional Architecture”
  • 5. © 2014 Truphone Limited. All Rights Reserved.05 August 2014 • Follow standards • Use Open Source products • Think scalability since the beginning • Don’t compromise on security • Change often, keep technical debt low • Deploy automatically 5 Design Principles
  • 6. © 2014 Truphone Limited. All Rights Reserved.05 August 2014 • JS client (JsSIP-based) • WebSockets • Authentication • Media relay for p2p sessions • FreeSWITCH out of the media path • Web/VoIP/PSTN interaction –Support for DTLS 6 Changes Required
  • 7. © 2014 Truphone Limited. All Rights Reserved.05 August 2014 Websocket support 7 Challenge 1
  • 8. © 2014 Truphone Limited. All Rights Reserved.05 August 2014 8 Adding WebSocket support…
  • 9. © 2014 Truphone Limited. All Rights Reserved.05 August 2014 9 … with Kamailio
  • 10. © 2014 Truphone Limited. All Rights Reserved.05 August 2014 Kamailio websocket module loadmodule "websocket.so" … event_route[xhttp:request] { set_reply_close(); set_reply_no_connect(); … if ($hdr(Upgrade)=~"websocket" && $hdr(Connection)=~"Upgrade" && $rm=~"GET") { if (ws_handle_handshake()) { exit; } } } 10 WebSockets support
  • 11. © 2014 Truphone Limited. All Rights Reserved.05 August 2014 v=0 o=- 2700277954018656518 2 IN IP4 127.0.0.1 s=- t=0 0 a=group:BUNDLE audio video a=msid-semantic: WMS e8hFvtt1SQ9FiqpbYbOhN19wvpp21flszxZ4 m=audio 63529 RTP/SAVPF 111 103 104 0 8 106 105 13 126 c=IN IP4 162.243.255.49 a=rtpmap:111 opus/48000/2 a=fmtp:111 minptime=10 a=rtpmap:103 ISAC/16000 a=rtpmap:104 ISAC/32000 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 11 Gigantic SDP 1/10
  • 12. © 2014 Truphone Limited. All Rights Reserved.05 August 2014 a=rtpmap:106 CN/32000 a=rtpmap:105 CN/16000 a=rtpmap:13 CN/8000 a=rtpmap:126 telephone-event/8000 a=rtcp:63529 IN IP4 162.243.255.49 a=candidate:1867667642 1 udp 2122260223 192.168.254.1 58603 typ host generation 0 a=candidate:1867667642 2 udp 2122260223 192.168.254.1 58603 typ host generation 0 a=candidate:2448668656 1 udp 2122194687 192.168.142.1 58604 typ host generation 0 a=candidate:2448668656 2 udp 2122194687 192.168.142.1 58604 typ host generation 0 12 Gigantic SDP 2/10
  • 13. © 2014 Truphone Limited. All Rights Reserved.05 August 2014 a=candidate:882550992 1 udp 2122129151 10.2.129.202 58605 typ host generation 0 a=candidate:882550992 2 udp 2122129151 10.2.129.202 58605 typ host generation 0 a=candidate:567387210 1 tcp 1518280447 192.168.254.1 0 typ host generation 0 a=candidate:567387210 2 tcp 1518280447 192.168.254.1 0 typ host generation 0 a=candidate:3748678400 1 tcp 1518214911 192.168.142.1 0 typ host generation 0 a=candidate:3748678400 2 tcp 1518214911 192.168.142.1 0 typ host generation 0 a=candidate:2048480288 1 tcp 1518149375 10.2.129.202 0 typ host generation 0 13 Gigantic SDP 3/10
  • 14. © 2014 Truphone Limited. All Rights Reserved.05 August 2014 a=candidate:2048480288 2 tcp 1518149375 10.2.129.202 0 typ host generation 0 a=candidate:3427568147 1 udp 41754367 162.243.255.49 63529 typ relay raddr 195.110.37.225 rport 48569 generation 0 a=candidate:3427568147 2 udp 41754367 162.243.255.49 63529 typ relay raddr 195.110.37.225 rport 48569 generation 0 a=ice-ufrag:JuWsZDrjSjaP91bz a=ice-pwd:QUc3SJ/aJe+FLa658U5y2qJp a=ice-options:google-ice a=fingerprint:sha-256 C0:42:EE:16:BF:BD:87:76:A4:0F:F6:A9:48:C8:BA:45:2E:0E:AD:1F:41:AA: C3:3C:99:45:CA:FE:50:9D:E4:32 a=setup:actpass a=mid:audio 14 Gigantic SDP 4/10
  • 15. © 2014 Truphone Limited. All Rights Reserved.05 August 2014 a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time a=rtcp-mux a=maxptime:60 a=ssrc:2566549015 cname:TdImtoO7ee/QmnJN a=ssrc:2566549015 msid:e8hFvtt1SQ9FiqpbYbOhN19wvpp21flszxZ4 d7516c7a-7f81-4598-a2e6-aa71b7ceb8db a=ssrc:2566549015 mslabel:e8hFvtt1SQ9FiqpbYbOhN19wvpp21flszxZ4 a=ssrc:2566549015 label:d7516c7a-7f81-4598-a2e6-aa71b7ceb8db m=video 63529 RTP/SAVPF 100 116 117 96 c=IN IP4 162.243.255.49 a=rtpmap:100 VP8/90000 a=rtpmap:116 red/90000 a=rtpmap:117 ulpfec/90000 15 Gigantic SDP 5/10
  • 16. © 2014 Truphone Limited. All Rights Reserved.05 August 2014 a=rtpmap:96 rtx/90000 a=fmtp:96 apt=100 a=rtcp:63529 IN IP4 162.243.255.49 a=candidate:1867667642 1 udp 2122260223 192.168.254.1 58603 typ host generation 0 a=candidate:1867667642 2 udp 2122260223 192.168.254.1 58603 typ host generation 0 a=candidate:2448668656 1 udp 2122194687 192.168.142.1 58604 typ host generation 0 a=candidate:2448668656 2 udp 2122194687 192.168.142.1 58604 typ host generation 0 a=candidate:882550992 1 udp 2122129151 10.2.129.202 58605 typ host generation 0 a=candidate:882550992 2 udp 2122129151 10.2.129.202 58605 typ host generation 0 16 Gigantic SDP 6/10
  • 17. © 2014 Truphone Limited. All Rights Reserved.05 August 2014 a=candidate:567387210 1 tcp 1518280447 192.168.254.1 0 typ host generation 0 a=candidate:567387210 2 tcp 1518280447 192.168.254.1 0 typ host generation 0 a=candidate:3748678400 1 tcp 1518214911 192.168.142.1 0 typ host generation 0 a=candidate:3748678400 2 tcp 1518214911 192.168.142.1 0 typ host generation 0 a=candidate:2048480288 1 tcp 1518149375 10.2.129.202 0 typ host generation 0 a=candidate:2048480288 2 tcp 1518149375 10.2.129.202 0 typ host generation 0 a=candidate:3427568147 1 udp 41754367 162.243.255.49 63529 typ relay raddr 195.110.37.225 rport 48569 generation 0 a=candidate:3427568147 2 udp 41754367 162.243.255.49 63529 typ relay raddr 195.110.37.225 rport 48569 generation 0 17 Gigantic SDP 7/10
  • 18. © 2014 Truphone Limited. All Rights Reserved.05 August 2014 a=ice-ufrag:JuWsZDrjSjaP91bz a=ice-pwd:QUc3SJ/aJe+FLa658U5y2qJp a=ice-options:google-ice a=fingerprint:sha-256 C0:42:EE:16:BF:BD:87:76:A4:0F:F6:A9:48:C8:BA:45:2E:0E:AD:1F:41:AA: C3:3C:99:45:CA:FE:50:9D:E4:32 a=setup:actpass a=mid:video a=extmap:2 urn:ietf:params:rtp-hdrext:toffset a=extmap:3 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time a=rtcp-mux a=rtcp-fb:100 ccm fir a=rtcp-fb:100 nack a=rtcp-fb:100 nack pli a=rtcp-fb:100 goog-remb 18 Gigantic SDP 8/10
  • 19. © 2014 Truphone Limited. All Rights Reserved.05 August 2014 a=ssrc-group:FID 1964375756 3405612694 a=ssrc:1964375756 cname:TdImtoO7ee/QmnJN a=ssrc:1964375756 msid:e8hFvtt1SQ9FiqpbYbOhN19wvpp21flszxZ4 fb4cdb67-4167-4f63-a934-fa49977f955a a=ssrc:1964375756 mslabel:e8hFvtt1SQ9FiqpbYbOhN19wvpp21flszxZ4 a=ssrc:1964375756 label:fb4cdb67-4167-4f63-a934-fa49977f955a a=ssrc:3405612694 cname:TdImtoO7ee/QmnJN a=ssrc:3405612694 msid:e8hFvtt1SQ9FiqpbYbOhN19wvpp21flszxZ4 fb4cdb67-4167-4f63-a934-fa49977f955a a=ssrc:3405612694 mslabel:e8hFvtt1SQ9FiqpbYbOhN19wvpp21flszxZ4 a=ssrc:3405612694 label:fb4cdb67-4167-4f63-a934-fa49977f955a 19 Gigantic SDP 9/10
  • 20. © 2014 Truphone Limited. All Rights Reserved.05 August 2014 20 Gigantic SDP 10/10 Increase tcp_rd_buf_size!
  • 21. © 2014 Truphone Limited. All Rights Reserved.05 August 2014 WebRTC/VoIP and WebRTC/PSTN 21 Challenge 2
  • 22. © 2014 Truphone Limited. All Rights Reserved.05 August 2014 • FreeSWITCH to the rescue – session:execute("export", "media_webrtc=true") – session:setVariable("bypass_media", "true") • Certs for DTLS – /etc/freeswitch/tls/dtls-srtp.crt • Transcoding (mod_opus) – <load module="mod_opus"/> 22 WebRTC/VoIP (and PSTN)
  • 23. © 2014 Truphone Limited. All Rights Reserved.05 August 2014 23 WebRTC/VoIP - WebRTC/PSTN
  • 24. © 2014 Truphone Limited. All Rights Reserved.05 August 2014 Authentication 24 Challenge 3
  • 25. © 2014 Truphone Limited. All Rights Reserved.05 August 2014 25 Ephemeral Authentication
  • 26. © 2014 Truphone Limited. All Rights Reserved.05 August 2014 Kamailio auth_ephemeral module loadmodule "auth.so“ loadmodule "auth_ephemeral.so“ … modparam("auth_ephemeral", "secret", AUTH_EPHEMERAL_SECRET) … if (!autheph_proxy("$fd")) { auth_challenge("$fd", "0"); exit; } 26 Ephemeral Authentication
  • 27. © 2014 Truphone Limited. All Rights Reserved.05 August 2014 Media relay for p2p 27 Challenge 4
  • 28. © 2014 Truphone Limited. All Rights Reserved.05 August 2014 • rfc-5766-turn-server –Open Source –Easy to set up (e.g. Puppet) –Ephemeral auth. applies here too! • JsSIP configuration easy: – turn_servers: { urls: [“turn:myturn.com”], username: “u”, credentials: “c”} 28 Media relay (TURN + STUN)
  • 29. © 2014 Truphone Limited. All Rights Reserved.05 August 2014 29 Media relay (TURN + STUN)
  • 30. © 2014 Truphone Limited. All Rights Reserved.05 August 2014 Testing 30 Challenge 5
  • 31. © 2014 Truphone Limited. All Rights Reserved.05 August 2014 • From sipp & PJSUA to… Selenium? • Chrome and FF change –A lot –Often • JsSIP master vs develop (re-INVITEs) • FreeSWITCH 1.5 or 1.4? 31 5. Testing
  • 32. © 2014 Truphone Limited. All Rights Reserved.05 August 2014 Dealing with Web Developers  32 Bonus challenge
  • 33. © 2014 Truphone Limited. All Rights Reserved.05 August 2014 • Different tools/processes • Bleeding edge libs/apps • Automating deployment of non-stock apps? • Don’t care about signalling/media 33 Web Development
  • 34. © 2014 Truphone Limited. All Rights Reserved.05 August 2014 34 findable.io
  • 35. © 2014 Truphone Limited. All Rights Reserved.05 August 2014 • Big shift to web technologies • No need to revolutionize your VoIP platform • SIP can do the job, but… –verto endpoint for FreeSWITCH? • (Automated) Testing is hard • chrome://webrtc-internals is cool 35 Wrapping up
  • 36. © 2014 Truphone Limited. All Rights Reserved.05 August 2014 Q&A Giacomo Vacca - @giavac labs@truphone.com https://labs.truphone.com/about/ 36