Telephony & Internet Telephony Based upon slides of Henning Schulzrinne (Columbia) 1
Telephony 2
Telephone Network: What is It? Specialized to carry voice traffic Aggregates like T1, SONET OC-N can also carry data Also carries Telemetry, video, fax, modem calls Internally, uses digital samples Switches and switch controllers are special purpose computers Pieces: 1. End systems 2. Transmission 3. Switching 4. Signaling 3
Telephone Network: What is It? Single basic service: two-way voice low end-to-end delay guarantee that an accepted call will run to completion Endpoints connected by a circuit, like an electrical circuit Signals flow both ways (full duplex) Associated with reserved bandwidth and buffer resources 4
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) 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 s Clock synchronization framing errors AT&T: 136 toll switches in U.S. Interconnected by T1, T3 lines & SONET rings Call establishment out-of-band using packetswitched signaling system (SS7) 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 7
Telephone Network Design Fully connected core simple routing telephone number is a hint about how to route a call But not for 800/888/700/900 numbers: these are pointers to a directory that translates them into regular numbers hierarchically allocated telephone number space 8
Telephone Network Design 9
Telephone Pieces: End Systems 10
Telephone Pieces: End Systems Transducers: key to carrying voice on wires Dialer Ringer Switch-hook 11
Last-Mile Transmission Environment Wire gauges:19, 22, 24, 26 gauge(smaller better) Diameters: 0.8, 0.6, 0.5, 0.4 mm (larger better) Various forms of noise: (twisting reduces noise) Bridged-tap noise: bit-energy diverted to extension phone sockets Crosstalk Ham radio AM broadcast Insertion loss: -140 dbm noise floor 100 million times more sensitive than normal modems Bandwidth range = 600 khz Notch effects in insertion loss due to bridged-taps Transmission PSD = -40dBm => 90 dbm budget 12
Both trans & reception circuits need two wires 2-wire vs 4-wire: Sidetones and Echoes 4 wires from every central office to home Alternative: Use same pair of wires for both transmission and reception Signal from transmission flows to receiver: sidetone Reverse Effect: received signal at end-system bounces back to CO (esp if delay > 20 ms): echo Solutions: balance circuit (attenuate side-tone) + echocancellation circuit (cancel echoes). 13
Pulse Dialing sends a pulse per digit collected by central office (CO) Interpreted by CO switching system to place call or activate special features (eg: call forwarding, prepaidcalls etc) Tone key press (feep) sends a pair of tones = digit also called Dual Tone Multifrequency (DTMF) CO supplies the power for ringing the bell. Standardized interface between CO and end-system => digital handsets, cordless/cellular phones 14
Telephone Pieces: Transmission Muxing Trunks between central offices carry hundreds of conversations Can t run thick bundles! Instead, send many calls on the same wire Multiplexing (a.ka. Sharing) Analog multiplexing Band-limit call to 3.4 KHz and frequency shift onto higher bandwidth trunk obsolete Digital multiplexing first convert voice to samples 1 sample = 8 bits of voice 8000 samples/sec => call = 64 Kbps 15
Transmission Multiplexing (contd) How to choose a sample? 256 quantization levels, logarithmically spaced (why?) sample value = amplitude of nearest quantization level Two choices of levels (µ law and A law) Time division multiplexing Trunk carries bits at a faster bit rate than inputs n input streams, each with a 1-byte buffer Output interleaves samples Need to serve all inputs in the time it takes one sample to arrive => output runs n times faster than input Overhead bits mark end of frame (why?) 16
Transmission Multiplexing Multiplexed trunks can be multiplexed further Need a standard! (why?) US/Japan standard is called Digital Signaling hierarchy (DS) Digital Signal Number Number of previous level circuits Number of voice circuits Bandwidth DS0 1 64 Kbps DS1 24 24 1.544Mbps DS2 4 96 6.312 Mbps DS3 7 672 44.736 Mbps 17
Telephone Pieces: Switching 18
Telephone Pieces: Switching Problem: each user can potentially call any other user can t have (a billion) direct lines! Switches establish temporary circuits Switching systems come in two parts: switch and switch controller 19
Switching System Components 20
Switch: What does it do? Transfers data from an input to an output many ports (up to 200,000 simultaneous calls) need high speeds Some ways to switch: 1. space division switching: eg: crossbar if inputs (or crosspoints) are multiplexed, need a schedule (why?) 21
Crossbar Switching Elements 22
Switching (Contd) Another way to switch time division (time slot interchange or TSI) also needs a service schedule (why?) To build larger switches we combine space and time division switching elements 23
Telephone pieces: Signaling A switching system has a switch and a switch controller Switch controller is in the control plane does not touch voice samples Manages the network call routing (collect dialstring and forward call) alarms (ring bell at receiver) billing directory lookup (for 800/888 calls) 24
Signaling Switch controllers are special purpose computers Linked by their own internal computer network Common Channel Interoffice Signaling (CCIS) network Earlier design used in-band tones, but was hacked Also was very rigid (why?) Messages on CCIS conform to Signaling System 7 (SS7) 25
Signaling (contd) One of the main jobs of switch controller: keep track of state of every endpoint Key is state transition diagram 26
Telephony Routing of Signaled Calls Circuit-setup (I.e. the signaling call) is what is routed. Voice then follows route, and claims reserved resources. 3-level hierarchy, with a fully-connected core AT&T: 135 core switches with nearly 5 million circuits LECs may connect to multiple cores 27
Telephony Routing algorithm If endpoints are within same CO, directly connect If call is between COs in same LEC, use one-hop path between COs Otherwise send call to one of the cores Only major decision is at toll switch one-hop or two-hop path to the destination toll switch. Essence of telephony routing problem: which two-hop path to use if one-hop path is full (almost a static routing problem ) 28
Features of telephone routing Resource reservation aspects: Resource reservation is coupled with path reservation Connections need resources (same 64kbps) Signaling to reserve resources and the path Stable load Network built for voice only. Can predict pairwise load throughout the day Can choose optimal routes in advance Technology and economic aspects: Extremely reliable switches Why? End-systems (phones) dumb because computation was non-existent in early 1900s. Downtime is less than a few minutes per year => topology does not change dynamically 29
Features of telephone routing Source can learn topology and compute route Can assume that a chosen route is available as the signaling proceeds through the network Component reliability drove system reliability and hence acceptance of service by customers Simplified topology: Very highly connected network Hierarchy + full mesh at each level: simple routing High cost to achieve this degree of connectivity Organizational aspects: Single organization controls entire core Afford the scale economics to build expensive network Collect global statistics and implement global changes => Source-based, signaled, simple alternate-path routing 30
Telecommunications Regulation History FCC regulations cover telephony, cable, broadcast TV, wireless etc Common Carrier : provider offers conduit for a fee and does not control the content Customer controls content/destination of transmission & assumes criminal/civil responsibility for content Local monopolies formed by AT&T s acquisition of independent telephone companies in early 20 th century Regulation forced because they were deemed natural monopolies (only one player possible in market due to enormous sunk cost) FCC regulates interstate calls and state commissions regulate intra-state and local calls Bells + 1000 independents interconnected & expanded FCC rulemaking process: Intent to act, solicitation of public comment etc 31
Deregulation of telephony 1960s-70s: gradual de-regulation of AT&T due to technological advances Terminal equipment could be owned by customers (CPE) => explosion in PBXs, fax machines, handsets Modified final judgement (MFJ): breakup of AT&T into ILECs (incumbent local exchange carrier) and IXC (inter-exchange carrier) part Long-distance opened to competition, only the local part regulated Equal access for IXCs to the ILEC network 1+ long-distance number introduced then 800-number portability: switching IXCs => retain 800 number 1995: removed price controls on AT&T 32
Telecom Act of 1996 Required ILECs to open their markets through unbundling of network elements (UNE-P), facilities ownership of CLECs. Today UNE-P is one of the most profitable for AT&T and other long-distance players in the local market: due to apparently below-cost regulated prices ILECs could compete in long-distance after demonstrating opening of markets Only now some ILECs are aggressively entering long distance markets CLECs failed due to a variety of reasons But long-distance prices have dropped precipitously (AT&T s customer unit revenue in 2002 was $11.3 B compared to 1999 rev of $23B) ILECs still retain over 90% of local market Wireless substitution has caused ILECs to develop wireless business units 33
US Telephone Network Structure (after 1984) 34
Exchange Area Network 35
IP Telephony, VoIP etc 36
IP Telephony: Overview IP Telephony: Why? Adding interactive multimedia to the web Being 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 37
Telephone Service Penetration in the US AT&T Divestiture 38
Trends: Price of Phone Calls: NY - London AT&T Divestiture 39
Trends: Data vs Voice Traffic Since we are building future networks for data, can we slowly junk the voice infrastructure and move over to IP? 40
Trends: Phone vs Data Revenues 41
Private Branch Exchange (PBX) Post-divestiture phenomenon... 7040 7041 External line 212-8538080 7042 Corporate/Campus Private Branch Exchange Telephone switch Another switch 7043 Corporate/Campus LAN Internet 42
IP Telephony: PBX Replacement 7040 Corporate/Campus External line Another campus 8151 7041 PBX PBX 8152 7042 7043 8154 8153 LAN Internet LAN 43
Voice over Packet Market Forecast North America 44
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 45
IPtel for appliances: Presence 46
Taxonomy of Speech Coders Speech Coders Waveform Coders Source Coders Time Domain: PCM, ADPCM Frequency Domain: e.g. Sub-band coder, Adaptive transform coder 47 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 kbps Vocoders: 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)
Speech Quality of Various Coders 48
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) 49
Pulse Amplitude Modulation (PAM) 50
Pulse Code Modulation (PCM) * PCM = PAM + quantization 51
Quantization 52
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 53
Companding 54
How it works for T1 Lines Companding blocks are shared by all 16 channels 55
Adaptive Gain Encoding Automatic Gain control (AGC), but accounting for silence periods 56
Time Waveform of Voiced/Unvoiced Sound High correlation (0.85) between samples, cycles, pitch intervals etc 57
Differential PCM Exploits sample-to-sample correlation (0.85) => differences require fewer bits; feedback avoids cascading quantization errors 58
Delta Modulation Used in first-generation PBXs (switching was more sensitive to Digital conversion cost and less sensitive to quality or data rate) 59
Adaptive Predictive Coding Adapt both the prediction coefficients (alphas) and the estimates Based upon past or present samples => 20 db prediction gain 60
Subband Coding Frequency domain analysis of input instead of time-domain Analysis: adjust quantization based upon energy level of each band Eg: G.722 coder: 7kHz voice w/ 64 kbps 61
G.722 (7 khz) audio Codec 62
Recall: Taxonomy of Speech Coders Speech Coders Waveform Coders Source Coders Time Domain: PCM, ADPCM Frequency Domain: e.g. Sub-band coder, Adaptive transform coder 63 Linear Predictive Coder Vocoder Waveform coders: attempts to preserve the signal waveform not speech specific. PCM 64 kbps, ADPCM 32 kpbs, CVSDM 32 kbps Vocoders: 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
Vocoders Encode only perceptually important aspects of speech w/ fewer bits than waveform coders: eg: power spectrum vs time-domain Rensselaer accuracy Polytechnic Institute 64
LPC Analysis/Synthesis 65
Speech Generation in LPC 66
Multi-pulse LPC 67
CELP Encoder 68
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). 69
Speech Quality of Various Coders 70
Speech Quality (Contd) 71
VoIP Camps Conferencing Industry Netheads IP over Everything Circuit switch engineers We over IP Convergence ITU standards H.323 SIP Softswitch BICC ISDN LAN conferencing I-multimedia WWW Call Agent SIP & H.323 BISDN, AIN H.xxx, SIP IP IP IP any packet Our focus 72
Internet Multimedia Protocol Stack 73
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 74
Internet Telephony Protocols: H.323 75
H.323 (contd) Terminals, Gateways, Gatekeepers, and Multipoint Control Units (MCUs) 76
H.323 vs SIP Typical UserAgent Protocol stack for Internet Terminal Control/Devices Codecs Q.931 H.245 RAS RTCP RTP TPKT TCP UDP IP and lower layers Terminal Control/Devices Codecs SIP SDP RTCP RTP Transport Layer 77
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 78
Light-weight signaling: Session Initiation Protocol (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) 79
SDP: Session Description Protocol Not really a protocol describes data carried by other protocols Used by SAP, SIP, RTSP, H.332, PINT. Eg: v=0 o=g.bell 877283459 877283519 IN IP4 132.151.1.19 s=come here, Watson! u=http://www.ietf.org e=g.bell@bell-telephone.com c=in IP4 132.151.1.19 b=ct:64 t=3086272736 0 k=clear:manhole cover m=audio 3456 RTP/AVP 96 a=rtpmap:96 VDVI/8000/1 m=video 3458 RTP/AVP 31 m=application 32416 udp wb 80
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 81
SIP Addresses Food Chain 82
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) 83
IP SIP Phones and Adaptors 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 2 3 84 1 Analog phone adaptor 5 Palm control
Telephone Telephone switch T1/E1 RTP/SIP Cisco 2600 gateway sipc SIP-based Architecture sipconf SIP conference server sipd SIP proxy, redirect server rtspd RTSP media server sipum SIP/RTSP Unified messaging SQL database RTSP e*phone Quicktime RTSP clients Web server Hardware Internet (SIP) phones Web based configuration Software SIP user agents sip323 SIPH.32 3 converto r 85 H.323 NetMeeting
Example Call Bob signs up for the service from the web as bob@ecse.rpi.edu He registers from multiple phones Alice tries to reach Bob INVITE ip:bob.wilson@ecse.rpi.edu Call Bob sipd SIP proxy, redirect server sipd canonicalizes the destination to sip:bob@ecse.rpi.edu sipd rings both e*phone and sipc Bob accepts the call from sipc and starts talking SQL database Web server e*phone Web based configuration sipc ecse.rpi.edu Hardware Internet (SIP) phones Software SIP user agents 86
PSTN to IP Call PSTN External T1/CAS PBX Internal T1/CAS (Ext:7130-7139) Gateway 1 Call 9397134 2 Call 7134 Ethernet Regular phone (internal) 5 3 SIP server SQL database sipc Bob s phone sipd 4 7134 => bob 87
IP to PSTN Call PSTN 5 External T1/CAS Call 5551212 PBX Internal T1/CAS Call 85551212 4 Gateway (10.0.2.3) 3 Ethernet 5551212 Regular phone (internal, 7054) 1 Bob calls 5551212 SIP server SQL database sipc 2 sipd Use sip:85551212@10.0.2.3 88
Traditional voice mail system Dial 853-8119 Alice 939-7063 Phone is ringing.. The person is not available now please leave a message...... Your voice message... Disconnect Bob 853-8119 Bob can listen to his voice mails by dialing some number. 89
SIP-based Voicemail Architecture Bob INVITE bob@office.com INVITE bob@phone1.office.com phone1.office.com Alice REGISTER bob@vm.office.com INVITE bob@vm.office.com 90 vm.office.com The voice mail server registers with the SIP proxy, sipd Alice calls bob@office.com through SIP proxy. SIP proxy forks the request to Bob s phone as well as to a voicemail server.
Voicemail Architecture Bob phone1.office.com; CANCEL Alice 200 OK 200 OK RTP/RTCP 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 91 v-mail vm.office.com; SETUP rtspd
SIP-H.323: Interworking Problems Eg: Call setup translation H.323 SIP Q.931 SETUP Q.931 CONNECT Terminal Capabilities Terminal Capabilities Open Logical Channel Open Logical Channel Destination address (Bob@office.com) Media capabilities (audio/video) Media transport address (RTP/RTCP receive) INVITE 200 OK ACK H.323: Multi-stage dialing 92
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 93
MGCP Architecture Goal: large-scale phone-to-phone VoIP deployments RGW: Residential Gateway TGW: Trunk Gateway 94
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 95