Transcript
IP Telephony Deploying VoIP Protocols and IMS Infrastructure, Second Edition
Olivier Hersent CEO of Actility
A John Wiley and Sons, Ltd., Publication
IP Telephony Deploying VoIP Protocols and IMS Infrastructure, Second Edition
IP Telephony Deploying VoIP Protocols and IMS Infrastructure, Second Edition
Olivier Hersent CEO of Actility
A John Wiley and Sons, Ltd., Publication
This edition first published 2011 2011 John Wiley & Sons Ltd. First edition published 2005 Registered office John Wiley & Sons Ltd, The Atrium, Southern Gate, Chichester, West Sussex, PO19 8SQ, United Kingdom For details of our global editorial offices, for customer services and for information about how to apply for permission to reuse the copyright material in this book please see our website at www.wiley.com. The right of the author to be identified as the author of this work has been asserted in accordance with the Copyright, Designs and Patents Act 1988. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording or otherwise, except as permitted by the UK Copyright, Designs and Patents Act 1988, without the prior permission of the publisher. Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may not be available in electronic books. Designations used by companies to distinguish their products are often claimed as trademarks. All brand names and product names used in this book are trade names, service marks, trademarks or registered trademarks of their respective owners. The publisher is not associated with any product or vendor mentioned in this book. This publication is designed to provide accurate and authoritative information in regard to the subject matter covered. It is sold on the understanding that the publisher is not engaged in rendering professional services. If professional advice or other expert assistance is required, the services of a competent professional should be sought.
Library of Congress Cataloguing-in-Publication Data Hersent, Olivier. IP telephony : deploying VoIP protocols and IMS infrastructure / Olivier Hersent. — 2nd ed. p. cm. Includes index. ISBN 978-0-470-66584-8 (cloth) 1. Internet telephony. 2. Convergence (Telecommunication) I. Title. TK5105.8865.H47 20010 004.69 5–dc22 2010024553
A catalogue record for this book is available from the British Library. Print ISBN 9780470665848 (H/B) ePDF ISBN: 9780470973264 oBook ISBN: 9780470973080 Set in 10/12 Times-Roman by Laserwords Private Limited, Chennai, India
Contents
Abbreviations
ix
Glossary
xxi
Preface
xxix
1 Multimedia Over Packet 1.1 Transporting voice, fax, and video over a packet network 1.1.1 A Darwinian view of voice transport 1.1.2 Voice and video over IP with RTP and RTCP 1.2 Encoding media streams 1.2.1 Codecs 1.2.2 DTMF 1.2.3 Fax
1 1 1 5 16 16 39 40
2 H.323: Packet-based Multimedia Communications Systems 2.1 Introduction 2.1.1 Understanding H.323 2.1.2 Development of the standard 2.1.3 Relation between H.323 and H.245 versions, H.323 annexes, and related specifications 2.1.4 Where to find the documentation 2.2 H.323 step by step 2.2.1 The ‘hello world case’: simple voice call from terminal A to terminal B
49 49 50 52 55 57 58 58
vi
CONTENTS
2.3
2.4
2.5
2.6
2.7
2.8
2.2.2 A more complex case: calling a public phone from the Internet using a gatekeeper 2.2.3 The gatekeeper-routed model 2.2.4 H.323 calls across multiple zones or administrative domains Optimizing and enhancing H.323 2.3.1 Issues in H.323v1 2.3.2 The ‘early H.245’ procedure 2.3.3 The ‘fast-connect’ procedure 2.3.4 H.245 tunneling 2.3.5 Reverting to normal operation 2.3.6 Using RAS properly and only when required Conferencing with H.323 2.4.1 The MCU conference bridge, MC and MP subsystems 2.4.2 Creating or joining a conference 2.4.3 H.332 Directories and numbering 2.5.1 Introduction 2.5.2 Contacting an email alias with H.323 and the DNS 2.5.3 E164 numbers and IP telephony H.323 security 2.6.1 Typical deployment cases 2.6.2 H.235 Supplementary services 2.7.1 Supplementary services using H.450 2.7.2 Proper use of H.450 supplementary services, future directions for implementation of supplementary services Future work on H.323
3 The Session Initiation Protocol (SIP) 3.1 The origin and purpose of SIP 3.1.1 From RFC 2543 to RFC 3261 3.1.2 From RFC 3261 to 3GPP, 3GPP2 and TISPAN 3.2 Overview of a simple SIP call 3.2.1 Basic call scenario 3.2.2 Syntax of SIP messages 3.3 Call handling services with SIP 3.3.1 Location and registration 3.3.2 The proxy function, back to back user agents 3.3.3 Some common services 3.3.4 Multiparty conferencing 3.4 SIP security 3.4.1 Media security 3.4.2 Message exchange security
72 79 86 95 95 99 99 103 106 106 108 108 109 113 114 114 115 116 124 124 131 148 148 154 155 159 159 163 166 167 167 169 219 220 230 242 244 250 250 251
CONTENTS
3.5 Instant messaging (IM) and presence 3.5.1 Common profile for instant messaging (CPIM) 3.5.2 RFC 3265, Specific Event Notification 3.5.3 RFC 3428: SIP extensions for instant messaging
vii 254 255 260 266
4 The 3GPP IP Multimedia Subsystem (IMS) Architecture 4.1 Introduction 4.1.1 Centralized value added services platforms on switched telephone networks: the ‘tromboning’ issue 4.1.2 The ‘Intelligent Network’ (IN) 4.1.3 How VoIP solves the ‘tromboning’ issue. The value added services architecture of 3GPP IMS 4.1.4 The IMS architecture is ideal for mobile networks . . . but not only 4.2 Overview of the IMS architecture 4.2.1 Registration 4.2.2 SIP session establishment in an IMS environment 4.2.3 A few remarks on the IMS architecture 4.3 The IMS CSCFs 4.3.1 The Proxy-CSCF 4.3.2 The Serving-CSCF (S-CSCF) and Application Servers (AS) 4.3.3 The Media Resource Function (MRF) 4.4 The full picture: 3GPP release 8, TISPAN 4.4.1 The packet core domain: the evolved packet system 4.4.2 The IMS domain 4.4.3 Summary of SIP extensions required in an IMS network
269 269
273 274 274 275 278 279 279 282 286 288 289 299 311
5 The Media Gateway to Media Controller Protocol (MGCP) 5.1 Introduction: why MGCP? 5.1.1 Stimulus protocols 5.1.2 Decomposed gateways 5.1.3 Some history 5.2 MGCP 1.0 5.2.1 The MGCP connection model 5.2.2 The protocol 5.2.3 Handling of fax 5.2.4 Extensions for phone user interface control 5.3 Sample MGCP call flows 5.3.1 Call set-up 5.3.2 DTMF tones 5.3.3 Call release 5.4 The future of MGCP
313 313 313 315 317 318 321 323 350 354 358 358 364 364 365
269 270 270
viii
CONTENTS
6 Advanced Topics: Call Redirection 6.1 Call redirection in VoIP networks 6.1.1 Call transfer, call forward, call deflection 6.1.2 Summary of major issues 6.1.3 Reference network configurations in the PSTN 6.1.4 Reference network configurations with VoIP 6.1.5 How to signal call transfer? 6.1.6 VoIP call redirection and call routing 6.1.7 Conclusion
367 367 367 368 371 374 387 388 390
7 Advanced Topics: NAT Traversal 7.1 Introduction to Network Address Translation 7.1.1 One-to-one NAT 7.1.2 NAPT 7.1.3 Issues with NAT and NAPT 7.2 Workarounds for VoIP when the network cannot be controlled 7.2.1 Ringing the proper phone 7.2.2 Using port forwarding to solve the wrong media address problem 7.2.3 STUN 7.2.4 Other proposals: COMEDIA and TURN 7.3 Recommended network design for service providers 7.3.1 Avoid NAT in the customer premises for VoIP 7.3.2 Media proxies 7.3.3 Security considerations 7.4 Conclusion
393 393 393 394 396 398 398 399 399 402 404 405 412 415 416
Annex
417
Index
427
Abbreviations
3GPP A-BGF A-RACF A/V AAD AAL2 ACD ACELP ACF ACL ACM ADEV ADPCM ADSL AES AF AGCF AMF AMR AMR-WB AN-GW ANDSF ANM ANSI AOC AoR APDU
Third Generation Partnership Project Access Border Gateway function Access RACF Audio-visual Average Acknowledgement Delay ATM Adaptation Layer 2 Automatic Call Distribution Algebraic-Code-Excited Linear-Prediction Admission Confirm Access Control List Address Complete Message Average Delay Deviation Adaptive Differential Pulse Mode Modulation Asymmetric Digital Subscriber Line Advanced Encryption Standard Application Function Access Gateway Control Function Access Management Function Adaptive Multi-Rate Adaptive Multi-Rate (Wide Band) Access Network Gateway Access Network Discovery and Selection Function Answer Message American National Standard Institute Advice of Charge SIP Address of Record Application Protocol Data Unit
x API ARF ARJ ARQ AS ASCII ASF ASN-1 ASP ASR ATM AUCX AUEP AVC AVT B2BUA BASIC BBERF BCF BER BGCF BGF BICC BNF BRJ BRQ BTF C-BGF C-RACF CA CALEA CallID CBC CC CCF CCIR CDMA CDR CED CELP CFB CFU CIC CID
ABBREVIATIONS
Application Programming Interface Access Relay Function Admission Reject Admission Request Application Server American Standard Code for Information Interchange Application Server Function Abstract Syntax Notation One Application Service Provider Automatic Speech Recognition or Answer Seizure Ratio Asynchronous Transfer Mode Audit Connection Audit Endpoint Advanced Video Coding Audio/Video Transport Back-to-back User Agent Beginners’ All-purpose Symbolic Instruction Code Bearer Binding and Event Reporting Function Bandwidth Confirm Basic Encoding Rule Breakout Control Gateway Function Border Gateway Function Bearer Independent Call Control Backus-Naur Form Bandwidth Reject Bandwidth Request Basic Transport Function Core Border Gateway function Core RACF Call Agent Communication Assistance for Law Enforcement Act Call Identifier Cipher Block Chaining CSRC Count Charging Collector Function Consultative Committee for International Radio (ITU) Code Division Multiplex Access Call Detail Record CallED Code-excited Linear Prediction Cipher Feedback Call Forwarding Unconditional Circuit Identification Code Conference Identifier
ABBREVIATIONS
CIF CLEC CLF CLIP CLIR CMA CMTS CND CNG CNG CNGCF CO Codec CoIx COMEDIA COPS CPE CPG CPIM CPL CPN CPU CR CRC CRCX CRLF CRV CS-ACELP CSRC CTI DCF DCME DCN DCS DCT DDNS DES/CBC DES DHCP DiffServ DIS DL DLCX DLSR
xi Common Intermediary Format Competitive Local Exchange Carrier Connectivity Session Location and Repository Function Calling Line Identity Presentation Calling Line Identity Restriction Call Management Agent Cable Modem Termination System Customer Network Device CalliNG; Comfort Noise Generator Customer Network Gateway CNG Configuration Function Central Office COder DECoder Connectivity-oriented Interconnection Connection-oriented Media Transport in SDP Common Open Policy Service Customer Premises Equipment Call Progress (Message) Common Profile for Instant Messaging Call Processing Language Customer Premises Network Central Processing Unit Carriage Return Cyclic Redundancy Check Create Connection Carriage Return and Line Feed Call Reference Value Conjugate Structure, Algebraic Code-Excited Linear Prediction Contributing Source Computer Telephony Integration Disengage Confirm Digital Circuit Multiplication Equipment Disconnect Distributed Call Signaling Discrete Cosine Transform Dynamic DNS Data Encryption Standard, Cipher Block Chaining Data Encryption Standard Dynamic Host Configuration Protocol Differentiated Services Digital Identification Signal Downlink Delete Connection Delay Since Last Sender Report
xii DNS DNSSEC DOCSIS DoS DRJ DRQ DSL DSMIP DSP DSS1 DTMF DTX DVMRP E-CSCF E-UTRAN ECB ECF EFF EFR ENUM EOL EOP EPCF ePDG ETSI ETSI TIPHON ETTB ETTX FCF FCS FEC FIF FIFO FIPS PUB FR FS GCF GEF GGSN GK GOBs GRJ GRQ
ABBREVIATIONS
Domain Name System Domain Name System Security Protocol Data over Cable Service Interface Specification Denial of Service Disengage Reject Disengage Request Digital Subscriber Line Dual Stack Mobile IP Digital Signal Processor Digital Subscriber Signaling 1 Dual-Tone Multi-Frequency Discontinuous Transmission Distance Vector Multicast Routing Protocol Emergency-CSCF Evolved-UTRAN Electronic Code Book Elementary Control Function Elementary Forwarding Function Enhanced Full Rate “Electronic Numbers” Protocol End of Line End of Procedure Endpoint Configuration Command evolved Packet Data Gateway European Telecommunications Standardisation Institute ETSI Telephony and Internet Protocol Harmonization Over Networks Ethernet to the Building Ethernet to the
(Curb, Home, Building) Fax Control Field Frame Check Sequence Forward Error Correction Fax Information Field First in First Out Federal Information Processing Standards Publication Full-rate FastStart Gatekeeper Confirm Generic Extensibility Framework Gateway GPRS Support Node Gatekeeper Group of Blocks Gatekeeper Reject Gatekeeper Request
xiii
ABBREVIATIONS
GSM GTD GTP HD HDLC HLR HLR/AuC HR HSPA HSS HTML HTTP HU I-BGF I-CSCF IAD IAM IANA IARI IBCF ICID ICMP ICSI IEC IETF IF IFP IFT ILS IM IMCN IMPI IMPP IMPU IMS IMTC IN INAP IntServ IOI IP IP CAN IP-PBX IPDC
Global System for Mobile Communications Global Transparency Descriptor Generic Tunneling Protocol Hang Down (off-hook) High-level Data Link Control Home Location Register HLR Authentication Center Half Rate High Speed Packet Access Home Subscriber Server Hypertext Markup Language Hypertext Transfer Protocol Hang Up (on-hook) Interdomain Border Gateway function Interrogating Call/Session Control Function Integrated Access Device Initial Address Message Internet Assigned Numbers Authority IMS Application Reference Identifier (IARI) Interconnection Border Control Function IMS Charging Identifier Internet Control Message Protocol IMS Communication Service Identifier ISO International Electrotechnical Commission Internet Engineering Task Force Interface Internet Fax Protocol Internet Fax Transmission protocol Internet Locator Service (Microsoft) Instant Messaging IP Multimedia Core Network IP Multimedia Private Identity Instant Messaging and Presence Protocol IP Multimedia Public Identity IP Multimedia subsystem International Multimedia Teleconferencing Consortium Intelligent Network Intelligent Network Application Protocol Integrated Services Inter Operator Identifier Intelligent Peripheral Internet Protocol Connectivity Access Network Internet Protocol–Private Branch Exchange Internet Protocol Device Control
xiv IPR IPSec IRC IRQ IRR ISDN ISP ISUP ITSP ITU IVR IWF JFIF JPEG LAN LCD LCF LD-CELP LDAP LF LNP LRJ LRQ LSP LSR LTE M mBone MC MCF MCU MD5 MDCX MEGACO MGCF MGCP MGCP/L MGCP/T MGF MH MIME MIP MIPS
ABBREVIATIONS
Intellectual Property Rights Internet Protocol Security Internet Relay Chat Information Request Information Request Response Integrated Service Digital Network Internet Service Provider ISDN USER PART protocol Internet Telephony Service Provider International Telecommunications Union Interactive Voice Response Interworking Function JPEG File Interchange Format Joint Photographic Experts Group Local Area Network Liquid Crystal Display Location Confirm Low-delay, Code-excited Linear Prediction Lightweight Directory Access Protocol Line Feed Local Number Portability Location Reject Location Request Line Spectral Pair Last Sender Report Long Term Evolution Marker Bit (RTP) Multicast Backbone of the Internet Multipoint Controller Message Confirmation Multipoint Control Unit Message Digest 5 Modify Connection Media Gateway Controller Media Gateway Control Function Media Gateway Control Protocol MGCP Line MGCP Trunk Media Gateway Function Modified Huffmann Multipurpose Internet Mail Extension Mobile IP Millions of Instructions Per Second
xv
ABBREVIATIONS
MME MMS MMUSIC MOS MP MP-MLQ MPEG MPLS MRFC MRFP MTP MTT MTU MWI MX NACF NAPT NAPTR NAS NASS NAT NCS NFE NTFY NTP NTSC OFB OGW OID OLC OO OS OSP P-CSCF P-frame PAL PBDF PBX PCC PCEF PCM PCMA PCMU
Mobility Management Entity Multimedia Message Service Multiparty Multimedia Session Control Mean Opinion Score Multipoint Processor Multipulse Maximum Likelihood Quantization Moving Picture Experts Group Multiprotocol Label Switching Media (or Multimedia) Resource Function Controller Media (or Multimedia) Resource Function Processor Message Transfer Part Minimum Transmission Time Maximum Transmission Unit Message Waiting Indication Mail Exchange Network Access Configuration Function Network Address and Port Translation Naming Authority Pointer Record Network Access Server Network Attachment Subsystem Network Address Translation Network Based Call Signaling Protocol Network Facility Extension Notify Network Time Protocol National Television System Committee Output Feedback Originating Gateway Object Identifier Open Logical Channel On–off Operating System Open Settlement Protocol Proxy Call/Session Control Function Prediction Frame Phase-alternation-line Profile Data Base Function Private Branch Exchange Policy and Charging Control Policy and Charging Enforcement Function Pulse Code Modulation Pulse Code Modulation A Law Pulse Code Modulation µ Law
xvi PCRF PDF PDN-GW PDU PEP PER PES PGR PGS PI PIDF PIM PMIP POSIX POTS PSTN PT QCIF QoP QoS RACF RACS RAI RAN RAS RC RCEF RCF RD RED RFC RGB RGW RLE RM RQNT RR RRJ RRQ RRs RSA RSIP RST RSVP
ABBREVIATIONS
Policy and Charging Rule Function Policy Decision Function Packet Data Network Gateway Protocol Data Unit Policy Enforcement Point Packed Encoding Rules PSTN/ISDN Emulation Subsystem Pages Received (Fax) Pages Sent (Fax) Progress Indicator Presence Information Data Format Protocol-independent Multicast Proxy Mobile IP Portable Open System Interconnect Plain Old Telephone Service Public Switched Telephone Network Payload Type Quarter CIFV (144∗ 176) Quality of Protection Quality of Service Resource and Admission Control Function Resource and Admission Control Subsystem Resource Availability Indicator Radio Access Network Registration, Admission, Status Protocol Reception Report Count Resource Control Enforcement Function Registration Confirm Restart Delay Random Early Detection Request for Comments Red–green–blue Residential Gateway Run Length Encoding Restart Method Notification Request Resource Record Registration Reject Registration Request Resource Records Rivest, Shamir, Adleman (public key algorithm) Restart in Progress Reset Resource ReserVation Protocol
ABBREVIATIONS
RTC RTCP RTO RTP/AVT RTP RTP RTSP S-CSCF S-GW S/MIME Secure SAP SBC SCN SCP SCTP SDES SDL SDP SECAM SGCF SGCP SGF simcap SIMPLE SIP SIPS SLF SMG SMS SMTP SoIx SP SPDF SQCIF SR SRV SS SS-CD SS-CFB SS-CFNR SS-CFU SS-DIV SS7 SSF
xvii Return to Command Real-time Control Protocol Retransmission Timeout Real Time Protocol under the Audio/Video Profile Real-time Protocol Real-time Transport Protocol Real-time Streaming Protocol Serving Call/Session Control Function Serving Gateway Multipurpose Internet Mail Extension Session Announcement Protocol Session Border Controller Switched Circuit Network Service Control Point Stream Control Transport Protocol Source Description RTP Packet Specification and Description Language Session Description Protocol S´equentiel Couleur a` M´emoire Signaling Gateway Control Function Simple Gateway Control Protocol Signaling Gateway Function Simple Capability (SDP Declaration) SIP for Instant Messaging and Presence Leveraging Extensions Session Initiation Protocol Session Initiation Protocol Secure Subscription Locator Function Special Mobile Group (of ETSI) Short Message Service Simple Mail Transfer Protocol Service-oriented Interconnection Single Space Service Policy Decision Function Sub-QCIF (128 × 96) Sender Report Server DNS Record Supplementary Service Supplementary Service: Call Deflection Supplementary Service: Call Forwarding on Busy Supplementary Service: Call Forwarding on No Reply Supplementary Service: Call Forwarding Unconditional All Diversion Supplementary Services Signaling System 7 Service Switching Function
xviii SSL SSW STP STUN SUD TAPI TCAP TCF TCP TCS TCS=0 TDM TE TFTP TGCF TGW TIA TIPHON TLS TLV TO TPKT TTL TTS TURN UA UAAF UCF UCS UDP UDPTL UE UICC UII UL UMTS UPSF UPT URI URJ URL
ABBREVIATIONS
Secure Sockets Layer Softswitch Signaling Transfer Point Simple Traversal of UDP through Network Address Translators Single Use Device Microsoft Telephony API SS-7 Transaction Capabilities Training Check Function Transport Control Protocol Terminal Capability Set NullCapabilitySet Call Flow in H.323 Time Division Multiplexing Terminal Equipment Unit Trivial File Transfer Protocol Trunking Gateway Control Function Terminating Gateway Telecommunications Industry Association (USA) Telephony and Internet Protocol Harmonization over Networks (ETSI) Transport Layer Security Type, Length, Value Format Timeout Transport Packet (RFC 1006) Time to Live Text to Speech Traversal Using Relay NAT SIP User Agent User Access Authorization Function Unregistration Confirm Universal Character Set User Datagram Protocol UDP Transport Layer User Equipment Universal Integrated Circuit Card User Input Indication Uplink Universal Mobile Telecommunication System User Profile Server Function Universal Personal Telephony Uniform Resource Identifier Unregistration Reject Uniform Resource Locator