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

webrtc mobile considerations and voice over ip
SMART_READER_LITE
LIVE PREVIEW

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


slide-1
SLIDE 1

WEBRTC, MOBILE CONSIDERATIONS AND VOICE OVER IP

slide-2
SLIDE 2

2011 2017 W e b R T C 1 .

  • p

e n

  • s
  • u

r c e IETF W3C Google Microsoft Apple ...

slide-3
SLIDE 3
slide-4
SLIDE 4
slide-5
SLIDE 5

WebRTC (Real-Time Communications)

  • Acquiring audio and video
  • Communicating audio and video
  • Communicating arbitrary data
slide-6
SLIDE 6

WebRTC (Real-Time Communications)

  • Acquiring audio and video
  • Communicating audio and video
  • Communicating arbitrary data

MediaStream (aka getUserMedia) RTCPeerConnection RTCDataChannel

slide-7
SLIDE 7

WebRTC (Real-Time Communications)

  • Acquiring audio and video
  • Communicating audio and video
  • Communicating arbitrary data

MediaStream (aka getUserMedia) RTCPeerConnection RTCDataChannel

slide-8
SLIDE 8

MediaStream

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

slide-9
SLIDE 9

MediaStream

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

Constraints

  • Media Type
  • Resolution
  • Frame rate
slide-10
SLIDE 10

RTCPeerConnection

  • Signal processing
  • Codec handling
  • Peer-to-peer connection
  • Security (Encryption)
  • Bandwidth management
slide-11
SLIDE 11

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)

slide-12
SLIDE 12

Signalling

  • Exchange Session Description Object

○ Codec to use ○ Security keys ○ Network information

  • Any messaging mechanism (HTTPS, Websockets, XHR, ...)
  • Any messaging protocol (SIP, XMTP, JSON, ...)
slide-13
SLIDE 13
slide-14
SLIDE 14

RTCSessionDescription (SDP)

[OFFER] v=0

  • =alice 2890844526 2890844526 IN IP4 host...

s= c=IN IP4 host.atlanta.example.com t=0 0 m=audio 49170 RTP/AVP 0 8 97 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:97 iLBC/8000 m=video 51372 RTP/AVP 31 32 a=rtpmap:31 H261/90000 a=rtpmap:32 MPV/90000 [ANSWER] v=0

  • =bob 2808844564 2808844564 IN IP4 host…

s= c=IN IP4 host.biloxi.example.com t=0 0 m=audio 49174 RTP/AVP 0 a=rtpmap:0 PCMU/8000 m=video 49170 RTP/AVP 32 a=rtpmap:32 MPV/90000

slide-15
SLIDE 15

Media Signalling Signalling Peer Peer

slide-16
SLIDE 16

NAT (network address translation)

  • Let multiple computers share the same IP address
  • IPv4 address exhaustion
slide-17
SLIDE 17

Signalling Signalling Peer Peer NAT NAT

slide-18
SLIDE 18

STUN (session traversal utilities for NAT)

  • What is my IP address?
  • Simple server
  • CHEAP
slide-19
SLIDE 19

Peer Peer Signalling Signalling NAT NAT STUN STUN Media

STUN

slide-20
SLIDE 20

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
slide-21
SLIDE 21

Signalling Signalling TURN TURN Media

TURN

Peer Peer NAT NAT

slide-22
SLIDE 22

Signalling Signalling

STUN + TURN

TURN TURN Media Peer Peer NAT NAT STUN STUN

slide-23
SLIDE 23

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

slide-24
SLIDE 24

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

slide-25
SLIDE 25

Architecture: Small call

slide-26
SLIDE 26

Architecture: Medium call

slide-27
SLIDE 27

Architecture: Big call

slide-28
SLIDE 28

VoIP (Voice over Internet Protocol)

1940 2006 1970 1999 2018

PBX (Private Branch Exchange) SIP (Session Initiation Protocol)

slide-29
SLIDE 29

Asterisk Phone EBC SIP Client Voice VLAN VoIP Provider PSTN

slide-30
SLIDE 30
slide-31
SLIDE 31

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

slide-32
SLIDE 32
slide-33
SLIDE 33

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

slide-34
SLIDE 34

WebRTC + VOIP

2006 2018 2011

  • p

e n

  • s
  • u

r c e 2017 W e b R T C 1 . 2016 J i v e w e b

slide-35
SLIDE 35

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

slide-36
SLIDE 36

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

slide-37
SLIDE 37

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

slide-38
SLIDE 38

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

slide-39
SLIDE 39

WebRTC + VOIP + Mobile

2018 2011

  • p

e n

  • s
  • u

r c e 2017 W e b R T C 1 . 2016 J i v e w e b / m

  • b

i l e 2019

slide-40
SLIDE 40

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

slide-41
SLIDE 41

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

slide-42
SLIDE 42

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

slide-43
SLIDE 43
slide-44
SLIDE 44

Pitfalls

  • IPv6 mobile provider

○ TURN

  • IOs13

○ VoIP push must register to callkit ○ DND must be server side

  • Callkit

○ No customization

  • Background

○ Callkit + ConnectionService

  • Bandwidth + CPU

○ Frame rate ○ Resolution ○ Pause streams ○ Batch update participants

  • Android

○ Audio Routes ○ Proximity sensors

slide-45
SLIDE 45

Questions?

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