everything you never wanted to know about mobile voip

62
Mobile VoIP Best Practices Joachim Vanheuverzwijn aka Zoa [email protected]

Upload: elastix

Post on 17-Jul-2015

173 views

Category:

Technology


2 download

TRANSCRIPT

Page 1: Everything you never wanted to know about mobile voip

MobileVoIPBest

Practices

Joachim Vanheuverzwijn aka Zoa

[email protected]

Page 2: Everything you never wanted to know about mobile voip

1

Latency

Quality

Reliability

Battery Life

Page 3: Everything you never wanted to know about mobile voip

2

o End to end latency - max 500ms!

Page 4: Everything you never wanted to know about mobile voip

3

o Network Latency

o Audio Latency

o Algorithmic Delay

Page 5: Everything you never wanted to know about mobile voip

4

o Network (best case)

2G: 400ms

3G: 80ms

LTE: 20ms

WiFi: 10ms

+ transit!

Page 6: Everything you never wanted to know about mobile voip

5

o Network Latency

o Audio Latency

o Algorithmic Delay

Page 7: Everything you never wanted to know about mobile voip

6

Available for android, (ios, wp8)

https://play.google.com/store/apps/details?id=com.zoiper.audiolatency.app&hl=en

Page 8: Everything you never wanted to know about mobile voip

6

Page 9: Everything you never wanted to know about mobile voip

8

Phone Latency @ 8kHz (ms) Latency @ 44.1kHz (ms) Latency @ 48kHz(ms) Android version

Nexus 5 170 155 108L

Nexus 5 170 156 1104.4.4

Samsung Galaxy S4 (i9505) 143 121 1684.4.2

Motorola RAZR i(XT890) 176 249 1234.0.4

Nexus S 235 164Not supported 4.1.2

Sony Xperia U 167 173 1672.3.7

HTC Incredible S 333 173 1764.0.4

Motorola Droid RAZR(XT912) 250 190 2584.1.2

Motorola RAZR D1(XT914) 319 217 2074.1.2

Alcatel OT Idol Ultra 6033X 303 217 2114.1.1

Asus FonePad7 257 212 2124.4.2

Vodafone Smart Mini/TCT 875 304 227 2334.1.1

Oppo R819 244 274 2364.2.1

Samsung GT-S5300 814 389 3162.3.6

Samsung Galaxy S3 822 328 3764.0.4

Asus Memo Pad HD7 313 202 2214.2.1

Page 10: Everything you never wanted to know about mobile voip

9

o iOS superior

o Android 5 > 4.4 > 4.2 > …

o Nexus 4, 5, Galaxy Nexus

o Speakerphone adds 20ms

Page 11: Everything you never wanted to know about mobile voip

10

o iOS 20ms

o Android 100 – 800

o WP8 200ms

o 3g: 80ms

o LTE: 20ms

o WiFi: 10ms

o All to or from PSTN - OK

o All to or from iOS - OK

o Android / wp8 to android / wp8 - ?

Page 12: Everything you never wanted to know about mobile voip

11

Latency

Quality

Reliability

Battery Life

Page 13: Everything you never wanted to know about mobile voip

12

No SPEEX!

Use OPUS with FEC

8 or 16kHz

Pick a phone with native

sample rate != 44.1kHz

Page 14: Everything you never wanted to know about mobile voip

13

Native: 44.1kHz

Open: 48kHz

Codec: 8kHz

Open at native sample rate or

codec sample rate!

Page 15: Everything you never wanted to know about mobile voip

14

Latency

Quality

Reliability

Battery Life

Page 16: Everything you never wanted to know about mobile voip

15

Signaling:

Outgoing Calls

Incoming calls

Page 17: Everything you never wanted to know about mobile voip

16

Common configuration:

UDP:5060

Page 18: Everything you never wanted to know about mobile voip

17

SIP INVITE too big for the network ?

Page 19: Everything you never wanted to know about mobile voip

18

UDP fragmentation issue

Last part of the SDP never arrives

Unexpected media negotiation

It’s EASY… Use TCP

Page 20: Everything you never wanted to know about mobile voip

19

Oops!

Android drops SIP traffic on TCP

ALG firewalls often break TCP SIP

Page 21: Everything you never wanted to know about mobile voip

Meet OlleToday, 4PMThe open Communication Revolution Agenda

Page 22: Everything you never wanted to know about mobile voip

16

Oops!

Android ships with broken

certificate store*!

(and windows phone 8.0 does

not have an accessible one)

*”slightly” dramatized to annoy Olle!

Page 23: Everything you never wanted to know about mobile voip

21

Use:

TCP != 5060

TLS (443)

IAX2

Page 24: Everything you never wanted to know about mobile voip

22

Incoming Calls

Page 25: Everything you never wanted to know about mobile voip

19

SIP Registrations

This is my IP and PORT

Page 26: Everything you never wanted to know about mobile voip

19

Registrations & Server load

Server Registration rate limiting

Page 27: Everything you never wanted to know about mobile voip

20

Registrations & High server load?

• Put reasonable limit / 24h

Page 28: Everything you never wanted to know about mobile voip

23

Registrations & NAT

Page 29: Everything you never wanted to know about mobile voip

