everything you never wanted to know about mobile voip

Post on 17-Jul-2015

173 Views

Category:

Technology

2 Downloads

Preview:

Click to see full reader

TRANSCRIPT

MobileVoIPBest

Practices

Joachim Vanheuverzwijn aka Zoa

Joachim@zoiper.com

1

Latency

Quality

Reliability

Battery Life

2

o End to end latency - max 500ms!

3

o Network Latency

o Audio Latency

o Algorithmic Delay

4

o Network (best case)

2G: 400ms

3G: 80ms

LTE: 20ms

WiFi: 10ms

+ transit!

5

o Network Latency

o Audio Latency

o Algorithmic Delay

6

Available for android, (ios, wp8)

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

6

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

9

o iOS superior

o Android 5 > 4.4 > 4.2 > …

o Nexus 4, 5, Galaxy Nexus

o Speakerphone adds 20ms

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 - ?

11

Latency

Quality

Reliability

Battery Life

12

No SPEEX!

Use OPUS with FEC

8 or 16kHz

Pick a phone with native

sample rate != 44.1kHz

13

Native: 44.1kHz

Open: 48kHz

Codec: 8kHz

Open at native sample rate or

codec sample rate!

14

Latency

Quality

Reliability

Battery Life

15

Signaling:

Outgoing Calls

Incoming calls

16

Common configuration:

UDP:5060

17

SIP INVITE too big for the network ?

18

UDP fragmentation issue

Last part of the SDP never arrives

Unexpected media negotiation

It’s EASY… Use TCP

19

Oops!

Android drops SIP traffic on TCP

ALG firewalls often break TCP SIP

Meet OlleToday, 4PMThe open Communication Revolution Agenda

16

Oops!

Android ships with broken

certificate store*!

(and windows phone 8.0 does

not have an accessible one)

*”slightly” dramatized to annoy Olle!

21

Use:

TCP != 5060

TLS (443)

IAX2

22

Incoming Calls

19

SIP Registrations

This is my IP and PORT

19

Registrations & Server load

Server Registration rate limiting

20

Registrations & High server load?

• Put reasonable limit / 24h

23

Registrations & NAT

24

NAT Time-Outs:

UDP = 30s ~ 2.5m

TCP = 2 hr minimum

(RFC5382)

25

if

NAT Time-Out

<

registration expiry time

=

No incoming calls!

26

NAT Time-Outs:

UDP = 30s ~ 2.5m

Too high server load!

Use TCP

TCP timeout = 2h (RFC5382)

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

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?

29

iOS only allows wakeup after 10min

30

iOS only allows wakeup after 10min

Server OPTIONS every 30s ?

31

iOS will kill the app.

Limit

OPTIONS

PUBLISH

NOTIFY

32

iOS kills the app?

30s TCP Keep Alive?

33

Many keep alive packets

decrease battery

(and increase bandwidth)

34

Test Setup:

RangeNetworks Dev Kit (OpenBTS)

Couple of phones

4 simcards

2 WiFi AP

35

Test Setup:

Inconclusive

Data & graphs

from Michigan University, AT&T,

Nokia whitepapers.

36

DCH

PCH

FACH

37

38

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

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

*3001#12345#*

37

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

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

*3001#12345#*

40

* Something is wrong with the scale here

41

* Something is wrong with the scale here

42

* Something is wrong with the scale here

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

44

What is the optimal setting for the

Keep-alive ?

45

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

• every 28 minutes on cellular

• every 15 minutes on WiFi

Joachim@zoiper.com

45

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

• every 28 minutes on cellular

• every 15 minutes on WiFi

46

o Mobile app for timeout detection.

o Check and adjust values for every network.

47

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

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

Mtel 3GTCP: 600sUDP: 120s

Max Telecom LTETCP: 3600sUDP: 180s

481

Use TCP !=5060

TLS 443

TCP timeout as needed

Register >360s

491

Oops

No Background on WP 8

491

Oops

No Background on WP 8

It’s EASY…PUSH!

52

PUSH Limitations:

- It is relatively slow

- Requires server changes

Invite queue, registration time

53

PUSH Limitations:

iOS + Android push is per app!

54

PUSH Advantage:

Works with APP stopped

55

So what is the (best) solution ?

56

So what is the (best) solution ?

Use TCP/TLS + Push!

MobileVoIPQuestions ?

Joachim Vanheuverzwijn aka Zoa

Joachim@zoiper.com

top related