webrtc mobile considerations and voice over ip
play

WEBRTC, MOBILE CONSIDERATIONS AND VOICE OVER IP IETF e W3C 0 c - PowerPoint PPT Presentation

WEBRTC, MOBILE CONSIDERATIONS AND VOICE OVER IP IETF e W3C 0 c . 1 r u Google C o T s R - Microsoft n b e e p Apple W o ... 2011 2017 WebRTC (Real-Time Communications) Acquiring audio and video


  1. WEBRTC, MOBILE CONSIDERATIONS AND VOICE OVER IP

  2. IETF e W3C 0 c . 1 r u Google C o T s R - Microsoft n b e e p Apple W o ... 2011 2017

  3. WebRTC (Real-Time Communications) ● Acquiring audio and video ● Communicating audio and video ● Communicating arbitrary data

  4. WebRTC (Real-Time Communications) ● Acquiring audio and video MediaStream (aka getUserMedia) ● Communicating audio and video RTCPeerConnection ● Communicating arbitrary data RTCDataChannel

  5. WebRTC (Real-Time Communications) ● Acquiring audio and video MediaStream (aka getUserMedia) ● Communicating audio and video RTCPeerConnection ● Communicating arbitrary data RTCDataChannel

  6. MediaStream MediaStream MediaStreamTrack: Video Input Output MediaStreamTrack: Audio Left Right channel channel

  7. MediaStream Constraints ● Media Type ● Resolution MediaStream ● Frame rate MediaStreamTrack: Video Input Output MediaStreamTrack: Audio Left Right channel channel

  8. RTCPeerConnection ● Signal processing ● Codec handling ● Peer-to-peer connection ● Security (Encryption) ● Bandwidth management

  9. RTCPeerConnection ● Signal processing ● Codec handling ● Peer-to-peer connection ● Security (Encryption) ● Bandwidth management Media Peer Peer SRTP (Secure Real-Time Transport Protocol) DTLS (Datagram Transport Layer Security)

  10. Signalling ● Exchange Session Description Object ○ Codec to use ○ Security keys ○ Network information ● Any messaging mechanism (HTTPS, Websockets, XHR, ...) ● Any messaging protocol (SIP, XMTP, JSON, ...)

  11. RTCSessionDescription (SDP) [OFFER] [ANSWER] v=0 v=0 o=alice 2890844526 2890844526 IN IP4 host... o=bob 2808844564 2808844564 IN IP4 host… s= s= c=IN IP4 host.atlanta.example.com c=IN IP4 host.biloxi.example.com t=0 0 t=0 0 m=audio 49170 RTP/AVP 0 8 97 m=audio 49174 RTP/AVP 0 a=rtpmap:0 PCMU/8000 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 m=video 49170 RTP/AVP 32 a=rtpmap:97 iLBC/8000 a=rtpmap:32 MPV/90000 m=video 51372 RTP/AVP 31 32 a=rtpmap:31 H261/90000 a=rtpmap:32 MPV/90000

  12. Signalling Signalling Media Peer Peer

  13. NAT (network address translation) ● Let multiple computers share the same IP address ● IPv4 address exhaustion

  14. Signalling Signalling Peer NAT NAT Peer

  15. STUN (session traversal utilities for NAT) ● What is my IP address? ● Simple server ● CHEAP

  16. STUN Signalling Signalling Media Peer NAT NAT Peer STUN STUN

  17. TURN (traversal using relays around NAT) ● Cloud fallback if peer-to-peer fails ● Data sent through the server ● Ensure call works in almost any environments ● EXPENSIVE

  18. TURN Signalling Signalling Media TURN TURN Peer NAT NAT Peer

  19. STUN + TURN Signalling Signalling Media TURN TURN Peer NAT NAT Peer STUN STUN

  20. ICE (interactive connectivity establishment) ● Framework for connecting peers ● Find the best path for each call ● How? ○ Gathering candidates ■ IP address + port + transport protocol ● Directly attached network interface ● Server reflexive (STUN) ● Relayed address (TURN) ○ Connectivity checks ■ Sort the candidate pairs in priority order ■ Send checks on each pairs in priority order ■ Acknowledge checks received from the agent ○ Nominating Candidate Pairs and concluding ICE

  21. Cloud Signalling Signalling App Alice Bob SDP SDP Media WebRTC IOs Android

  22. Architecture: Small call

  23. Architecture: Medium call

  24. Architecture: Big call

  25. VoIP (Voice over Internet Protocol) PBX (Private Branch Exchange) 1940 1970 1999 2006 2018 SIP (Session Initiation Protocol)

  26. Client Voice VLAN VoIP Provider PSTN SIP EBC Phone Asterisk

  27. Client Voice VLAN VoIP Provider PSTN SIP EBC Phone Asterisk Phone RTP

  28. Client Voice VLAN VoIP Provider PSTN SIP EBC BGW Phone Asterisk 3 Phone RTP 2 1

  29. WebRTC + VOIP 0 e c . 1 r u b C o e T s w R - n b e e e v p W i o J 2011 2016 2006 2017 2018

  30. VoIP Provider PSTN EBC Asterisk SIP HTTPS/WSS Signaling Server Browser

  31. VoIP Provider PSTN EBC Asterisk SIP HTTPS/WSS Signaling Server RTP Browser (Alice) TCP SRTP Media Server (Bob)

  32. VoIP Provider PSTN EBC Asterisk SIP HTTPS/WSS Signaling Server Browser TCP Browser SRTP Media Server

  33. Client Voice VLAN VoIP Provider PSTN SIP EBC BGW Phone Asterisk 3 Phone SIP RTP HTTPS/WSS Signaling Server Browser TCP SRTP Media Server

  34. WebRTC + VOIP + Mobile e 0 c . 1 r e u C l o i b T s o R - n m b e e e / v p W b i o J e w 2011 2016 2017 2018 2019

  35. Outgoing call Oauth (PKCE) Cell Signaling HTTPS/WSS Server TCP Media PSTN SRTP Server Phone TURN

  36. Register on IOs Oauth (PKCE) pushRegistry.register(with: [.voIP]) PushKit EllipticCurveKeyPair Cell createChannel(pushToken, encryption) Notification Service SIP createSession(channelID) Signaling Server Media PSTN Server Phone

  37. Incoming call voIP push Incoming call APNs Decrypt payload Encrypt payload Cell Notification Service Register to callkit TCP Signaling HTTPS/WSS Server TCP Media PSTN SRTP Server Phone TURN

  38. Pitfalls ● IPv6 mobile provider ● Bandwidth + CPU ○ TURN ○ Frame rate ● IOs13 ○ Resolution ○ Pause streams ○ VoIP push must register to callkit ○ Batch update participants ○ DND must be server side ● Android ● Callkit ○ Audio Routes ○ No customization ○ Proximity sensors ● Background ○ Callkit + ConnectionService

  39. Questions? https://www.linkedin.com/in/williamlauze/ https://github.com/wilau2 https://twitter.com/WLauze cabane-io.slack.com

Recommend


More recommend