SIP: Understanding the Session Initiation Protocol Third Edition For a complete listing of titles in the Artech House Telecommunications Series, turn to the back of this book. SIP: Understanding the Session Initiation Protocol Third Edition Alan B. Johnston Library of Congress Cataloging-in-Publication Data A catalog record for this book is available from the U.S. Library of Congress. British Library Cataloguing in Publication Data A catalogue record for this book is available from the British Library. Cover design by Yekaterina Ratner Cover art by Lisa Johnston ISBN 13: 978-1-60783-995-8 © 2009 ARTECH HOUSE 685 Canton Street Norwood, MA 02062 All rights reserved. Printed and bound in the United States of America. No part of this book may be reproduced or utilized in any form or by any means, electronic or mechanical, including pho- tocopying, recording, or by any information storage and retrieval system, without permission in writing from the publisher. All terms mentioned in this book that are known to be trademarks or service marks have been appropriately capitalized. Artech House cannot attest to the accuracy of this information. Use of a term in this book should not be regarded as affecting the validity of any trademark or service mark. 10 9 8 7 6 5 4 3 2 1 For Lisa Contents Foreword to the First Edition xxi Preface to the Third Edition xxiii Preface to the Second Edition xxv Preface to the First Edition xxvii 1 SIP and the Internet 1 1.1 Signaling Protocols 1 1.2 Internet Multimedia Protocol Stack 2 1.2.1 Physical Layer 2 1.2.2 Data/Link Layer 2 1.2.3 Network Layer 3 1.2.4 Transport Layer 4 1.2.5 Application Layer 9 1.2.6 Utility Applications 9 1.2.7 Multicast 10 1.3 Internet Names 11 1.4 URLs, URIs, and URNs 11 1.5 Domain Name Service 13 1.5.1 DNS Resource Records 14 1.5.2 Address Resource Records (A or AAAA) 15 vii viii SIP: Understanding the Session Initiation Protocol 1.5.3 Service Resource Records (SRV) 15 1.5.4 Naming Authority Pointer Resource Records (NAPTR) 16 1.5.5 DNS Resolvers 16 1.6 Global Open Standards 17 1.7 Internet Standards Process 18 1.8 A Brief History of SIP 20 1.9 Conclusion 21 References 21 2 Introduction to SIP 23 2.1 A Simple Session Establishment Example 23 2.2 SIP Call with a Proxy Server 31 2.3 SIP Registration Example 36 2.4 SIP Presence and Instant Message Example 38 2.5 Message Transport 43 2.5.1 UDP Transport 43 2.5.2 TCP Transport 45 2.5.3 TLS Transport 46 2.5.4 SCTP Transport 46 2.6 Transport Protocol Selection 47 2.7 Conclusion 48 2.8 Questions 48 References 50 3 SIP Clients and Servers 51 3.1 SIP User Agents 51 3.2 Presence Agents 52 3.3 Back-to-Back User Agents 53 3.4 SIP Gateways 54 3.5 SIP Servers 56 3.5.1 Proxy Servers 56 3.5.2 Redirect Servers 61 3.5.3 Registrar Servers 63 3.6 Uniform Resource Indicators 64 3.7 Acknowledgment of Messages 65 Contents ix 3.8 Reliability 66 3.9 Multicast Support 68 3.10 Conclusion 69 3.11 Questions 69 References 72 4 SIP Request Messages 73 4.1 Methods 73 4.1.1 INVITE 73 4.1.2 REGISTER 76 4.1.3 BYE 78 4.1.4 ACK 78 4.1.5 CANCEL 81 4.1.6 OPTIONS 82 4.1.7 SUBSCRIBE 84 4.1.8 NOTIFY 87 4.1.9 PUBLISH 88 4.1.10 REFER 91 4.1.11 MESSAGE 94 4.1.12 INFO 96 4.1.13 PRACK 97 4.1.14 UPDATE 99 4.2 URI and URL Schemes Used by SIP 100 4.2.1 SIP and SIPS URIs 101 4.2.2 Telephone URLs 102 4.2.3 Presence and Instant Messaging URLs 104 4.3 Tags 104 4.4 Message Bodies 105 4.5 Conclusion 107 4.6 Questions 107 References 108 5 SIP Response Messages 111 5.1 Informational 112 5.1.1 100 Trying 112 5.1.2 180 Ringing 113
Description: