VoIP, SIP, and QoS Essentials Guide
VoIP, SIP, and QoS Essentials Guide
1/15/2014
Slides may not fully represent what you see on the online training (in fact some
slides are blank where quizzes and other animated elements and embedded
webpages should be) and again, this PDF is an 'aid' not a replacement for the online
material. Images are not of the same quality as seen online due to PDF compression
settings
The 'principle' of the online material is that as SIP evolves, so does the online
material. Consequently, a PDF you download today may not reflect what's on the
screen tomorrow.
This PDF is not for distribution of any kind and is protected by copyright for Vocale
Ltd, the owner of The SIP School. Distribution of any kind will result in your logon
being revoked plus any additional action that Vocale Ltd deems necessary. 1
Topics Topics
What is VoIP?
1/15/2014
Router
Switch Router Switch
WAN
A B
A B
C D
E F
4
Data 1
Data 2
Data 3
Data 4
Voice 1
No resends!
Voice 2
No Acknowledgements
Voice 3
Voice 4
‘Real Time’ Applications
6
1/15/2014
E.g. Microsoft’s OCS and Lync systems only support TCP for
signalling.
A Note on TCP
Internet
1/15/2014
Private
WAN
(Gateway ) Gateway
IP to TDM (TDM to IP)
10
Signaling Paths
IP PBX DHCP
DNS
TFTP
NTP
Analog
SIP
T1/E1
PRI
PSTN
Private Internet
IP WAN
SIP trunks
Softphone on PC
IP Phones
11
Speech Paths
IP PBX
Analog
SIP?
T1/E1
PRI
PSTN
Private Internet
IP WAN
VoIP/RTP
VoIP/RTP
Softphone on PC
IP Phones
12
1/15/2014
IP PBX Advantages
ITSP
PSTN
PSTN
VoIP
PRI line?
SIP trunk
IP
14
Encoding 1
This analogue waveform represents the words “Hi, how are you?”
and takes about 3 seconds to say.
15
1/15/2014
Encoding 2
= a Sample
0.001 second
Encoding 3
= a Sample
0.001 second
17
Encoding 4
Analogue
Analogue
waveform
waveform
Encoder
Binary
e.g. Data
G.711
Analogue waveform
De-coder
e.g. G.711
18
1/15/2014
G.711 A Law This is the uncompressed version of the µ-Law codec for calls to 4.3 8
areas other than North America and Japan
G.729 This is a codec produces compressed voice by using a special model 3.7 18
(Annex A,B or J) called Code Excited Linear Prediction (CELP). Sample rate of (8
kbit/s)
G.723 This is a codec that compresses voice and uses Voice Activity 3.9 4
Detection (MOS for 6.3kbits sampling variant)
G.722 In it’s G.722.2 variant this codec can adapt it’s sampling rate in 4.3 9
reaction to network congestion. The less congestion the higher the
quality of the samples. It also samples at 16Khz to produce a superior
quality to other codecs
iLBC Internet Low Bit Rate Codec. This is a relatively new codec designed 3.8 Dynamic
to work well over the Internet
19
[Link]
20
HD Voice
Consonants
Presence, Depth such as ‘s’ and So you think a MOS
Consonants of 4.3 is good
and Richness of ‘f’ can be clearly
sound heard enough now?
21
1/15/2014
[Link] 22
G.722 [Link]
G.722.1 [Link]
G.722.2 [Link]
AMR-WB + [Link]
Speex [Link]
RTAudio [Link]
SILK [Link]
Opus [Link]
G.729/G.711/G.722.2
I use
23
24
1/15/2014
Opus examples
25
26
– RTP ‘Does Not’ provide any service that guarantees timely delivery of
the payload
– It ’Does Not’ provide any quality of service guarantees.
– It ‘Does’ rely on lower layer protocols to provide these extra services
27
1/15/2014
RTP Encapsulation
Sequence Numbers
Layer 1 10010101010010010101010011110011001
28
29
The Real Time Control Protocol (RTCP) can be used alongside RTP in order to
provide information on the session and the participants
It carries an ID for a device that is transmitting the RTP data and this is called a canonical name or
CNAME (also known as an alias). Even if the Synchronization source changes (in the case of another
stream being introduced from the same device or machine) the CNAME remains the same. This helps
to identify participants in a session and is useful as these participants can join and leave sessions
dynamically.
30
1/15/2014
The Real Time Control Protocol (RTCP) can be used alongside RTP in order to
provide information on the session and the participants
It carries an ID for a device that is transmitting the RTP data and this is called a canonical name or
CNAME (also known as an alias). Even if the Synchronization source changes (in the case of another
stream being introduced from the same device or machine) the will CNAME remains the same. This
helps to identify participants in a session and is useful as these participants can join and leave
sessions dynamically.
The Types of RTCP Packet are:
SR - This is the Sender report. Shows the statistics on transmission and reception for the
participants in the session that are actively sending data
RR - This is the Receiver report and it shows the reception statistics from participants that
are not actively sending data in the session
SDES - The Source description items including identifying information such as the
CNAME and allows the binding of SSRC value with an actual id of the user.
APP - This denotes Application specific functions that will effect/interact with the session
XR – This is an RTCP extension that can help provide a ‘rich set’ of data for voice
management – if it is implemented in VoIP devices
31
RTCP XR is a VoIP management protocol that defines a set of metrics that contain information
for assessing VoIP call quality and diagnosing problems.
The protocol measures VoIP call quality using these following key metrics:
Packet loss and discard rate and the distribution of lost and discarded
packets
Round-trip delay
Configuration data such as jitter buffer size and configuration, and the type of
packet-loss concealment algorithm in use.
32
UDP (Layer 4)
RTP RTCP
1/15/2014
34
36
1/15/2014
37
38
QoS Issues
1/15/2014
Measuring Delay
Delay will be different for every site install dependent on the network installed. In a
Pinging [Link] with 238 bytes of data
fully switched Ethernet environment delay will not be a problem in normal
to simulate a G.711 voice frame
operation. However, routers will insert more delay into a network so voice over IP
connections via a router require careful engineering
Most manufacturers recommend that end to end delay be no more than 200ms.
Of this 200ms up to 80ms when an IP Set is connected through an IP PBX.
Allowing for up to 40ms delay in the PSTN without echo cancellation leaves 80ms
available for use in the customer’s network.
Network Reply
delay locations are varied, but include
from [Link]: such areas
bytes=238 as -: TTL=64
time=40ms
Reply from [Link]: bytes=238 time=40ms TTL=64
Reply from
Hardware [Link]:
Delay’s bytes=238 time=40ms TTL=64
through the network
Variable
Reply delays,
from e.g. Router Queues.
[Link]: bytes=238 time=40ms TTL=64
Transit delays (the time to traverse networks) 40
Processing delay in the end devices.
Packet loss means that a voice packet was sent, lost in transit and the far end never received
it. As long as packet loss stays low i.e. below 5%, this should not affect speech quality.
41
[Link]
42
1/15/2014
QoS Everywhere!
Customer Site 1
IP/MPLS
Layer 3 Provider Network
Layer 2
Classification
Classification
Edge Routers
Customer Site 2
Check here!
Delay/Jitter/Packet Loss
Customer Site 2
Private WAN
Leased Line?
Layer 3
Layer 2
43
If the switch is
left in it’s default
state, i.e. VLANS
are not configured
then a broadcast
from any device
can hit any other
device connected
to the switch.
44
VLAN 1 VLAN 2
(Default)
1/15/2014
802.1Q/P Tagging
46
802.1P - L2 Classification
7
6
5
4
FTP RTP RTP
3
0
2
1
ingress egress
47
IP Datagram / Header
Header
Version Type of Service / DSCP
length
7 6 5 4 3 2 1 0
ToS
1 0 1 =5
DSCP
1 0 1 1 1 0 = 46
48
1/15/2014
Layer 3 Classification
HIGH
MEDIUM
Classify
Typical
NORMALDatagram Value = 0 Egress port
LOW
Voice Datagram Value = 46
49
50
ITSP
(for Trunks)
Upload Bandwidth
Caller
Symmetric DSL
• Same Upload as Download Speeds
• Usually lower contention ratios
• Often come with SLA
• Better calculate ‘VoIP allowance’
51
1/15/2014
[Link] 52
53
54
1/15/2014
PROXY 1 PROXY 2
UA 1 AR 1 AR 2 UA 2
[Link]
55
PROXY 1 PROXY 2
Proxy
• Processing Authentication
• Maintaining ‘State’ information
• Understanding ‘other services’
• Verifying UA re: Precedence
requests
UA 1 AR 1 • Working ARwith
2 the Access Router
UA 2
• When to Pre-empt?
• Maintain all records
Access Router
• Transfer packets
• Packets, pass or stop?
56
Resource-Priority
57
1/15/2014
Accept-Resource-Priority
200OK 200OK
Accept-Resource-Priority: [Link]
UA 1 AR 1 AR 2 UA 2
58
[Link]
Jason Opdycke
59
INVITE
200 OK
ACK
Media Stream
INVITE
200 OK
ACK
Media Stream
[Link]
header-for-preemption-04 60
1/15/2014
61
PROXY 1 PROXY 2
Better get
confirmation SIP Trunks x 5 I guess this
from Dave Capacity ~ 500Kbps Total is important
Assume 100k / call John?
UA 1 AR 1 AR 2 UA 2
I’ve been
dropped!
62
Resource Priority
Accept Priority
Open standard
AS-SIP
REASON HEADER
RESOURCE PRIORITY
MLPP 63
1/15/2014
64
65
66
1/15/2014
67
68
UDP (Layer 4)
Audio
Video
69
1/15/2014
Summary
In this module we have looked at Voice over IP along with the types of implementation you may
1 come across
We have looked at how voice is sampled along with focusing on some of the main codecs in use
2 along with a few suggestions on which to use for VoIP
As you’ve seen, RTP carries the actual data payload and RTCP carries control information. Again,
3 we looked at a trace to see exactly what is happening on the network re: RTP and RTCP
Quality of Service is something that all VoIP implementers must strive for. It is not a single solution
4 or device it is a culmination of good practices across the whole of the IP network
Assured SIP services may be something worth looking at if you want to be able to prioritize traffic
5 to ensure important call completion when traffic levels are high.
Of course we are really concerned about SIP and SDP so we looked at how SDP can convey
6 information to help SIP devices select functions such as which codec to use in a session
70
71
72
1/15/2014
73
End
74