Download presentation
Presentation is loading. Please wait.
Published byJorge Hinkson Modified over 9 years ago
1
Copyright 2003-2010 © by Elliot Eichen. All rights reserved. RTP – Real Time Protocol (and RTCP)
2
Copyright 2003-2010 © by Elliot Eichen. All rights reserved. RTP Signaling can be mediated by devices in the middle of the network (SIP Proxies, softswitches, gatekeepers, etc.). –For SIP, this is the typical call flow. (draw ex.) –For H323, gatekeeper direct is typical, which means signaling typically happens between endpoints. (draw ex.) RTP (media) often occurs between the endpoints, although there are important instances where this is not the case. –Some enterprise (cisco call manager): firewall issue –Blind re-file (wholesale)
3
Copyright 2003-2010 © by Elliot Eichen. All rights reserved. RTP RTP – carries real time data. RTPC – control port that carries information to monitor quality of service. +1 port
4
Copyright 2003-2010 © by Elliot Eichen. All rights reserved. Voice Codecs – Bandwidth Consumption Pulse Code Modulation CodecBuffer Layer 3 (RTP/UDP/IP) +Layer 2 Encapsulation Analog waveform 64 kbps 6-16 kbps ~10-40 msec 40 bytes/sec Physical Layer (wire)
5
Copyright 2003-2010 © by Elliot Eichen. All rights reserved. How this all works?
6
Copyright 2003-2010 © by Elliot Eichen. All rights reserved. How this all works? (2)
7
Copyright 2003-2010 © by Elliot Eichen. All rights reserved. Bandwidth requirement: G729 Example For G729, voice is 8 kbits/sec. Assume 20ms payload. Packet payload size = 8 kbits/sec X 20ms = 160 bits = 20 bytes/packet. IP Packet = 60 bytes. For Cisco HDLC (cisco-cisco router serial), add 5 bytes header, 3 bytes trailer. Bandwidth = (63 bytes/20ms)*(8 bits/byte) = 25.2 kbps Efficiency = 8 kb/s / 25.2 kb/s ~ 32%. Number of packets/sec = 1sec/.02sec. Loss of 1 packet/sec = 2% packet loss! ΔDelay = buffer (20ms) + codec delay + layer2/3 delay + queuing delay + codec delay IP 20 bytes UDP 8 bytes RTP 12 bytes G729 Payload 20 bytes IP 20 bytes UDP 8 bytes RTP 12 bytes G729 Payload 20 bytes HDLC 5 bytes HDLC 3 bytes
8
Copyright 2003-2010 © by Elliot Eichen. All rights reserved. Bandwidth requirement: G729 Example #2 Assume 60 ms packets. Packet payload size = 8 kbits/sec X 60ms = 60 bytes/packet. IP Packet = 60 bytes. For ethernet, 14 byte header, 4 byte trailer => bandwidth = (118 bytes/60ms)*(8bits/byte) = 15.7 kb/s Efficiency = 8 kb/s / 15.7 kb/s ~ 50%. Number of packets/sec = 1sec/.06sec. Loss of 1 packet/sec = 6% packet loss! IP 20 bytes UDP 8 bytes RTP 12 bytes G729 Payload 60 bytes IP 20 bytes UDP 8 bytes RTP 12 bytes G729 Payload 60 bytes Ethernet 14 bytes Ethernet 4 bytes
9
Copyright 2003-2010 © by Elliot Eichen. All rights reserved. Codec Table
10
Copyright 2003-2010 © by Elliot Eichen. All rights reserved. What is iLBC? iLBC (internet Low Bitrate Codec) is a FREE sppech codec suitable for robust voice communication over IP. The codec is designed for narrow band speech and results in a payload bit rate of 13.33 kbps with an encoding frame length of 30 msec and 15.20 kbps with an encoding length of 20 msec. The iLBC codec enables graceful speech quality degradation in the case of lost frames, which occurs in connection with lost or delayed IP packets. Features Bitrate 13.33 kbps (399 bits, packetized in 50 bytes) for the frame size of 30 msec and 15.2 kbps (303 bits, packetized in 38 bytes) for the frame size of 20 msec. Basic quality higher then G.729A, high robustness to packet loss. Computational complexity in a range of G.729A. Royalty Free Codec.
11
Copyright 2003-2010 © by Elliot Eichen. All rights reserved. Codecs – PacketCable Spec Codecs defined in this specification MUST be encoded witht he following string names in the rtpmap parameter: Codec RTP Map Parameters For the use in the SDP, the Rtpmap parameter (i.e., PCMU/8000 in the case of μ- law) is used. Unknown Rtpmap parameters SHOULD be ignored if they are received. 13.3 and15.2 kbps kbps 16 kbps 8 kbps 11.8 kbps
12
Copyright 2003-2010 © by Elliot Eichen. All rights reserved. Summary (PAMS listening score only)
13
Copyright 2003-2010 © by Elliot Eichen. All rights reserved. Codecs – “Your mileage may vary” Large perceived quality difference between PSTN quality (MOS=4.1) and cell quality (MOS=3.5) Codecs respond differently to packet loss, delay, noise, multiple transcodings, etc. It’s not just the MOS/PSQM measurement that counts. There are also licensing issues ($$), what the call is being used for (messaging, conferencing, etc.), and DSP HP required. The number of frames/packet can be dynamically adjusted to tradeoff quality for efficiency. Header compression can drastically improve efficiency – at the expense of router processing power. VoIP Community has – for the most part – converged around G711, G729. Some application for G726 (packs better into ATM). EE thinks that GSM interworking is very important!
14
Copyright 2003-2010 © by Elliot Eichen. All rights reserved. Speech Coders: Lots of Code, DSP intensive
15
Copyright 2003-2010 © by Elliot Eichen. All rights reserved. Bandwidth reduction IP – almost by definition - is less bw efficient than PSTN. Bandwidth reduction where the cost for bandwidth is at a premium – typically tail circuits, or some international destinations. VAD (Voice Activity Detection). Rule of thumb is 1/3-1/2 reduction in bw. Cost is voice quality (clipping), poor performance in conferencing. Header Compression –Compressed RTP: Hop-to-hop, requires decompression and compression at each hop. For G279, = 12.8 kb/s –VoMPLS: New, not sure of what it takes beyond MPLS. End-to-end (not hop-to-hop), likely to be much less router CPU intensive.
16
Copyright 2003-2010 © by Elliot Eichen. All rights reserved. Header Compression Example Conventional frame G729 = 25.2 kbps Compressed frame G729 = 12.8 kbps CRTP 4 bytes G729 Payload 20 bytes IP 20 bytes UDP 8 bytes RTP 12 bytes G729 Payload 20 bytes HDLC 5 bytes HDLC 3 bytes HDLC 5 bytes HDLC 3 bytes
17
Copyright 2003-2010 © by Elliot Eichen. All rights reserved..wav Microsoft/IBM Spec PCM with bandwidth = SxBxC –S = Sample Rate (samples/sec) –B = Bits/Sample –C = Channels For example, audio might be 44 kHz sampling rate at 16 bits/sample and 2 channels = 1.4 Mb/s. Another example might be voice mail in an email attachment (try it – right click on a.wav file) – 8kHz sampling and 16 bits/sample = 124 kb/s. Conversion between audio formats! Interesting (how do you go from compressed format to un-compressed formats).
18
Copyright 2003-2010 © by Elliot Eichen. All rights reserved. Tradeoffs – a: Efficiency vs Latency & Packet Loss b: Codec bandwidth vs CPU cycles Short Packets = low latency, tolerates packet loss better, inefficient. Large Packets = long latency (got to wait for buffer to fill up before shipping out packet), does not tolerate packet loss as well (loss of many bytes hurts!), more efficient. Narrowband high quality codecs => more processing (cpu cycles) than either poor quality or less compression. Why not something BETTER than G711?
19
Copyright 2003-2010 © by Elliot Eichen. All rights reserved. Voice Codecs – Bandwidth Consumption Pulse Code Modulation Codec (compression) Buffer Layer 3 (RTP/UDP/IP) +Layer 2 Encapsulation Analog waveform 64 kbps 6-16 kbps ~10-40 msec 40 bytes/sec Physical Layer (wire) Getting from pt A to pt B Layer 2/3 Jitter Buffer ~1-2 packets Codec PCM
20
Copyright 2003-2010 © by Elliot Eichen. All rights reserved. Transcoding – From codec to codec
21
Copyright 2003-2010 © by Elliot Eichen. All rights reserved. Marginal delay - Example Δ Delay = buffer + codec + layer2/3 + queuing + network congestion + jitter + codec. If buffer = 20ms, codec = 12ms, layer2/3 = 2ms, queuing = 1ms, jitter = 20ms, => Delay ~ 70 ms. Rule of thumb => Total Delay < 150ms for Toll Quality. If NY LA is 35 ms, it’s OK. If NY Sydney = 100 ms, it’s marginal. Total Delay = point-point delay (c/n + ?) + Δ Delay. Transcoding = twice the Δ Delay => it’s a killer!
22
Copyright 2003-2010 © by Elliot Eichen. All rights reserved. Distances (NY to...) & One Way Delay Discrepancy Between Calculated and Actual Delays –Great Circle vs. as the railroads/cables run. –Multiple Hops –Congestion 1 2 1 great circle route 2 http://ipnetwork.bgtmo.ip.att.net/pws/network_delay.html
23
Copyright 2003-2010 © by Elliot Eichen. All rights reserved. Jitter- not such a big deal in modern networks? Why is Jitter Important? –If jitter > receive buffer size, jitter = packet loss. Tradeoff between Receive Buffer Size and Latency. –Bigger Receive Buffer => Better immunity to packet jitter.. But.. longer latency! It all depends.. but it is typical to have a +/- 1 pakcet jitter buffer.
24
Copyright 2003-2010 © by Elliot Eichen. All rights reserved. Summary (PAMS listening score only) What about wideband codecs (G722, speex, AAC, etc.)? Should also include wireless codecs including GSM and the CDMA equivalent.
25
Copyright 2003-2010 © by Elliot Eichen. All rights reserved. Why VoIP so cool? The codecs make the voice sounds lousy. It’s less efficient than circuit switched voice. It has all these QoS issues (latency/packet loss). It’s driven down the price that can be charged for a call so that there are no $$ to be made.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.