24

NAT Time-Outs:

UDP = 30s ~ 2.5m

TCP = 2 hr minimum

(RFC5382)

Page 30: Everything you never wanted to know about mobile voip

25

if

NAT Time-Out

<

registration expiry time

=

No incoming calls!

Page 31: Everything you never wanted to know about mobile voip

26

NAT Time-Outs:

UDP = 30s ~ 2.5m

Too high server load!

Use TCP

TCP timeout = 2h (RFC5382)

Page 32: Everything you never wanted to know about mobile voip

27

Ooops!

• 3G/4G will reset idle TCP connections after 10 to 120m

• Many NAT’s do not follow the RFC for TCP

• Cheap NAT’s have limited memory for mapping db

Page 33: Everything you never wanted to know about mobile voip

28

Ooops!

• 3G/4G will reset idle TCP connections after 10 to 120m

• Many NAT’s do not follow the RFC

• Cheap NAT’s have limited memory for mapping db

re-register = 30s?

Page 34: Everything you never wanted to know about mobile voip

29

iOS only allows wakeup after 10min

Page 35: Everything you never wanted to know about mobile voip

30

iOS only allows wakeup after 10min

Server OPTIONS every 30s ?

Page 36: Everything you never wanted to know about mobile voip

31

iOS will kill the app.

Limit

OPTIONS

PUBLISH

NOTIFY

Page 37: Everything you never wanted to know about mobile voip

32

iOS kills the app?

30s TCP Keep Alive?

Page 38: Everything you never wanted to know about mobile voip

33

Many keep alive packets

decrease battery

(and increase bandwidth)

Page 39: Everything you never wanted to know about mobile voip

34

Test Setup:

RangeNetworks Dev Kit (OpenBTS)

Couple of phones

4 simcards

2 WiFi AP

Page 40: Everything you never wanted to know about mobile voip

35

Test Setup:

Inconclusive

Data & graphs

from Michigan University, AT&T,

Nokia whitepapers.

Page 41: Everything you never wanted to know about mobile voip

36

DCH

PCH

FACH

Page 42: Everything you never wanted to know about mobile voip

37

Page 43: Everything you never wanted to know about mobile voip

38

*#*#0011#*#**#*#197328640#*#*

*#*#7378423#*#**#*#4636#*#*

*3001#12345#*

Page 44: Everything you never wanted to know about mobile voip

37

*#*#0011#*#**#*#197328640#*#*

*#*#7378423#*#**#*#4636#*#*

*3001#12345#*

Page 45: Everything you never wanted to know about mobile voip

40

* Something is wrong with the scale here

Page 46: Everything you never wanted to know about mobile voip

41

* Something is wrong with the scale here

Page 47: Everything you never wanted to know about mobile voip

42

* Something is wrong with the scale here

Page 48: Everything you never wanted to know about mobile voip

43

30s 60s 600s 3600s

Wifi* +2% +1.3%

3G x12 x6 x2 x1.1

LTE x20 x10 x2.5 x1.2

Radio Energy Usage

*WiFi is rarely the only active radio

Radio is not the only battery eater

Other processes are using the radio too

Page 49: Everything you never wanted to know about mobile voip

44

What is the optimal setting for the

Keep-alive ?

Page 50: Everything you never wanted to know about mobile voip

45

What does google use ?( Dial *#*#8255#*#* or *#*#426#*#* )

• every 28 minutes on cellular

• every 15 minutes on WiFi

[email protected]

Page 51: Everything you never wanted to know about mobile voip

45

What does google use ?( Dial *#*#8255#*#* or *#*#426#*#* )

• every 28 minutes on cellular

• every 15 minutes on WiFi

Page 52: Everything you never wanted to know about mobile voip

46

o Mobile app for timeout detection.

o Check and adjust values for every network.

Page 53: Everything you never wanted to know about mobile voip

47

WiFi (Pfsense)TCP: more than 15hUDP: 30s

Globul 3GTCP: 1800s or 3600sUDP: 120s

Mtel 3GTCP: 600sUDP: 120s

Max Telecom LTETCP: 3600sUDP: 180s

Page 54: Everything you never wanted to know about mobile voip

481

Use TCP !=5060

TLS 443

TCP timeout as needed

Register >360s

Page 55: Everything you never wanted to know about mobile voip

491

Oops

No Background on WP 8

Page 56: Everything you never wanted to know about mobile voip

491

Oops

No Background on WP 8

It’s EASY…PUSH!

Page 57: Everything you never wanted to know about mobile voip

52

PUSH Limitations:

- It is relatively slow

- Requires server changes

Invite queue, registration time

Page 58: Everything you never wanted to know about mobile voip

53

PUSH Limitations:

iOS + Android push is per app!

Page 59: Everything you never wanted to know about mobile voip

54

PUSH Advantage:

Works with APP stopped

Page 60: Everything you never wanted to know about mobile voip

55

So what is the (best) solution ?

Page 61: Everything you never wanted to know about mobile voip

56

So what is the (best) solution ?

Use TCP/TLS + Push!

Page 62: Everything you never wanted to know about mobile voip

MobileVoIPQuestions ?

Joachim Vanheuverzwijn aka Zoa

[email protected]