Post on 11-Jan-2016
description
CS644Advanced Topics in
Networking
VoIP
Wed, 2004/9/8
2
VoIP
• Basics• Codecs• Performance issues
– Delay, loss, quality– Other subjective/objective measures
• Available tools
3
History of VoIP
• 1980s– Packet voice over satellite links in Lincoln Lab
• Early 1990s– MBone popularized audio and video conferenci
ng tools– Nevot, vat, vic, rat
• Late 1990s– Commercialization of VoIP
4
Digitizing Voice
쏼 ~~ 라 쏴 ~ ㄹ ~~ ㄹ ~~~~~~~ 라 ~~
Time
5
Talkspurts
Talk and Silence in Voice
쏼 ~~ 라 쏴 ~ 라 ~~
Time
Silence period
6
Voice to Packets
쏼 ~~ 라 쏴 ~ 라 ~~
Time
Look-ahead
7
Popular Waveform Codecs
• PCM (Pulse Code Modulation)– G.711– Audible frequency (300-3KHz)– By Nyquist theorem, sample 8bits at 8KHz = 6
4 Kbps
• ADPCM (Adaptive Differential PCM)– G.726– Sample differences: 4bit at 8KHz
8
Alternative for compression
• companding– non-linear quantization: μ-law (G.711)
• waveform– exploit statistical correlation
• model– model voice, extract parameters
• subband– split signal into bands and cod e individually (MPEG au
dio)• exploit masking properties of human ear
9
Other Codecs
• G.729 for mobile telephony– Conjugate structure, algebraic-code-excited linear prediction (CS-ACELP)– 80bits at 100Hz = 8 kbps– requires 40% of 100MHz Pentium– G.729A: reduced-complexity version
• G.723.1 for videotelephony– MP-MLQ (Multipulse, multilevel quantization)– 30ms blocks of 240 16-bit samples into 24B = 6.3kbps– requires 25% of 100MHz Pentium
• GSM full rate– GSM 06.10, 13Kbps– Regular Pulse Excited (RPE) codec– GSM 06.20 = half-rate
10
Basic Attributes of Codecs• Bit rate
– economy of bandwidth– in multimedia applications, more b/w to video
• Silence compression– voice activity detector (VAD)– discontinuous transmission (DTX)– comfort noise generator (CNG)
• Complexity– limiting factor in terms of memory and CPU (e.g. in portable devicies)
• Delay– frame-size, look-ahead: algorithmic delay– processing delay: depends on complexity and H/W
• Resilience to loss• Quality• Others
– layered coding– decoding telephone digits?
11
RTP/RTCP
• Use of Real Time Protocol – adds sequence number, timestamp, payload ty
pe
• Use of Real Time Control Protocol– transmits control packets to participants– offers feedback on performance– correlate and synchronize different media stre
ams
12
RTP Header
Version
Padding
Extension bit
A/V encoding method Sequence Number
Timestamp
Synchronization Source Identifier (SSRC)
Payload
13
Session Management
• H.323• SIP (Session Initiation Protocol)
– e2e, client-server session signalling protocol– not a transport/QoS reservation/gateway contr
ol protocol
14
H.323
• Suite of ITU-T recomm. protocols for multimedia collaboration among 2+ entities
• H.225.0-Q.931– pt2pt call signalling– initiation/proceeding/alerting/connection/termination
• H.245– call-control– master-slave determination/terminal capability set/log
ical channel management/
15
H.323 Call Flow
Setup
Alerting/Connect
Capabilities Exchange / MSD
Open Logical Channel
Open Logical Channel Acknowledge
RTP Stream
RTP Stream
RTCP Stream
H.225(TCP port 1720)
H.245(TCP dynamic port)
UDP
End System A
End System B
16
Key Components of SIP
• SIP end devices– UA client (originates calls)– UA server (listens for incoming calls)
• SIP workhorses– proxy server
• relays call signaling (i.e. acts as both client/server)– redirect server
• redirects callers to other servers– registar
• accept registration requests from users• maintains user’s whereabouts at a Location Server
17
Basic SIP Capabilities
• user location– correct device with which to comm to reach a particula
r user• user availability
– willing/able to take part in a session• user capabilities
– determines choice of media, codecs• session setup
– establishes session parameters, s.a. port nubmers• session management
– call forwarding, modifying session parameters
18
SIP RFC 2543 Methods
• INVITE• ACK• BYTE• CANCEL• OPTIONS• REGISTER
19
Session/Call Control - SIP
cisco.com proxy
princeton.eduproxy
mypc.cisco.com yourpc.princeton.edu
Sue@cisco.com Meeyoung@princeton.edu
20
Performance Issues
• Delay– transmission, router-processing, propagation, and que
ueing delays– packetization
• Loss– network drop– late arrival
• FEC (Forward Error Correction)– Adds redundant data– Issues?
21
Playout Delay Adjustment
쏼 ~~ 라 쏴 ~ 라 ~~
쏴 ~~ 라 쏴 ~ 라 ~~쏴 ~~ 라 쏴 ~ 라 ~~
Playout Delay
22
Voice Quality Rating Measures
• MOS (Mean Opinion Score)– range of 1.0 to 4.5 (very poor to best)– mean of response scores of human beings
• PSQM– Perceptual Speech Quality Measurement– Automated human listener– Designed to measure the perceived quality of codec-quality voice based
on– Evaluates original signal against “perceptual model” and compares code
d signal againt it based on• distortion, effects of noise, and overall perceptual fidelity
• E-model– ITU-T Recommendation G.107– range of 0 to 100– R = R0 -Is- Id- Ie+A– effects of noise, simultaneous impairments at quantization, mouth-to-de
lay impairment, signal distortion, advantage factor (willingness to tolerate deterioration)
23
Readily Available Tools
• Audio on Linux– /dev/audio for μ-law– /dev/dsp for general samples
• Java sound I/F– java.sun.com/proudcts/java-media/sound/– higher layer
• Java Media Framework (JMF) includes RTP
24
Other Public VoIP Tools
• rat (Robust Audio Tool)– http://www-mice.cs.ucl.ac.uk/multimedia/soft
ware/rat/
• Public VoIP S/W repository– http://www.vovida.org/
• Many VoIP freeware for Windows
25
References
• Voice over IP Fundamentals, J. Davidson, J. Peters, 2000, Cisco Press
• ITU-T Recomm. P.861 [PSQM]• IP Telephony with H.323, V. Kumar, M. Korpi, S. Sengodan, 2000,
Wiley [H.323]• C. Boutremans, J-Y Le Boudec, “Adaptive Joint Playout Buffer and
FEC Adjustment for Internet Telephony”, INFOCOM 2003