i d UNIVERSITY OF MORATUWA SRI LANKA IMPLEMENTATION OF A FULL-FEATURED IP TELEPHONY SYSTEM Submitted in partial fulfillment for the degree of Masters of Engineering in Electronics and Telecommunication S.M.W.P.K. ARIYARATHNA University of Moratuwa 79561 U M fheSis coll August 2003 -jCjJj^j 79561 The work presented in this dissertation has not been submitted for the fulfilment of any other degree S.M.WJP.K. Ariyarathna Candidate ca Dias Supervisor Dr. Gihan Dias Supervisor DEDICATION I dedicate this thesis to my Central collage Kekirawa , University of Peradeniya and University of Moratuwa for the guidance given to me at all times to achieve my goals and targets and providing me with the post graduate course that I received. It is with reverence and respect that I remember my parent and teachers at this junction of my life for giving me the best of energy and enabling me to get the best possible education. ACKNOWLEDGEMENT Dr. (Mrs.) Dileeka Dias and Dr Gihan Dias deserve many thanks for spending their valuable time and paying great attention in supervising this project giving all necessary advices, solutions and directions to make it successful. I am deeply indebted Dr. Gihan Dias and Lanka Educational And Research Network (LEARN) for providing me all hardware, software , and all infrastructure facility to implement this project. My special thanks go to Mrs. Vishaka Nanayakkara in supporting me in testing and tuning works, giving her advices and directions all the time. 1 am grateful to all the academic staff, including Prof (Mrs.) I.J. Dayawansa, and non- academic staff of the Department of Electronic and Telecommunication Engineering who in different and distinct ways helped me to complete this research. A special tribute to Sierra Information Technologies Ltd. for providing me all necessary infrastructure facilities at the initial stage of this research work. Lot of number of individuals including friends who helped in numerous ways are also acknowledged. Finally my deep gratitude for my spouse and parent for their encouragements and helps right through out this period. CONTENTENTS Abstract i List of Figures ii List of Tables iv List of Appendixes v List of Abbreviations used vi 1 INTRODUCTION 1 1.1 VoxandH.323 1 1.2 H.323 Overview 2 1.3 H.323 Architectural overview 2 1.3.1 Terminal 3 1.3.2 Gateway 3 1.3.3 Gatekeeper 4 1.3.4 Multipoint Control Unit (MCU) 4 1.4 Importance of standardise LP telephony system 4 1.4.1 Cost and the technical competitiveness of the system 4 1.4.2 Compatibility with the multi-vendor hardware 6 1.4.3 Replacing and extending existing service 6 1.4.4 Provision for future development 6 1.5 System Implementation 6 1.5.1 Software selection 8 1.5.2 Hardware selection 8 1.6 Organization of this thesis 8 2 H.323 STANDARDS, PROTOCOLS, A N D E L E M E N T S 10 2.1 H.323 standards 10 2.1.1 Call signalling and control 10 2.1.2 Audio/Video/Fax codecs 10 2.1.3 H.323 related standards 11 2.2 Protcols 12 2.2.1 Transport protocols 12 2.2.2 Signalling protocols 14 2.2.3 Media related protocols 16 2.2.4 Security related protocols 16 2.2.5 Supplementary services related protocols 16 2.2.6 Protocols related to real time data transmission 17 2.3 Order of protocols used in call processing 18 2.4 Elements and their functions 19 2.4.1 Terminal 19 2.4.2 Gateways 20 2.4.3 Gatekeeper 21 2.4.4 Multiple Control Unit 25 3 SIGNALLING A N D SIGNALLING C H A N N E L S 3.1 RAS (Registration Admission and Status) 3.1.1 Gatekeeper discovery 3.1.2 End-point registration 3.1.3 End-point location 3.1.4 Admission, bandwidth changes, status, and disengage 3.1.5 Access tokens 3.1.6 Alternate gatekeeper procedures 3.1.7 Usage information reports 3.1.8 call credit related capabilities 3.2 Call signalling 3.2.1 Call setup 3.2.2 Call clearing 3.3 Call control signalling 3.4 Signalling channel and routing 3.4.1 Call signalling channel routing 3.4.2 Control channel routing 4 SYSTEM OPERATION A N D IMPLEMENTATION A R C H I T E C T U R E 4.1 Deployment architecture and operation 4.1.1 System architecture 4.1.2 System operation 4.2 Implementation requirements 4.2.1 Gatekeeper 4.2.2 Gateways 4.2.3 Terminals 5 SYSTEM INSTALLATION 5.1 Basic libraries and Gateway card installation 5.1.1 Pwlib 5.1.2 Openh323 5.1.3 Quicknet card drivers 5.2 Application software installation 5.2.1 Gatekeeper 5.2.2 Gateways 5.2.3 Modification of FXO Gateway 5.2.4 Terminals 6 QUALITY OF SERVICE M A N A G E M E N T 6.1 Latency 6.1.1 Cause of latency 6.1.2 Managing latency 6.2 Jitter 6.3 Echo FUTURE W O R K 75 7.1 Supplementary services 75 7.2 Interfacing the system with modern voice networks 75 R E F E R E N C E S 77 i -r ABSTRACT Traditionally, voice traffic has been carried on circuit-switched networks. However, in recent years great interest has been generated in carrying voice over a variety of nontraditional packet-switched networks. These techniques are known generally as Voice over Packet (VoP). The most popular implementation of VoP has been VoIP on the IP-based Internet. Other VoP technologies comprise those such as voice over Frame Relay (VoFR), Voice Over ATM (VoATM) ,and voice over Digital Subscriber Loop (VoDSL). IP is the dominating technology in end user level deployments, carrying millions of minutes of voice traffic today. This thesis describes the implementation of an Internet Telephony (Voice over IP, VoIP) system within the University's voice and data networks. The deployment of VoIP can reduce costs by combining all types of traffic onto a single network infrastructure, eliminating the need to maintain and pay for several different services. The University has its internal telephone network implemented via several PABXs, and its computer network consisting of several departmental networks. Implementation of the VoIP system enables the integration of the two, and through that, the extension of telephone facilities to a larger group of people, as well as the development of value-added services. ITU-T Recommendation H.323 is the most widely used standard facilitating VoIP. Further this details the hardware and the software aspects of the designed H.323- based VoIP system, and their integration for implementation in the university-wide network. i LIST OF FIGURES Figure 1-1 H.323 Architectural overview 3 Figure 1-2 Portion of deployed system 7 Figure 2-1 Protocols related to OSI model 11 Figure 2-2 Format of RTP header field 13 Figure 2-3 RTCP structure 14 Figure 2-4 Q.931 header structure 15 Figure 2-5 Basic component of H.323 terminal equipment 19 Figure 2-6 H.323 Gateway architecture 21 Figure 2-7 Presence of Gatekeeper in H.323 zone 21 Figure 2-8 MCU architecture 25 Figure 3-1 Gatekeeper auto discovery 29 Figure 3-2 End-point registration 31 Figure 3-3 Basic call setup no gatekeeper 36 Figure 3-4 Both end-points, registered same gatekeeper-direct call signalling 37 Figure 3-5 Both end-points registered same gatekeeper and route call signalling 38 Figure 3-6 End-point initiated call clearing 40 Figure 3-7 Gatekeeper initiated call clearing 41 Figure 3-8 Gatekeeper routed call signalling 46 Figure 3-9 Direct end-point call signalling 47 Figure 3-10 Direct H.245 control channel connection between end-points 48 Figure 3-11 Gatekeeper routed Control channel connection between end-points 49 Figure 4.-1 Basic system architecture 51 Figure 4-2 Registration and admission 52 Figure 4-3 Accounting system for pre-determined call duration 53 Figure 4-4 Call processing 54 Figure 5-1 Netmeeting configuration 61 Figure 6-1 Quality perception vs latency 63 Figure 6-2 Part of deployed IP telephony system 64 Figure 6-3 Gateway processing 65 Figure 6-4 DSP voice compression sub system 66 Figure 6-5 Framing process 66 ii Figure 6-6 Anatomy of an IP telephony packet 70 Figure 7-1 Resource reservation for point to point connection 76 LIST OF T A B L E S Table 1-1 Hardware and software cost comparison 5 Table 2-1 Description of signalling standards 10 Table 2-2 Description of codec standards 10 Table 2-3 Description of H.323 standards 11 Table 2-4 Description of RTP fields 12 Table 2-5 Description of RTCP fields 13 Table 2-6 Description of Q.931 fields 15 Table 2-7 Order of protocols and intended functions in call processing 18 Table 3-1 Description of basic RAS messages 27 Table 3-2 Description of RAS Q.931/H.225.0 message format 34 Table 3-3 H.323 message formats 42 Table 6-1 Voice code frame sizes 67 Table 6-2 Compression method and MOS score 68 Table 6-3 Sample latency budget 73 iv T LIST OF APPENDIXES Appendix I Installation steps and command I Appendix II Configuration files, commands and parameter references III Appendix III Boot scripts XXX Appendix IV Scripts for supplementary services XXXIV Appendix V Code modifications XLIX v LIST OF ABBREVIATIONS ACF Admission Confirmation APE Application Protocol Entity ARJ Admission Reject ARQ Admission Request BCF Bandwidth Change Confirmation B-ISDN Broadband Integrated Services Digital Network BRJ Bandwidth Change Reject BRQ Bandwidth Change Request CAS Channel Associated Signalling CED Called Terminal Identification Tone CID Conference Identifier C1F Common Intermediate Format CNG Calling Tone DBR Deterministic Bit Rate DCF Disengage Confirmation DNS Domain Name System DRQ Disengage Request DSVD Digital Simultaneous Voice and Data DTMF Dual-Tone Multi Frequency FAS Facility Associated Signalling GCC Generic Conference Control GCF Gatekeeper Confirmation GID Global Call Identifier GIT Generic Identifier Transport GK Gatekeeper GQOS Guaranteed Quality of Service GRJ Gatekeeper Reject GRQ Gatekeeper Request GSTN General Switched Telephone Network GW Gateway HDLC High Level Data Link Control HTTP Hypertext Transfer Protocol ID Identifier IP Internet Protocol IRQ Information Request [RR Information Request Response ISDN Integrated Services Digital Network IS UP ISDN User Part ITU-T International Telecommunication Union - Telecommunication Standardization Sector LAN Local Area Network LCF Location Confirmation LRJ Location Reject LRQ Location Request MC Multipoint Controller vi MCS Multipoint Communications System MCU Multipoint Control Unit MG Media Gateway MGC Media Gateway Controller MP Multipoint Processor MTU Maximum Transmission Unit N-ISDN Narrow-band Integrated Services Digital Network NACK Negative Acknowledge NFAS Non-facility Associated Signalling NN1 Network-to-Network Interface NSAP Network Layer Service Access Point f OLC H.245 OpenLogicalChannel message PBN Packet Based Network PDU Packet Data Unit PRI Primary Rate Interface QC1F Quarter CIF QOS Quality of Service RAS Registration, Admission and Status RAST Receive and Send Terminal RCF Registration Confirmation RIP Request in Progress RRJ Registration Reject RRQ Registration Requestb RTCP Real Time Control Protocol RTP Real Time Protocol SCN Switched Circuit Network SCR Service Control Response SSRC Synchronization Source Identifier TCP Transport Control Protocol TGW Trunking Gateway TSAP Transport layer Service Access Point UCF Unregister Confirmation UDP User Datagram Protocol UNI User-to-Network Interface URJ Unregister Reject URQ Unregister Request vii