Shivkumar KalyanaramanRensselaer Polytechnic Institute
1
Internet Telephony
Shivkumar KalyanaramanBased upon slides of Henning Schulzrinne (Columbia)
Shivkumar KalyanaramanRensselaer Polytechnic Institute
2
Telephony: history and evolution IP Telephony: Why ?
Adding interactive multimedia to the webBeing able to do basic telephony on IP with a variety of
devices Basic IP telephony model Protocols: SIP, H.323, RTP, Coding schemes, MGCP,
RTSP Future: Invisible IP telephony and control of appliances
Overview
Shivkumar KalyanaramanRensselaer Polytechnic Institute
3
Public Telephony (PSTN) History 1876 invention of telephone 1915 first transcontinental telephone (NY–SF) 1920’s first automatic switches 1956 TAT-1 transatlantic cable (35 lines) 1962 digital transmission (T1) 1965 1ESS analog switch 1974 Internet packet voice 1977 4ESS digital switch 1980s Signaling System #7 (out-of-band) 1990s Advanced Intelligent Network (AIN)
Shivkumar KalyanaramanRensselaer Polytechnic Institute
4
Telephone Service in the USAT&T Divestiture
Shivkumar KalyanaramanRensselaer Polytechnic Institute
5
Telephone System Overview Analog narrowband circuits: home-> central office 64 kb/s continuous transmission, with compression
across oceans-law: 12-bit linear range -> 8-bit bytes
Everything clocked a multiple of 125 sClock synchronization framing errors
AT&T: 136 “toll”switches in U.S. Interconnected by T1, T3 lines & SONET rings
Call establishment “out-of-band” using packet-switched signaling system (SS7)
Shivkumar KalyanaramanRensselaer Polytechnic Institute
6
Telephony: Multiplexing
Telephone Trunks between central offices carry hundreds of conversations: Can’t run thick bundles!
Send many calls on the same wire: multiplexing Analog multiplexing
bandlimit call to 3.4 KHz and frequency shift onto higher bandwidth trunk
Digital multiplexing: convert voice to samples 8000 samples/sec => call = 64 Kbps
Shivkumar KalyanaramanRensselaer Polytechnic Institute
7
Trends: Price of Phone Calls: NY - LondonAT&T Divestiture
Shivkumar KalyanaramanRensselaer Polytechnic Institute
8
Trends: Data vs Voice Traffic
Since we are building future networks for data, canwe slowly junk the voice infrastructure and move over to IP?
Shivkumar KalyanaramanRensselaer Polytechnic Institute
9
Trends: Phone vs Data Revenues
Shivkumar KalyanaramanRensselaer Polytechnic Institute
10
Private Branch Exchange (PBX)
7043
7040
7041
7042
External line
Telephoneswitch
Private BranchExchange
212-8538080
Anotherswitch
Corporate/Campus
InternetCorporate/Campus LAN
Post-divestiture phenomenon...
Shivkumar KalyanaramanRensselaer Polytechnic Institute
11
External line
7043
7040
7041
7042
PBX
Corporate/Campus
InternetLAN
8154
8151
8152
8153
PBX
Another campus
LAN
IP Telephony: PBX Replacement
Shivkumar KalyanaramanRensselaer Polytechnic Institute
12
Voice over Packet Market Forecast – North America
Shivkumar KalyanaramanRensselaer Polytechnic Institute
13
Invisible Internet Telephony
VoIP technology will appear in . . . Internet appliances home security cameras, web cams 3G mobile terminals fire alarms chat/IM tools interactive multiplayer games
Shivkumar KalyanaramanRensselaer Polytechnic Institute
14
IPtel for appliances: “Presence”
Shivkumar KalyanaramanRensselaer Polytechnic Institute
15
Taxonomy of Speech CodersSpeech Coders
Waveform Coders Source Coders
Time Domain: PCM, ADPCM
Frequency Domain: e.g. Sub-band coder,Adaptive transform coder
Linear Predictive Coder
Vocoder
Waveform coders: attempts to preserve the signal waveform not speech specific (I.e. general A-to-D conv)
PCM 64 kbps, ADPCM 32 kpbs, CVSDM 32 kbpsVocoders:
Analyse speech, extract and transmit model parameters Use model parameters to synthesize speech LPC-10: 2.4 kbps
Hybrids: Combine best of both… Eg: CELP (used in GSM)
Shivkumar KalyanaramanRensselaer Polytechnic Institute
16
Speech Quality of Various Coders
Shivkumar KalyanaramanRensselaer Polytechnic Institute
17
Applications of Speech Coding Telephony, PBX Wireless/Cellular Telephony Internet Telephony Speech Storage (Automated call-centers) High-Fidelity recordings/voice Speech Analysis/Synthesis Text-to-speech (machine generated speech)
Shivkumar KalyanaramanRensselaer Polytechnic Institute
18
Pulse Amplitude Modulation (PAM)
Shivkumar KalyanaramanRensselaer Polytechnic Institute
19
Pulse Code Modulation (PCM)
* PCM = PAM + quantization
Shivkumar KalyanaramanRensselaer Polytechnic Institute
20
Quantization
Shivkumar KalyanaramanRensselaer Polytechnic Institute
21
Companded PCM
•Small quantization intervals to small samples and large intervals for large samples• Excellent quality for BOTH voice and data• Moderate data rate (64 kbps)• Moderate cost: used in T1 lines etc
Shivkumar KalyanaramanRensselaer Polytechnic Institute
22
Companding
Shivkumar KalyanaramanRensselaer Polytechnic Institute
23
How it works for T1 Lines
• Companding blocks are shared by all 16 channels
Shivkumar KalyanaramanRensselaer Polytechnic Institute
24
Adaptive Gain Encoding
Automatic Gain control (AGC), but accounting for silence periods
Shivkumar KalyanaramanRensselaer Polytechnic Institute
25
Time Waveform of Voiced/Unvoiced Sound
High correlation (0.85) between samples, cycles, pitch intervals etc
Shivkumar KalyanaramanRensselaer Polytechnic Institute
26
Differential PCM
Exploits sample-to-sample correlation (0.85) => differences require fewer bits; feedback avoids cascading quantization errors
Shivkumar KalyanaramanRensselaer Polytechnic Institute
27
Delta Modulation
•Used in first-generation PBXs (switching was more sensitive to Digital conversion cost and less sensitive to quality or data rate)
Shivkumar KalyanaramanRensselaer Polytechnic Institute
28
Adaptive Predictive Coding
Adapt both the prediction coefficients (alphas) and the estimatesBased upon past or present samples => 20 dB prediction gain
Shivkumar KalyanaramanRensselaer Polytechnic Institute
29
Subband Coding
Frequency domain analysis of input instead of time-domain Analysis: adjust quantization based upon energy level of each bandEg: G.722 coder: 7kHz voice w/ 64 kbps
Shivkumar KalyanaramanRensselaer Polytechnic Institute
30
G.722 (7 kHz) audio Codec
Shivkumar KalyanaramanRensselaer Polytechnic Institute
31
Recall: Taxonomy of Speech CodersSpeech Coders
Waveform Coders Source Coders
Time Domain: PCM, ADPCM
Frequency Domain: e.g. Sub-band coder,Adaptive transform coder
Linear Predictive Coder
Vocoder
Waveform coders: attempts to preserve the signal waveform not speech specific.
PCM 64 kbps, ADPCM 32 kpbs, CVSDM 32 kbpsVocoders:
Analyse speech, extract and transmit model parameters Use model parameters to synthesize speech LPC-10: 2.4 kbps
Hybrids: Combine best of both… Eg: CELP
Shivkumar KalyanaramanRensselaer Polytechnic Institute
32
Vocoders
Encode only perceptually important aspects of speech w/ fewer bits than waveform coders: eg: power spectrum vs time-domain accuracy
Shivkumar KalyanaramanRensselaer Polytechnic Institute
33
LPC Analysis/Synthesis
Shivkumar KalyanaramanRensselaer Polytechnic Institute
34
Speech Generation in LPC
Shivkumar KalyanaramanRensselaer Polytechnic Institute
35
Multi-pulse LPC
Shivkumar KalyanaramanRensselaer Polytechnic Institute
36
CELP Encoder
Shivkumar KalyanaramanRensselaer Polytechnic Institute
37
Example: GSM Digital Speech Coding PCM: 64kbps too wasteful for wireless Regular Pulse Excited -- Linear Predictive Coder
(RPE--LPC) with a Long Term Predictor loop. Subjective speech quality and complexity (related
to cost, processing delay, and power) Information from previous samples used to predict
the current sample: linear function. The coefficients, plus an encoded form of the
residual (predicted - actual sample), represent the signal.
20 millisecond samples: each encoded as 260 bits =>13 kbps (Full-Rate coding).
Shivkumar KalyanaramanRensselaer Polytechnic Institute
38
Speech Quality of Various Coders
Shivkumar KalyanaramanRensselaer Polytechnic Institute
39
Speech Quality (Contd)
Shivkumar KalyanaramanRensselaer Polytechnic Institute
40
VoIP Camps
ISDN LAN conferencin
gIP
H.323I-multimedia
WWW
IP
SIPCall Agent
SIP & H.323
IP
“Softswitch” BISDN, AIN
H.xxx, SIP
“any packet”
BICC
Conferencing Industry
Netheads“IP over
Everything”
Circuit switch
engineers “We over
IP”
“Convergence” ITU
standards
Our focus
Shivkumar KalyanaramanRensselaer Polytechnic Institute
41
Internet Multimedia Protocol Stack
Shivkumar KalyanaramanRensselaer Polytechnic Institute
42
IP Telephony Protocols: SIP, RTP
Session Initiation Protocol - SIP Contact “office.com” asking for “bob” Locate Bob’s current phone and ring Bob picks up the ringing phone
Real time Transport Protocol - RTP Send and receive audio packets
Shivkumar KalyanaramanRensselaer Polytechnic Institute
43
Internet Telephony Protocols: H.323
Shivkumar KalyanaramanRensselaer Polytechnic Institute
44
H.323 (contd) Terminals, Gateways, Gatekeepers, and
Multipoint Control Units (MCUs)
Shivkumar KalyanaramanRensselaer Polytechnic Institute
45
H.323 vs SIP
IP and lower layersTCP UDP
TPKT
Q.931 H.245 RAS RTCPRTP
Codecs
Terminal Control/Devices
Transport Layer
SIP SDPRTP
CodecsRTCP
Terminal Control/Devices
Typical UserAgent Protocol stack for Internet
Shivkumar KalyanaramanRensselaer Polytechnic Institute
46
SIP vs H.323
Text based request response
SDP (media types and media transport address)
Server roles: registrar, proxy, redirect
Binary ASN.1 PER encoding
Sub-protocols: H.245, H.225 (Q.931, RAS, RTP/RTCP), H.450.x...
H.323 Gatekeeper
- Both use RTP/RTCP over UDP/IP- H.323 perceived as “heavyweight”
Shivkumar KalyanaramanRensselaer Polytechnic Institute
47
Light-weight signaling: Session InitiationProtocol (SIP)
IETF MMUSIC working group Light-weight generic signaling protocol Part of IETF conference control architecture:
SAP for “Internet TV Guide” announcements RTSP for media-on-demand SDP for describing media others: malloc, multicast, conference bus, . . .
Post-dial delay: 1.5 round-trip time (with UDP) Network-protocol independent: UDP or TCP (or
AAL5 or X.25)
Shivkumar KalyanaramanRensselaer Polytechnic Institute
48
SDP: Session Description Protocol Not really a protocol – describes data carried by other
protocols Used by SAP, SIP, RTSP, H.332, PINT. Eg:
v=0o=g.bell 877283459 877283519 IN IP4 132.151.1.19s=Come here, Watson!u=http://[email protected]=IN IP4 132.151.1.19b=CT:64t=3086272736 0k=clear:manhole coverm=audio 3456 RTP/AVP 96a=rtpmap:96 VDVI/8000/1m=video 3458 RTP/AVP 31m=application 32416 udp wb
Shivkumar KalyanaramanRensselaer Polytechnic Institute
49
SIP functionality IETF-standardized peer-to-peer signaling protocol
(RFC 2543): Locate user given email-style address Setup session (call) (Re)-negotiate call parameters Manual and automatic forwarding Personal mobility: different terminal, same identifier Call center: reach first (load distribution) or reach all
(department conference) Terminate and transfer calls
Shivkumar KalyanaramanRensselaer Polytechnic Institute
50
SIP Addresses Food Chain
Shivkumar KalyanaramanRensselaer Polytechnic Institute
51
SIP components UAC: user-agent client (caller application) UAS: user-agent server à accept, redirect, refuse
call redirect server: redirect requests proxy server: server + client registrar: track user locations user agent = UAC + UAS often combine registrar + (proxy or redirect
server)
Shivkumar KalyanaramanRensselaer Polytechnic Institute
52
Are true Internet hosts
• Choice of application• Choice of server• IP appliances
Implementations• 3Com (3)• Columbia University• MIC WorldCom (1) • Mediatrix (1)• Nortel (4)• Siemens (5)
4
IP SIP Phones and Adaptors1
3
Analog phone adaptor
Palmcontrol
2
54
Shivkumar KalyanaramanRensselaer Polytechnic Institute
53
SIP-based Architecture
SIP proxy,redirectserver
SQLdatabase
sipd
e*phone
sipc
Software SIP user agents
Hardware Internet (SIP)
phones
SIPH.323
convertor
NetMeetingsip323
H.323
rtspd
SIP/RTSPUnified
messaging
RTSP media server
sipum
Quicktime
RTSP clients
RTSP
SIP conference
server
sipconf
T1/E1 RTP/SIP
Telephone
Cisco 2600 gateway
Telephoneswitch Web based
configurationWeb
server
Shivkumar KalyanaramanRensselaer Polytechnic Institute
54
SIP proxy,redirectserver
SQLdatabase
sipd
e*phone
sipc
Software SIP user agents
Hardware Internet (SIP)
phones
Web based configuration
Web server
Call Bob
Example Call• Bob signs up for the service from the web as “[email protected]”• He registers from multiple phones
• Alice tries to reach Bob INVITE ip:[email protected]
• sipd canonicalizes the destination to sip:[email protected]
• sipd rings both e*phone and sipc
• Bob accepts the call from sipc and starts talking
ecse.rpi.edu
Shivkumar KalyanaramanRensselaer Polytechnic Institute
55
PSTN to IP Call
PBXPSTN
External T1/CAS
Regular phone(internal)
Call 93971341
SIP server
sipd
Ethernet
3
SQLdatabase
4 7134 => bob
sipc
5
Bob’s phone
GatewayInternal T1/CAS(Ext:7130-7139)
Call 71342
Shivkumar KalyanaramanRensselaer Polytechnic Institute
56
IP to PSTN Call
Gateway(10.0.2.3)
3
SQLdatabase
2Use sip:[email protected]
Ethernet
SIP server
sipdsipc
1Bob calls 5551212
PSTN
External T1/CASCall 55512125
5551212
PBX
Internal T1/CASCall 85551212 4
Regular phone(internal, 7054)
Shivkumar KalyanaramanRensselaer Polytechnic Institute
57
Traditional voice mail system
Alice939-7063
Bob853-8119
Dial 853-8119
Phone is ringing
.. The person is not available nowplease leave a message ...
... Your voice message ...
Disconnect
Bob can listen to his voice mails by dialing some number.
Shivkumar KalyanaramanRensselaer Polytechnic Institute
58
SIP-based Voicemail Architecture
INVITE [email protected]
Alice
phone1.office.com
Bob
Alice calls [email protected] through SIP proxy.SIP proxy forks the request to Bob’s phone as well as to a voicemail server.
vm.office.com
The voice mail server registers with the SIP proxy, sipd
INVITE [email protected]
INVITE [email protected]
REGISTER [email protected]
Shivkumar KalyanaramanRensselaer Polytechnic Institute
59
Voicemail Architecture
v-mail
rtspd
Alice
vm.office.com;
200 OK
200 OK
CANCEL
SETUP
RTP/RTCP
phone1.office.com;
Bob
After 10 seconds vm contacts the RTSP server for recording.
vm accepts the call.Sipd cancels the other branch and ......accepts the call from Alice.Now user message gets recorded
Shivkumar KalyanaramanRensselaer Polytechnic Institute
60
SIP-H.323: Interworking ProblemsEg: Call setup translation
Q.931 SETUP
Q.931 CONNECTINVITE
200 OK
ACK
Terminal Capabilities
Terminal CapabilitiesOpen Logical Channel
Open Logical Channel
H.323 SIP
Destination address ([email protected])
Media capabilities (audio/video)
Media transport address (RTP/RTCP receive)
• H.323: Multi-stage dialing
Shivkumar KalyanaramanRensselaer Polytechnic Institute
61
MGCP and Megaco Media Gateway Controller Protocol (RFC 2705) Controlling Telephony Gateways from external call
control elements called media gateway controllers (MGC) or call agents Gateways: Eg: RGW : physical interfaces between
VoIP network and residences Call control "intelligence" is outside the gateways
and handled by external call control elements Goal: scalable gateways between IP telephony and
PSTN Successor to MGCP: H.248/Megaco
Shivkumar KalyanaramanRensselaer Polytechnic Institute
62
MGCP Architecture
RGW: Residential GatewayTGW: Trunk Gateway
Goal: large-scale phone-to-phone VoIP deployments
Shivkumar KalyanaramanRensselaer Polytechnic Institute
63
Summary
Telephony and IP Telephony Protocols: SIP, SDP, H.323, MCGP Example operation and services:
Calls, voice mail etc Future: Integration with Web and long-term
replacement for current telephone systems