Đề tài General of the thesis voip -Voice over internet protocol

Tài liệu Đề tài General of the thesis voip -Voice over internet protocol: Ha Noi open university Center For International training Co-operation Thesis: Teacher : Nguyễn Thái Nguyên Group 3 : Đồng Xuân Thắng -Cap Lê Trọng Nghĩa Nguyễn Xuân Tư Mai Trọng Dũng Bùi Thanh Nhàn Ngô Thị Nhàn Hà Nội ngày 15/1/2003 Glossary ATM : Asynchronous Trasfer mode ACELP : Algebraic Code Excited Linear Predictive ARQ : Automatic Rrepeat Request ACF : Admission Confirm DES : Data Encryption Stadard PSTN : Public Switched Telephone Network PC : Personal Computer PCM : Pulse Code Modulation IP : Internet Protocol ITU : International telecommunication Union IETF : Internet Engineering Task Force ISUP : ISDN User Part INAP : Intelligent Network Application Part ITSP : Internet Telephony Service Provider MAP : Mobile Application Part MGCP : Multimedia Gateway Control Protocol MTP : Message Trasfer Part MP : Multi point MCU : Media Control Unit OLC : Open Logical Channel QoS : Quality of Service RC : Report Court RSVP : Resource Reservatio...

doc78 trang | Chia sẻ: hunglv | Lượt xem: 1115 | Lượt tải: 0download
Bạn đang xem trước 20 trang mẫu tài liệu Đề tài General of the thesis voip -Voice over internet protocol, để tải tài liệu gốc về máy bạn click vào nút DOWNLOAD ở trên
Ha Noi open university Center For International training Co-operation Thesis: Teacher : Nguyễn Thái Nguyên Group 3 : Đồng Xuân Thắng -Cap Lê Trọng Nghĩa Nguyễn Xuân Tư Mai Trọng Dũng Bùi Thanh Nhàn Ngô Thị Nhàn Hà Nội ngày 15/1/2003 Glossary ATM : Asynchronous Trasfer mode ACELP : Algebraic Code Excited Linear Predictive ARQ : Automatic Rrepeat Request ACF : Admission Confirm DES : Data Encryption Stadard PSTN : Public Switched Telephone Network PC : Personal Computer PCM : Pulse Code Modulation IP : Internet Protocol ITU : International telecommunication Union IETF : Internet Engineering Task Force ISUP : ISDN User Part INAP : Intelligent Network Application Part ITSP : Internet Telephony Service Provider MAP : Mobile Application Part MGCP : Multimedia Gateway Control Protocol MTP : Message Trasfer Part MP : Multi point MCU : Media Control Unit OLC : Open Logical Channel QoS : Quality of Service RC : Report Court RSVP : Resource Reservation Protocol RTCM : Real Time Control Mode RTP: Real Time Post SIP : Session Initiation Protocol SS7 : Signal No.7 SCCP : Signaling Connection Control Part STP : Signaling Transfer Point TCP : Transmission Control Protocol TCAP: Transaction Capabilities Application Part UDP : User Data Package VAD : Voice Activity Detector VoIP : Voice over Internet Protocol General of the thesis VoIP -Voice over Internet protocol VoIP ( Voice over IP- that is, vioce delivered using the Internet Protocol) is a term used in IP telephony for a set of faccilities for managimg the delivery of voice information using the Internet Protocol(IP). In general, this means sending voice information in digital form in discrete packets rather than in the traditional circuit – committed protocols of the public switched telephone network (PSTN). A major advantage of VoIP and Internet telephony is that it avoids the tolls charged by ordinary telephone service. VoIP, now used somewhat generally, derives from the VoIP Forum, an effort by major equipment providers, including Cisco, Vocltec, 3 Com, and Netspeak to promotethe use of ITU-T H.323, the standard for sending voice (audio) and video using IP on the public Internet and within anintranet. The Forum also promotes the user of directory service standard so that user can locate other users and the use of touch-tone signals for automatic call distribution and voice mail. In addition to IP, VoIP uses the real-time protocol (RTP) to help ensure that packets get delivered in a timely way. Using public networks,it is currently difficult to guarantee Quality of Service (QoS). Better service is possible with private network managed by an enterprise or by an Internet telephony service provider (ITSP). A technique used by at least one equipment manufacturer, Netspeak, to help ensure faster packet delivery is to Packet Internet or Inter- Network Groper (Ping) all possible network gateway computeres that have access to the public network and choose the fastest path before establishing a Transmission Control Protocol (TCP) sockets connection with the other end. Using VoIP, an enterprise positions a “VoIP device” (such as Cisco’s AS5300 access server with the VoIP feature) at a gateway. The gateway receiver packetixed voice tranmissions from users within the company and then routes them to othe parts of its intranet (local area or wide area netnork) or using a T- carrier system or E-carrier interface, sends them over the public switched telephone network (PSTN) Chapter1:Voice over IP (VoIP) Technology 1. Fundamental features of channel switching network and Internet: 1.1. Fundamental features of channel switching network: The channel switching network is designed for rapid connect and eliminating the ineffectiveness of time-consume on connecting. In the channel shifting network, the user is provided a conductive channel to exchange information together. When the exchange completed, the conductive channel is released. This could lead to loss because of limits of conductive channel. The utility is low but ensures the calling quality because a two-way 64 kbps channel is set aside for caller and receiver. The channel shifting network is designed optimum for real transmission time with high service quality. In the channel switching network, all terminal equipment and switch board are inserted a fixed number so no need to enter address for information exchanging process. The switching system in channel switching network will base on the address of called subscriber to define the conductive line. Because the band width is ensured not be changed during calling, calling fee of channel switching network is based on distance and calling time. 1.2. Fundamental features of Internet: Internet is the package switching network suitable with applications that are not exchanged according to the real time; Package delay doesn’t effect strongly on service quality like email and file transmission. Package switching networks don’t set aside a fixed line between two users, so, not ensure the service quality. All information on the network are divided into packages, these packages contain the destination address and its order. Channel fixer and host on the network will send these packages to the targeted address. On Internet, all packages are treated the same with out distinguishing their contents. When packages to the destination address, they will be arranged according to the initial number. By form of package information transmission, the utility is maximum. However, real time applications will be greatly effected on service quality. The fee is not calculated on distance or time but on used band width. On Internet, on address of package is marked by IP address, the IP address will be named for the host and terminal stations. Channel fixing will be controlled by the IP destination address. To create a understandable, convenient address type for the IP address by name like service of regional name or email address. Because the limit of IP address, the users are temporarily inserted IP while dialing. The IP address is only for one terminal equipment while connecting Internet and deleted while not connecting. The deleted IP address will be used for another connecting on the network. 1.3. Advantages of VOIP against PSTN: The users will pay for used time of PSTN if more time for call establishment, more increased fee to be paid. At one time, they can contact to one person. But with VoIP, the time for call establishment is independent to subscriber’s fee. One subscriber could have calls to different ones and exchange data, dialogue, pictures, paintings and video with other subscribers. Figure 1: The basic structure of telephone network by IP 1.4. Outlook of VoIP technology: + Some technical features of IP telephone: By analysis of fundamental features of channel switching network and Internet, we see that it is typical to accumulate real time signal into the package switching network and IP telephone. Firstly, we should classify IP telephones. All IP telephones change according to 3 characters: type of terminal equipment, position of gateway, between IP and PSTN networks and main transmission equipment. a. Terminal equipment and gateway: There are 03 main types of IP. They are PC to PC, PC to Phone, Phone to Phone. + PC to PC is the first model of IP telephone. Users at two ends of PC to PC should have 1 PC that is equipped audio, a software and connected to Internet. This service no need gateway and PCTN because PCTN never switch these calls, the main transmission tool is public Internet. Due to sound quality and complexity of use, the PC to PC has a litter affect on traditional telephone service. + PC to Phone expands the number of users but for exploiters, the call of PC to Phone is more complex than that of PC to PC. + Phone to Phone is very important market including mainly commercial services, because, people prefer to communicate by phones. However, the 3rd model of IP requires more investment capital because it needs input gateway to PSTN near places providing service. Services of Phone to Phone are nearly similar to that of traditional telephones. b. Transmission equipment: The classification between IP and VoIP telephone is based on the nature of main transmission equipment. IP telephone is for voice transmission, fax and services relating to package switching networks on IP. Internet phone and VoIP are basic types of IP. Internet phone is IP in which the main transmission network is public Internet (global super-network). Voice over IP is IP in which the main transmission network is private-used one basing on IP. Besides, being the replacing tools for distance and international phone, the IP technology creates a plenty of other services that can transmit every service by IP. This part only mentions the technology of VoIP and interests in the terminal equipment that is telephone on the channel switching network (Phone to Phone). Figure 2: IP call: Phone to Phone + Special features of VoIP: a. Adjustable quality: The quality of VoIP depends on each part (coding and low speed re-coding for each part). Internet is not specific service network, the exchanging methods are entirely selected by terminal systems. Thus, the terminal systems can control the compressed volume on the network bandwidth or content for transmission. b. Security: Using SIP to order a password and confirm messages indicating the terminal. RIP make and the password to be the password of transmission method. Therefore, all program is coded to secure transmission. c. Users interface: Terminal systems of VoIP have plentiful indications and can give out instructions and various graphic interface. d. Connecting telephone and computer: Available to solve these complex connections. 1.5. Conclusion: The VoIP technology has potential for future development, ability to replace the existing PSTN network. Due to differences in features of channel switching network and Internet, to apply VoIP for users of channel switching network (Phone to Phone), these differences should be solved. Concretely, there should be address changes, indication of two networks and proper inter-code for application of time transfer on network. 2. Problems relating to VoIP technology and talk quality on VoIP: Using the traditional channel switching telephone network will cost much when at distance, to reduce expenses for distant calls, use public data network or private data network for communication. The package switching network that applies IP is example. Using the package switching network by IP to transmit the talking signals. Voice over IP-VoIP is good basis to design global multi-instrument transmission system that can replace the infrastructure of existing network. Accumulating Audio, Video, data, fax... into a single common network on IP technology. It is possible to apply the Frame relay or unsynchronous transmission technology ATM to replace IP technology. The VoIP is more economic for distant call, because the fee is calculated by the width of bandwidth, not by distance. In IP, it uses talk compressing technology to save band width leading to cost reduction but the IP’s quality not as good as that of PSTN. The biggest difference when applying into the multi-instrument network is actual time service non-actual one. With actual time service and like Audio, Video... not allow over-delay on the network; in non-time network like email, file transmission, the delay is not worthy worrying. So, to carry out VoIP, special compressing and coding methods should be used to reduce the speed of talk signals that can’t be use 64 tps like channel switching. 2.1. Coding techniques and talk signal compression: In talk transmission, voice is usually numberidized and coded PCM by Rule A or U with speed of 64 Kps recorving sound rather actual. For some specific applications such as transmitting talk signals on TP network, sounds are transmitted with lower speed, so, there should have coding techniques and talk signal compression to lower speed according to standard of ITU and ETSI like G723.1; G729; G729A; GSM. + Standard G7213. According to the standard of ITU, the coding has 5.3Kbps and 6.3Kbps. The compression technicque uses MP-MLQ for high bit speed; for coding with low bit speed using ACELP. Delaying against algorithm is 67.5ms. + Standard G.729. According to the ITU standard, this coding has speed of 8 Kbps. This compression techniques uses algorithm predicting coded linear linked structure algebra excitation. Delaying against algorithm is 25ms. + Standard GSM06.10. According to ETSI, this code has 13Kbps. This compression technique is regular pulse excitation and long-term predictor. Delaying against algorithm is 40ms. 2.2. Voice Activity Detector (VAD): VAD is carried out by numeric signal processor to reduce the talk intensity that is transmitted by automatically detecting the dead space on the talk and stopping transmitting at that time. There are space approx. 50-60% of almost talks. This always occurs because when one speaking, the other must listen to. VAD allows band width for dead space saved for reserving other data. VAD actives by controlling power of talk signals; power change is change of talk signal frequency. The difficult of VAD is to define the exact time of talk ending and of talk signal. The double VAD is nearly 200ms after recognizing talk signals and stop and detect package processing. This top prevent VAD from missing the end talk or in the middle of small interrupt in talks. 2.3. Number and address: Due to cooperation between IP and SCN networks, there will be 2 types of address: address in CSN and in IP. a. Numbering on SCN network: On the channel switching network, all terminal and switchboard are fixed a number. Number E164 is telephone numbers subject to the structure and numbering program that were described on the proposal E164 by International Telecommunication Union. The line fixing process on the channel switching network is controlled by the address system of E164. Before dialing, the users of channel switching network have to dial E164 and callee’s number. + Local number: Code of Access Caller + National Post + National Destination Code + + Subscriber number. + For international numbers, we can use 03 following structures: Code of Access Caller + International Post + Country Code + Identification Code + Subscriber number. Code of Access Caller + International Post + Country Code + Destination Code + Subscriber. Code of Access Caller + International Post + Country Code + Global Subscriber’s Number. b. Numbering on IP: + Prefix is an identifier including one or more numbers allowing the used numerical types, network and service and can be used to select service provider, type of service in a nation. + Selecting service provider including numbers that allow to select service by IP network or SCN and there of to select appropriate switching. + Selecting service provider can be done by ways: pre-select by user or dialing, password. Incase, the Gateway connects to SCN where there are a lot of service providers, both Gateway and Gatekeeper should be able to identify and process the selected code of service provider. Incase, a lot of service providers on IP network, Gatekeeper is able to identify and process the selected code of service provider. To get the most common address types on Internet, it can use name address like email address: user@domain, user@host, user@IP-address, phone-number@gateway. 2.4. Fee: To ensure the effectiveness of network, the fee calculating will be done by a separate host system. The fee-calculator host will be responsible for collecting and reserving all detail of call from gateway or MGC. These data are used to make invoices for customers. Customers ca access into the host for their fee details on the website. The fee will be calculated by the used time. The fee calculating system should be able to calculate on 2 types of service: pre-paid and post-paid. This software must be able to carry out some following function. - Accepting call. - Informing the amount of account. - Fee calculating based on pre-fixed level for different directions. - Informing the maximum time of call. - Updating account’s amount after calling. 2.5. Signal cooperation: The standard of signal communication of IP Phone to PSTN is suggested to be signal No. 7 (SS7). The SS7 is used to transmit following information: - Information o call establishment. - Information about call control. - Property and application. The signal communication between 2 IP networks and signal network 7 of PSTN is carried out by signal Gateway. The signal gateway connects to STP on the SS7 as a SP and transfer signals fully. The signal Gateway should support signal news ISUP and SCCP/TCAP. Using the signal communication No. 7, IP telephone network will bring benefits as follows: - Fully connecting to PSTN. - Supplying additional services. - Improving call control. - Improving maintaining property for trunk. - Speeding up call establishment. Although new signaling, ssuch as H.323 ans SIP, exist for VoIP net works the standard in traditional telephony and in mobile networks is SS7. Therfore, if a VoIP based network is to communicate with any traditions network, not only must it network at the media level through media gateways, it must also interwork with SS7. To support this, the IETF has developed a set of protocols known as Sigtran. In order to understand Sigtran, it is worth considering the type of inter working that needed to occur. Imagine, for example, an MGC that control one or more media gatways. The MGC is a call control entity in the network and, such as uses call control signaling to and from other call control entities. If other call control entities use SS7 then the MGC must use SS7 at least to the extent that the other call control entities can communicate freely with it. This means that the MGC does not necessarily need to support the whole SS7- just the necessary application protocols. Consider figure 3 which shows the SS7 stack. The bottom three layer are called the Message Transfer Part (MTP). This is set of protocols responsible for getting a particular SS7 message from the source signaling point to the destination signaling point. Above the MTP we find either the Signaling Connection Control Part (SCCP) or the ISDN User Part (ISUP). ISUP is generally used for the establishment of regular phone calls. SCCP can also be used in the establishment of regular phone calls but it is more often used for the transport of higher layer applications, such as the GMS Mobile Application Part (MAP) or the Intelligent Network Application Part (INAP). In fact most such application use the services of the Transaction Capabilities Application Part (TCAP) which in turn uses the services of SCCP. Application Part ISDN User Part (ISUP) Transaction Capabilities Application Part (TCAP) Signaling Connection Control Part (SCCP) MTP Level 3 MTP Level 2 MTP Level 1 Figure 3: SS7 Stack SCCP provides an enhanced addressing mechanism to enable signaling between entities even when those entities do not know each other’s signaling addresses (known as point codes). This addressing is known as global title addressing. Basically it is a means wherby some other address, such as a telephone number, can be mapped to a point code, either at the node that initiated the message or some other node between the originator and destination of the message Figure 3 provides some examples of communication between different SS7 entities. Consider scenario A. In this case, the two entities, represented by point code 1 and point code, communicate at layer 1. At each layer, a peer to peer relationship exists between the two entities. Scenario B has a peer to peer relationship at layer1, layer 2, and layeer 3 between point codes 1 and 2, 2 and 3, and 3 and 4. At the SCCP layer, a peer to peer relationship exists between point codes 1 and 2 and between point codes 2 and 4. At the TCAP and Application layers, a peer to peer relationship can only take place between point codes 1and 4. In other works, the application at point code 1 is only aware of the TCAP layer at point code 1 and application layeer at point code 4.Similarly the TCAP layer at point code 1 is aware only of the application layer above it, the SCCP layer below it, and the corresponding TCAP layer at point code 4. It is not aware of any of the MTP layer. Equally, if we consider communication between point code 2 and point code 4, the SCCP layer at each point code knows only about the layeer above (TCAP), the layer below (MTP3), and the corresponding SCCP peer. As far as the SCCP layers are concerned, nothing else exists. Therefore, SCCP neither knows nor eares that point code 3 exists. Consider Scenario C, where ppoint code 3 is replaced by a gateway that supports standard SS7 on one side and an IP based MTP emulation on the other side. Point code 4 does not supportr the lower SS7 layeers at all- just an MTP emulation over IP. Provided that the MTP emulation at point code 4 appears to the SCCP layer as standard MTP, then the SCCP layer does not care, not do any of the layers above SCCP. Equally the SCCP layers at point code 1 and 2 do not care. Consequently, it is possible to implement SS7 based applications at point code 4 without implementing the whole SS7 stack. This is the concept behind the Sigtran protocol suite. ISUP MIP3 MIP2 MIP1 ISUP MIP3 MIP2 MIP1 Point code 1 Point code 4 Scenario A - Communication Between Adjacent Signaling Points Application Application ICAP ICAP Sccp sccp sccp MTP3 mtp3 MTP3 MTP3 MTP2 mtp2 MTP2 MTP2 MTP1 mtp1 MTP1 MTP1 Point code 1 Point code 2 Point code 2 Point code 4 Scenario B - Communication Between non- Adjacent Signaling Points Application Application ICAP ICAP sccp sccp sccp MTP3 mtp3 MTP3 MTP MTP MTP2 mtp2 MTP2 emulation emulation MTP1 mtp1 MTP1 over IP over IP Point code 1 Point code 2 Point code 2 Point code 4 Figure 4 Example SS7 Communication Scenarios 2.6. Confidence: The IP service active on the base of IP switch, the requirement of confidence is very important for: + Protecting exploiters from bad activities. + Protecting exploiters from network troubles by faults of network components. + Protecting users from bad activities. To ensure above targets, the network should protect for 5 following services: - Confirmation. - Acceptance. - Refuse. - Privateness. - Security. An IP system can have one oral above services depending on each specific case and even each specific subscribe. For network exploiers, protecting important information from illegal access is put on top. Below are some suggestions: + Data Coding: This is the most effective practical method to protect information that are transmitted through different networks. Regularly, the data is compressed by different standards by Gateway, may be, no need to code the data. If necessary, information on network are advised to code by DES (Data Encryption Standard) with the key of minimum 56 bit long. + Anti-virus: Virus can cause significant consequences to the software of all system. Virus could be spread from other system or customers’. This also carries significant meaning when the system operates on base of the dispersion processing structure. Anti-virus software should be installed on Gateways and hosts of gatekeeper. + Using Firewall: This is important method to protect the network of exploiter. There are 2 basic mechanism of Firewall are to stop information and allow Firewall information to- - Stop all coming data except the resource is confirmed. - Release all data except for propaganda and regional checking data. Even, using firewall is effective, to ensure high confidence, coding and confirming methods should be used. + Confidence for distant access: To control distant access, there are following methods: - Confirmation: Distant subscribers should be controlled. - Access Limit: Fixing each distant subscriber a specific position on server. - Time limit: Fixing connecting time, if it is over, connecting will be cancelled. - Connecting limit: Limiting on connecting times and starting points of connect. + Confidence policy: Confidence plan should include following elements: - Definition of access levels regulating user to access into relevant resource. - How a subscriber on subscriber group access into the network. - Access Regulations: Time, place and how to use services. - Instructions for fee calculation. - Requirement on network accessing and connecting. - Ability to strengthen confidence methods in specific cases. - Instruction on confidence for users. 2.7. Troubles relating to calls quality: + Delay: - Algorithms delay: This is caused by Codec and naturally - created by coding algorithm. - Package delay: This is necessary time to delivery a IP package. And also suffer from delay when passing saving equipment and transition equipment, for example, passing line fixer or switcher. - Wave transmission delay: This is necessary time for optical or electric signals on transmission environment to certain geographic distance. - Structuring delay: This is delayed time created by different components in a transmission system. For example, a frame across a line fixer should move from Gate to Door across server body. There is a minimum delay through server body and changeable delay by in line and processing of line fixer. + Echo suppression. The first trouble caused by the delay is echo impact. The echo can be occurred on a talk network by chain-jointing between the listening and speaking parts of the complex. This delay is called auscosic delay. This also occur when a part of power energy is reflected to the speaker by a exotic line in PSTN, that called echo. If the time of one-way delay or terminal delay is short, every echo created by talk line is back to the speaker rapidly and non-noticeable. In reality, no need echo suppression if one-way delay is smaller 25ms. However, the one-way delay of VoIP almost over 25ms, so the echo suppression is required. + Superposition of voice If the best ability of echo suppression, switching 2-way talk become very difficulty when the delay is too long causing voice superposition. This occurs when one party reduces voice of the other when the delay is too large. + Jitter - Changeable delay. While phone services require to transmit according to the fixed delay, the data network that badly transmit and can’t supply the fixed delay because different packages have different delay, so, different delay frame. Resources create regularly frames, the Destination gate can’t collect these frames regularly because of Jitter. Jitter interrupts the call and difficult the talk content. To remove the changeable delay, it should receive frames and keep them for enough time. So that the latest frames come timely for reading in order. The buffer can remove the fitter. No worry on this for PSTN, because, the bandwidth is fixed. Volume of Jitter is more big, the longer frame kept on the buffer and create more time delay. If the Jitter is small, use small buffer. If Jitter increased by increase of loading, the size of buffer will automatically increase. Packages will destine after some fixed time (for example, after 20ms). Incase of Jitter, this is not true. The figure below illustrates the Package 1 (P1) and package 3 (P3) coming timely; but Package 2 (P2) and Package 4 (P4) late for 12ms and 5ms against expected relatively. Figure 5: Jutter description + Package loss: The IP network doesn’t ensure to fully and orderly distribute packages. Package will be lost if blocking (be broken by transmission line or insufficiency in capacity). Due to, the sensitive of talk transmission, the transmission rules are based on TCP, it will be no effective. If talk sample is lost on the terminal talk, ignore the gap at this line. If too much package are lost, the voice will be broken. To cover, replaying previous packages. This is only done if some samples are lost. In case of group faults, take interpolation by using previous packages and re-coding set will product what lost package is. In reality, to apply IP network for high service like video, mobile and high-quality talks, another signal system is required to solve this, it is signal system No. 7. + Bandwidth: A traditional talk uses a 64Kbps flow. When the talk flow is on IP network, it will be compressed and numericalizied by Digital signal processor. This compression reduce speed of talk to 5.3Kps for a talk, then, packed into IP network, IP/UDP/RTP starters are added. This large the band width for each call (about 40 byte for each package). However, technology for example, for compressing the RTP starter may reduce the IP starter to 2 bytes. The bandwidth depends on byte coding speed and talk package size. The private IP network has more advantages than Internet does because of more bandwidth so, voice quality is better. Defining the bandwidth on the network, number of call at peak time. VoIP can reduce the bandwidth by talk signal compression and dead suppression. 3. Transfer modes: TCP and UDP are two modes for data transmission on IP network. + TCP is good protocol for data transmission that can control flow and block, protect from over-loading on the network. However, there are some unfavorable matters when using the TCP mode. Due to the reliability of leyte service and retransmission of lost packages increasing the delay of network. TCP has a lot of properties and complexity, this is not benefit for VOIP technology. When transmitting talk signals, they should be distributed to users at the same time. On TP network, there should have effectiveness for distributing multi transmit-feedback data, however, TCP can’t supply this. If the data are distributed to destinations on TCP, single TCP will be required to connect causing cost of bandwidth. + UDB is protocol simpler than TCP, just an expanded ID mode, only used when no requirement for high quality service. This protocol has advantage that no waste of time for re-transmission of lost packages. It can use the property of multi-transmit and feedback and save bandwidth when data sent to a lot of destination. UD Palso has disadvantages, no synchronous mechanism and no means to control flow and block. To solve this matter, cooperate UDP and modes controlling the real time. 3.1. Real time mode: 3.1.1. Real Time Post: RTP can distribute among terminals of real time services like audio, vide. The typical RTP is used to transmit data through UDP (User’s Data Package). RTP and UDP supply functions of protocol transfer. UDP supplies multi-elements and error checking service. RTD is also used with other transfer protocol. When a host desires to send a package, it should know transmission measure to make package shape, add the specific transmission measure into the title of package to pre-decide the RTP’s title and put into the lower layer transmission measure. Then, send to network by multi transmit-feedback or single transmit-feedback ways to other participants. Format of RTR fields are described as follows: P header 20 bytes DP 8 bytes TP header 12 bytes CODEC sample Figure 6: News on real time Post Mode Fields of RTP header are: + Version (V, 2 bytes) defines version of RTP. + Padding (P, 1 byte). If padding is installed, a package contains one or more Octet padding adding to the terminal that not belong to pay load. The final Octet of padding includes number of ignored octet padding. Padding may need more other coding algorithms with changeable sizes of block or bring some RTP packages in low layer data unit mode. + Extension (X, 1byte). If X byte is fixed, Fixed Header will allow Header have an extension. + CSRC Count (CC, 4bytes) CCRS Count include some CSRC defining quantity of resource participants, shown on Fixed Header. + Marker (M, 1byte) Marker is defined by a profile, it means to allow signal, events like marking frame margin on information package. M Byte supplies information to re-create and release package in case of defining the first package on released voice. + Payload (PT, 7bytes). Fixing the transmission measure (Editing, changing the bandwidth to be sufficient for transmission on each travel). RTP and detailed description. + Sequence number (16 bytes). Sequence number increases each value for each data package sent by RTP, and search for lost packages and recover them in order. + Time stamp (32 bytes). Time Stamp feedback a sample for the first octet on RTP data package. This sample should be taken from a information package by a simple o’clock and linear in a period for synchronization. + SSRC (32 bytes). In case SSRC defines, show out the synchronous resources, this definition is selected at random to avoid two synchronous resources in one RTP session. + CSRC list (0 - 15times, 32 bytes/field): CSRC list defines, show resources for load (volume) in information package. The quantity of fixed sets is recorded on the CC field. If there are more than 15 resources for information package, only 15 set are defined. CSRC show out and insert, using SSRC to define contributing resources. + RTR Header Extension (variable length). An optional extended mechanism is supplied with RTP allow each implementation to test new functions requiring more information on RTP Header. 3.1.2. Real Time Control Mode: The RTCP is the basic to control continuous transmitted packages to participants on communication session by using the same distribution mechanism for data packages. The low modes must pill up data packages and control by using different port number and UDP. Functions of RTCP are described as follows: + Supplying feedback on the distributed data quality. This is major part of RTR; the protocol transports and relates to the flow controlling function and block of other controlling mode. Feedback are very useful for controlling coding sets. However, testing with IP multicast also give out results against transmission of feedback from the receiving end to diagnosing distribution errors. Sending a feedback to all supervising points to define problems, errors by local or central. By distribution mechanisms like IP multicast, can do for each unity as service providers and not be attracted into other aspects on communication sessions, receive feedback and act like the 3rd representative to diagnose network errors. + Bring a fixed load to RTP resource called C.Name. When SSRC is defined to be changeable if a conflict is found or the program is reset; required receiving points of C.Name keep way for terminal. Receiving points also require C.Name conjugate to data lines from each giving point in mutual relations on RTP session, for example, audio, and video. + Two first functions require all points participating into communication session send RTCP, so, the speed must be controlled by RTP to arrange a great number of communication points. Each communication point can send information package to other points, each point can supervise independently to others. + An optional function for a minimum post session, like fixed communication points to display on user’s interface. It seems very suitable, useful on loosely control sessions where communication points in and out don’t need member controlling measures or negotiation parameters. RTCP serves as a useful channel to reach to communication points. But it thinks that not necessary to satisfy all transmission control required by application. There are 5 package identifiers: - SR: Sender’s news is created by users, they also send transmission measures (RTP resources). They describe the sent data quality like correlation with time stamp, RTP sample and absolute time for synchronize different means. - RR: Receipt’s news is to create components participating into RTP session. They’re receiving transmission measures. Each such news contains a block for each RTP. Each block describes a immediate coefficient and the fitter (like phase drift) from this sources. The tensioning block shows the final label and the delay from receiving sender’s report, allow resources estimate their distances. - SDES: Resources labeled packages for controlling session. It include C.Name, the unique identification like frame an entail address. The standard name used to resolve conflict in synchronized source value and deferent combined communication protocol current is created by such user. SDES packages also identify members through its name, email and talk data, supplying simple control form . - BYE. If an user leaves participating in own-self session with BYE message, so each member can know the total members participated in. - APP: Specific applying elements (APP) to add give further specific information in to packages . Identifying header park as follows: 0 8 16 31 V = 2 P RC PT Length Figure 7: Preface of RTCP - Version (2 bit) determining version of RTCP. At present it’s installed equal 2. - Padding (P.1 bit) when being installing, it will determine RTCP information package, including some octet added at end part of control information the latest octet of padding part, will count, how many octet added are left. Padding may be uses by some cipher algorithm with the sire of data block changed. In permissible RTCP information package, padding can be required on final information package because information packages will couple complete code. - Reception Report Court (RC). Volume of reception report Court will lump all to RTCP package value is equal zero is legal. May have to 200 constant determinations of RTCPSR package. - DT: Determining the load type is which information in 5 kinds of newscast. - Length: The length of news package is a number of 16 bit, including header and added padding. 3.1.3. RSVP: RSVP not provide separate transmission protocol but still use IR, RSVP is only control protocol to supply quality of service (QoS) ensuring to the application. The host transmit data that need to reach any QSS, it send the call to destination address owning to newscasts include information on character and flow. RSVP not is line-de fixing protocol, simple selects a most optimal line. This can’t give an ideal QsS. RSVP is an important instrument to QsS, but not resolve all necessary problems related to QsS. On the transmission to aim of RSVP allows router save information on transmission newscast, with this way, its used when prior keeping data from newscast sender on the transmission line. When the user receive, transmission line newscast, it can decide to receive data or not of the sender with QsS fixed. For meeting QoS fixed, RSVP will send periodically a requirement of prior keeping under prior keeping line of transmission line newscast. Precise prior keeping line attained owing to information in RSVP. The prior keeping newscast includes 2 parts: containing QsS that collector wants to reach and describe data pack but will be received by that QoS. There are some prior keeping types are supplied by RSVP. A host receives data from some sources that can set forth on prior keeping requirement to distribute separate communication band to each source. It maybe one communication band is shared to every user in case of on-line discussion often only has 01 person talk at a timing date. 3.1.4. Conclusion: This chapter has mentioned main issues in VoIP technology. To have a talk network in IP complete, it needs to have standards of multi-means telecommunication, it will mention in next chapter. 4. Introduction of standards: 4.1. Introduction of standards: For standard of multi-means telecommunication bring pack base including both VOIP and standards related to telecommunication. International telecommunication organization (ITU-T): set forth recommendations H323. H2323 is complicated protocol and not ensure good quality of service (QoS). The technical expert force of Internet (IETF) has set forth 2 standard of simple protocol standard more than SID and MGCP and H.248 of ITU will provide quality more ensure and more flexible MGCP and H248 will provide to H323 and STP. The relationship between reference protocolls OSI with functions and protocol in VoIP. Layer order Name of class OSI Functions and protocol in VOIP 7 Application Contact with network 6 Presentation Code 5 Session H323/SIP/MGCP/H248 4 Transport RTP/RTCP/TCP/UDP 3 Network IP 2 Data Link Frame relay, ATM, Ethernet 1 Physical Bit flow Figure 8: Relationship between OSI protocoll and protocols in VOIP 4.2. Standard H323: 4.2.1. Introduction on H323: Standard H323 is a heart technology determines compositions, protocol and procedure, to provide to real time multimedia telecommunication service such as talk, image, data through pack switch network which relies on IP protocols. H323 can apply for multi point telecommunication and provide many kinds of service, so, it may be applied for many fields. 4.2.2. H323 elements: Standard H323 includes 4 kinds of fixed elements, when they work together in network they will provide multi media telecommunication service from point to point, and point to multi points. In the terminal, Gateways, Gatekeepers, multi point controller unit (MCU). A Proxy H323 is the fifth composition may in the rate with protocol activity. Figure 9: Structure H323 + Terminal: Using to multi-media telecommunication two-way-real time. The terminal can an individual computer or independent equipment are using H323. All terminal equipment must implement the transmission of sound to fundamental service provided by the terminal H323 being talk telecommunication. All terminal equipment must by provided H245, Q931, RAS, KTP, H245 with capacity to control means flow, H225 (origin from Q931) use to control the signal of call, establishing and deleting a call. RAS is used at the terminal to register/permit/state, to be a protocol used to contact to gatekeeper. RTP / used as a protocol transferring means for bringing talk flow. The compositions not oblige of terminal H323 are video pressed standards T120, conference data protocols and MCU properties. + Gateway. A gateway connects to 2 different networks Gateway H323 provide the connection between a network H323 and a network that not be H323 (for example PSTN). For implementing the connection between two different networks, it need to convert protocol for the establishment and deletion of call, converting information and means through gateway. No need to use gateway to the telecommunication between 2 terminal in H323 network. Gateway includes both hardware and software aiming to implement the duty of code and decode the talk signal and sign to packing talk signal into IP pack, to establish calls through gatekeeper, to treat connections with PSTN network. Main functions of gateway: - Communication PSTN: Provide many different protocols, to meet reference connection of PSTN network. - Communication ID: Provide communications with ID network through partial network and wide network. - Treating talk signal, including function of pressing talk signal under many standards such as G729, G729A, and then to pack signal into ID pack. - Sign: Only use sign R2, SS7 to connect PSTN and IP gateway. - Destroying echo: Provide the function of destroying echo under standard G165 of ITU. + Gatekeeper: Implementing the control and fixing line of call, being a very important part of telephone network ID, it play a role to supervise and control all activities of network. Gatekeeper must have ability to provide almost function of PSTN. In additional it must also have high rank functions on the basis of characteristics of network IP functions. - Converting address: Is ability to move digital of public telephone network and separate network to addresses ID and verso versa. - Managing network: Managing, supervising the state and parameters of network compositions. To allow executive person setting forth adjustments on time. - Controlling the access: No permit machines that no register to use natural sources of system. - Treating the call: Treating the calls between subscribers and gateways such as establishing, connecting, deleting connecting, notifying to move the call. - Data base: Archives information of each subscriber and system configuration... - Mobil describer: To allow describers to connect and use network from any point on the network IP. - Counting fee: From data base to count fee for each subscriber at the same time to provide information on fee and service to customer. + Elements of control and treatment of polypoint MCU. A MCU will provide the capacity to keep multi media dialogue with many components participated in. MCU is the combination 2 basic system components to permit polypoint telecommunication. Multi control (MC) and treating multi point (MP). - MC provides the control of means flow such as dialogue code and establishing sessions of transmitting signal real time, multi-transmitting and feedback, single transmitting-feedback through signal H245 when a connection (terminal or gateway) taking part in dialogue, it must establish a connection H245 with MC. - MD sending and receiving protocol flow (for example: talk form in PTD Parks) arrive and members who take part in the dialogue. MD may convert protocol between different identifications, with ability to combine different protocols (such as mixing sound from many sources). + H323 proxy: To be established to the protocol H323. H323 proxy also act as other normal proxy, it’s often placed at firewall and management as well as display all words called H323 between partial network and Internet Proxy also ensure that only have connect void H323 it will be passed firewall. Proxy operate at layer of application and control package between 2 telecommunication applications. Proxy may determine the aim of call and implement the connection requested. Proxy may manage less with RSVP. Proxy H323 must satisfy requirements of gateway H323 and point out interfaces with the functions that have the presence of gateway. 4.2.3. H323 structure: This structure uses UDP unreliable telecom protocol like audio, video and registering packs. Reliable protocol but later than TCD is used to data and control packs in call signal, protocol T120 uses to conference data. Data Signal and control the call Audio and video Registration Call signal Control under standard H245 RTP/RTCP H225 RAS TCP UDP Layer of ID network Combined data Layer of physic Figure 10: Structure of protocol H323 4.2.6. Signal and control system in H323: H323 provides 3 main protocols on control. Call signal H225/Q931, H325/RAS and control protocol. H225/Q931 is used to sign a call H225/RAS uses to establish the call from place that sends to the host received after the call is established, H245 will be used to read just protocol flow. + H225/RAS implementing functions like registration, to allow service, change the wide degree of frequency band, notifying activity state between terminals and gatekeeper, using protocol of unreliable transfer UDP. In LAN network without gatekeeper, RAS signal channel, not exist RAS signal channel. In LAN network, with gatekeeper, RAS signal channel will be established between a terminal and gatekeeper. + Call signal H225, this channel uses to bring control newscast H225, using to establish the connection between 2 terminals H323. This signal channel is independent to RAS signal channel and H245 control channel. In a system without gatekeeper, call signal channel is established between 2 terminals taking part in the call. And in system with gatekeeper, call signal channel will be established between terminals and gatekeeper or between 2 terminal of each other. The selection of project on establishing signal channel is depend on the decision of gatekeeper. + Control on protocol H245. After establishing the call, system of using H245 protocol control measure, to exchange the capacity, on, off logic channel, requesting on priority regime, controlling flow, ordering and instructing. This protocol is also used to implement the function like to decide masta/slave which aims to avoid the conflict occurred when 2 terminals implement simultaneously the same things but only have a thing permits taking place at a timing date 4.2.5. Establishing the call in H323 Figure 11: Treating the call in H323 1. Connecting end H323 registering with gatekeeper. 2. When the user picking up the receiver and dial need to contact, this requirement will be sent to gatekeeper through RAS newscast. 3. If accepted, the call, the gatekeeper will answer IP address of describer/caller and send information band requested to the call. 4. Starting the call by sending newscast that establishes the call to cable side through newscast H225. 5. Describer/cable receives information with the call come, the terminal H323 (telephone) ring a bell. 6. The two parties discuss owing to the capacity of control channel H245, which aims to ensure the signs transmitted are the signs but the terminal received will have capacity to solve. 7.8. RSVP requirement will be sent to cable, later on RTP is opened between 2 sides, the call is established. In figure 11, two terminals (H.323 end points) need to establish a VoIP call between them, and different gatekeepers control the two terminals. As a first step, the calling terminal requests permission from its gatekeeper to establish the call. This is done with the Admission Request (ARQ) message. The terminal indicates the type of call in question (two-partyor multi-party), the endpoint’s own identifier, a call identifier (a unique string), a call reference value (an integer value also used in call signaling messages for the same call), and information regarding the other party or parties to participate in the call. The information regarding other parties to the call includes one or more aliases and/or signaling addresses. One of the most important mandatory parametes in the ARQ is the bandwirth parameter. This specifies the mount of bandwidth required in units of 100 bps. Note that the endpoint should request the total media stream bandwidth needed, excluding overhead. Thus, if a two-party call is needed, with each party sending voice at 64 Kbps, then the bandwidth rerquired is 128 Kbps, and the valuecarried in the bandwidth parameter is 1280. The purposeof the bandwidth parameter is to enable the gatekeeper to reserve resources for the call. The gate keeper indicates a successful admission by responding to the endpoint with an Admission Confirm(ACF) message. This includes many of the same parameters that are included in the ARQ. The difference is that when a given parameter is used in the ARQ, it is simply a request from the endpoint, whereas a given parameter value in the ACF is a firm order from the gatekeeper. For example, the ACF includes the bandwidth parameter, which may be a lower value than that requested in the ARQ, in which case the endpoint must stay within the bandwidth limitations imposed by the gatekeeper. Another parameter of particular interest in both the ARQ and the ACF is the call Model parameter, which is optional in the ARQ and mandatory in the ACF. In the ARQ call Model indicates whether the endpoint wants to send call signaling directly to the other party, or prefers that call signaling be passed via in the gatekeeper.In the ACF, it represents the gatekeeper’s decision as to whether call signaling is to pass via the gatekeeper or directly between the terminals. In the example of figures 11, the calling gatekeeper has choosen not to be in the path of tha call signaling. The Setup message is the first call signaling message sent from one-terminal to the other to establish the call. The message must contain the Q.931 Protocol Discriminator, a Call Reference Setup, a Bearer Capability , and the User-User information element. Although the Bearer Capability information element is mandatory, the concept of a bearer, as used in the circuit switched world , does not map very well to an IP network. For example, no B-channel exists in IP and the actual agreement between endpoints regarding the bandwidth requirements is done as part of H.245 signaling, where RTP information such as the payload type is exchanged. Consequently, many of the fields in the Bearer Capability information element, as defined in Q.931, are not, used in H.225.0. Of those fiejds that are used in H.225.0, many are used only when the call has originated from outside the H.323 network and has been received at a gateway, where the gateway performs a mapping from the signaling received to the appropriate H.225.0 messages. A nember of parameters are include within the mandatory. User-to-User information element. Those include the call identifier, the call type, a conference identifier, and information about the originating endpoint. Among the optional parameters, we may find a source alias, a destination alias, an H.225.0 address. The User-to-User information element is included in all H.225.0 call signaling messages. It is the inclusion of this information element that enables Q.931 messages, originallydesigned for ISDN, to be adapted for use with H.323. The Call Proceeding message may optionally be sent by the recipient of a Seup message to indicate that the Setup message has been received and that call establishment procedures are underway. When sent, it ususlly precedes the Alerting message, which indicates that the called device is “ringing” Strietly speaking, the Alerting message is optional . In addition to Call Proceeding and Alert, we may also find the optional Progress message(not shown). Ultimately, when the called party answersthe called terminal returns a connect message. Although some of the message from the called party to the calling party, such as Call Proceeding and Alerting, are optional, the connect message must be sent if the call is to be completed. The User-to -User information elementcontains the same set of parameters as defined for the Call Proceeding, Progress, and Alert message , with the addition of the Conference Identifier. These parameters are also used in a Setup message and their use in the Connect message is to correlate this conference with that indicated in a Setup. Any H.245 address sent in a Connect message should match that sent in any earlier. Call Proceeding, Alerting, or Progress message. In fact, the called terminal must include at least an H.245 signaling address to which H.245 message must be sent because H.245 message are used to establish the media (that is voice) flow between the parties. In the example of figure 11, H.245 message exchange begins after the Connect message is returned. This message exchange could. In fact, occur earlier than the Connect message. It is important to note that H.245 is not responsible for carrying the actual media. For example, there is no such thing as an H.245 packet containing asample of coded voice. That is the fob of RTP. Instead, H.245 is a control protocol that message the establishment and release of media sessions. H.245 does this through messaging that enables the establiment of logical channels, where a logical channel is a unidirectional RTP stream from one party to the other. A logical channel is opened by sending an Open Logical Channel (OLC) request message. This message contains a mandatory parameter called forward Logical Channel Parameters, which relates to the media to be sent in the forward drection, that is, from the endpointissuing this command. It contains information such as the type of data to be sent, an RTP session ID, an RTP payload type, and an indication as to whether silince suppression is to be used. If the recipient of the message wants to accept the media to be sent, then it will return an Open Logical Channel Ack message containing the same logical channel number as received in the request and a transport address to which the media stream should be sent. Strictly speaking, a logical channel is unidirectional. Therefore, in order to establish a two-way conversation, two logical channel must be opened-one in each direction. According to the description just presented, this requires four messages, which is rather cumbersome. Consequently, H323 defines a bidirectional logical channel. This is means of establishing two logical channel, one in each direction, in a slightly more efficient manner. Basically, a bidirectional logical channel really means two logical channels that are associated with each other. The establishment of these two channels can be achieved with just three H.245 message rather than four. In order to do so, the initial OLC message not only contains information regarding the media that the calling endpoint wants to send, but it also contains reverse logical channel parameters . These indicate the type of media that the endpoint is willing to receive and to where that media should be sent. Upon receipt of the request, the far endpoint may send an Opne Logical Channel Ack message containing the same logical channel number for the forward logical chanel, a logical channel number for the reverse logical channel, and descriptions related to the media formats that it iswilling to send. These media formats should be chosen from the options originallyreceived in the request, thereby ensuring that the called and will only send media that the calling end supports. Upon receipt of the Open Logical Channel Ack, the originating endppoint responds with an Open Logical Channel Confirm message to indicate that all is well.RTP stream and RTCP message can now flow in each direction 5. The Session Initiation Protocol (SIP) The Session Initiation protocol (SIP) is considered by many to be a powerful alternative to H.323. It is considered to be a more flexible solution, simpler than H.323, easier to implement, better suited to the support of intelligent user devices, and better suited to the implementation of advanced features. Although H.323 may still have a larger installed base than SIP, most people in the VoIP community believe that the future of VoIP revolves around SIP. In fact 3GPP has endorsed SIP as the session management protocol of choice for 3GPP. Release 5 albeit with some enhancements. Like H.323, SIP is simply a signaling protocol and does not earry the voicce packets itself. Rather, it makes use of the services of RTP for the transport of the voice packets (the media stream). 5.1 The SIP Network Architecture SIP defines two basic classes of network entities- clients and servers. Stricetly speaking, a client, also known as a user agent client, is an application program that sends SIP requests. A server is an entity that responds to those requests. Thus, SIP is a client-server protocol. VoIP calls using SIP are originated by a clien t and terminaled at a servers. A client may be found within a user’s device, which could be, for example, a SIP phone. Clients may also be found within the same platfoem as a server. For example, SIP enables the use of proxies, which act as both clients and servers. Four different types of servers are available- proxy servers, redirect servers, user agent srevers, and registrars. Proxy server acts similarly to a proxy server used for Web access from a corporate local area network (LAN). Clients send requests to the proxy, which either handles those requests itself or forwards them on to ether servers, perhaps after performing some translation. To those other servers, it appears as though the message is coming from the proxy rather than some entity hiden behind it. Given that a proxy both receives requests and sends requests, it incorporates both server and client functionality. Figure 12 shows an example of the operation of a proxy servers . It does not take much imagination to realize how this type of functionality can be used for call forwarding/ follow-me services. A redirect server is a srevers that accepts SIP requests, maps the destination address to rezo or more new addresses, returns the translated address to the originator of the request. Thereafter, the originator of the request may send requests to the addresses returned by the direct server. A redirect server does not initiate any SIP requests of its own. Figure 13 shows an example of the operation of a redirect server. This can be another means of providing the call forwarding/ follow-me service that can be provided by a proxy server. This difference is that, in the case of a redirect server, the originating client does the actual forwarding of the call. The redirect server simply provided the information necessary to enable the originating client to do so after which the redirect server is no longer involed Caller@work.com Request Proxy server 1 User@work.com :Å Response 4 5: 2 Request Request User@hone.net 3 :Å User@home.net Figure: 12 SIP Proxy Server Rerquest Caller@work.com 1 User@work.com Redirect Server Moved temporaily :Å Contact:User@home.net 5: 2 4 3 ACK Request User@home.net Response 5 :Å User@home.net Figure 13 SIP Redirect Serve A user agent server accepts SIP requests and contacts the user. A response from the user to the user agent server results in a SIP response on behalf of the user, In reality, a SIP device, such as a SIP enable phone, will function as both a user agent client and a user agent server. Acting as a user agent client, it is able to initiate SIP requests. Acting as a user agent server, it can receive and respond to SIP requests. In practical terms, this means that it is able to initiate calls and receive calls. This enables SIP, a client server protocol, to be used for peer-to-peer communication. A registrar is a server that accepts SIP REGISTER requests. SIP includes the concept of user registration, whereby a user signals to the network that it is available at a particular address. Such registration is performed by the issuance of a REGISTER request from the user to the registrar. Typically, a registrar will be combined with a proxy or redirect server. Registration in SIP serves a similar purpose to location updating in a GMS network, it is a means by which a user can signal to the network that he or she is available at a particular location. Given that practical implementations involve the combination of a user agent client and a usert agent server and the combining of registrars with either prox servers or redirection servers, a real network may well involve only user agents and the redirection or proxy servers. 5.2 SIP Call Establishment At a high level, SIP call establishment is very simple, as shown in figure 14. The process starts with a SIP INVITE message, which is used from the calling party to the called party. The message invites the called party to participate in a session- a call. Included with the INVITE message is a session description- a description of the media that the calling party wants to use. This description includes the voice-coding scheme that the caller wants to use, plus an IP address and a port number that the called party should use for sending media back to the caller. A number of interim responses to the INTIVE may be sent, perior to the called party accepting the call. For example, the caller might be informed that the call is queued and/or that the called party is being alerted; that is,the phone is ringing. Subsequently, the called party anwers the calls, which generetes an OK response back to the caller. The OK response is actually indicated by the status code value of 200 in the response. In the example of figure 14, the 200 (OK) response contains a session description, indicating the media that the caller wants to use plus an IP address and port number to which the caller should send packets. :Å :Å INVITE (session description) Ringing OK (session description) ACK Conversation BYE OK Figure 14 SIP Basic call Establishment and Release Upon receipt of the 200(OK) response, the caller response with ACK to confirm that the OK response has been received. At this point, media are exchanged. These media will most often be coded speech, but couldalso be other media such as video. Finally, one of the parties hangs up, which causes a BYE message to be sent. The party receiving the BYE message sends 200 (OK) to confirm receipt of the message. At that point the call is over. All in all, SIP call establishment is quite a simple process. Of course, the signaling could well pass via one or more proxy server, in which case the process becomes some what more complex. Nonetheless, it is clear that SIP call establishment is much simpler than the equivalent H.323 protocol . 5.3 Information in SIP Messagees Obviosly, there is more to SIP signaling than the message outlined in figure 14. To start with, each SIP request or response contains addresses for the calling and called parties. Each such address is known as a SIP uniform resource locator (URL) and has the format”SIP user@domain”. This is somewhat similar to an e-mail URL, whichhas the format mailto: user@domain . A SIP user might well want to have the same values for user and domain in his or her SIP and e-mail addresses, which would make it very easy to know how to contact a sip user-much easies than having to remember a telephone number. Several requests and many responses can be sent between SIP entities.For example, if in the examole of figure 14 the called user were not available, then the response “Temporarlty Unavailable” (status code 480) could have been returned, rather than the 200 (OK). Not only are there several requests and many responses, many information elements can be contained in those requests and responses. In SIP, these information elements are known as geader fields. For example, when sending an INVITE, the message contains not only a session description and the to and from addresses (contained in the to and from header fields),but it can also contain a Subject header field. This field indicates the reason for the casll and can be presented to the called user, who may choose to accept or reject the call based on the subfect in question. One can easily imagine this capability being used to filter out unwanted telemarketing calls. Other header fields include, for example, Call ID, Date,Timestamp, Inreply-to, Retry-after, and Priority. The Retry- after header could be used, for example, with the 48(Temporarily unavailable) response to indicate when the caller should try the call again(if ever). One of the most importantheader fields is Content-type, which indicates the type of additional information included in the message. For example, when a user issues an INVITE message, the message includes a session description. The Content-type field indicates how that session description is coded so that the receiver of the message can understand whether or not that type of session can be supported. 5.4 The Resource Reservation Protocol Resource reservation techniques for IP networks are specified in RFC 2205, the Resource Reservation Protocol (RSVP), which is part of the IETF integreted services suite. It is a protocol that enables resources to be reservred for a given session or session prior to any attempt to exchange media between the participants. Of the solutions available, it is the most complex but is also the solution that comes closest to curcuit emulation within the IP network. It provides strong QoS guarantees, a significant granularity of resource allocation, and sigificant feedback to applications and users. RSVP currently offers two levels of service. The first is guaranteed which comes as close as possible to circuit emulation. The second is controlled load, which is equivalent to the service that would be provided in a best-effort network under no-load conditions. Basically, RSVP works as depicted in Figure 15 . A sender first issues a PATH message to the far end via a number of routers. The PATH message contains a traffic specification (TSpec), which provides details of the data that the sender expects to send, in terms of the bandwidth requirement and packet size. Each RSVP enabled router along the way establishes a “path state” that includes the previous source address of the PATH message (that is, the next hop back towards the sendre). The reiceiver of the PATH message responds with a reservation requests (RESV) that includes a flowspec. The flowspec includes a Tspec and information about the type of reservation service requested, such as controlled-load service or guaranteed service. The RESV message travels back to the sender along the same route that the PATH message took (in reverse).At eachrouter, the requested resources are allocated, assuming that they are available and that the receiver has the authority to make the request.Finally, the RESV message reaches the sendre with a confirmation that resources have been reserved. One interesting point about RSVP is that reservations are made by the receiver, not by the sender of data. This is done in order to accommodate multicast transports, wherethere may be large numbers of receivers and only one sender. Note that RSVP is a control protocol that does not carry user data. The user data (e.g. voice) is transported later using RTP. This occurs only after the reservation procedures have been performed. The The reservations that RSVP makes are soft, which meansthat they needto be refreshed on a regular basis by the receivers. Figure 15: Resource Reservation 5.5. Observation: - H323 is system that includes many components like gatekeeper, gateway, MCU terminals suitable with real time and multi telecom network. H323 has shortcoming such as: time for establishing the call is long, each gatekeeper needs a lot of functions. For solving some issues of H323 SIP is formed. Chapter 2 : Voice Communication In the previous chapter the Internet Protocol was explained. This was done in a general way, without paying much attention to Voice over IP. Since we now know the most important features of the protocol, we can bring other components of VoIP in to the picture. In this chapter we will take a closer look at some aspects of digitised voice communication. The chapter starts with a discussion about grabbing and reconstruction of voice signals. Next, the requirements for a reasonably good form of voice communication are given. We will then take a close look at communication patterns and finally we will see what the impact of all these things is on VoIP. 2.1) Grabbing and Reconstruction Before you can send voice information over a packet network, you must first digitise the voice signal. After the transmission, the receiver of this digitised signal has to convert it back to an analogue signal, which can be used to generate speaker output. The first stage is also called ‘grabbing’ of the voice signal and the second stage is called ‘reconstruction’. In general, these stages are also referred to as analogue-to- digital (A/D) conversion, respectively. As for terminology, it is useful to know that digitising an audio signal is often referred to as pulse code modulation (PCM). Nowadays, digitisation and reconstruction of voice signals can be done by any PC soundcard, so this is not the most difficult step in creating VoIP applications. For completeness, however, Iwill give a brief description of the processes. Amplitude Time Sampling Amplitude Time Quantisation Value Time Figure 3.1 Sampling and quantisation 2.1.1) Sampling and quantisation A continuous signal (voice signal for example) on a certain time interval has an infinite number of value with infinite precision. To be able to digitally store an approximation of the signal, it is first sampled and then quantised. When you saple a signal , you take infinite precision measures at regular intervals. The rate at which the samples are taken is called the sampling rate. The next step is to quantise the sampled signal.This means that the infinite precision values are converted to values which can be stored digitally. In general, the porpuse of quantisation is to represent a sample by an N-bit value. With uniform quantisation, the range of possible values is divided into 2N equally sized segments and with each segment, an N-bit value is associated. The width of such a segment is known as the step size. This representation results in clipping if the sampled value exceeds the range convered by the segments. With non-uniform quantisation, this step size is not constant. A common case of non-uniform quantisation is logarithmic quantisation. Here, it is not the original input value that is quantised, but infact the log value of the sample. For audio signals this is particularly useful since humans tend to be more sensitive to changes at lower amplitudes than at high ones. Another non-uniform quantisation method is adaptive quantisation. With such methods the quantisation step size is dynamically adapted in response to changes in the signal amplitude. PCM technique which use adaptive quantisation are referred to as adaptive PCM (APCM). The sampling and (uniform) quantisation steps are depicted in figure 3.1. An important thing to note is that both steps introduce a certain amount of error. It is clear that a higher sampling rate and a smaller quantisation step size will reduce the amount of error in the digitized signal. 2.1.2) Reconstruction Signal reconstruction does the opposite of the digitization step. An inverse quantisation is applied and from those samples a continuous signal is recreated. How much the reconstructed signal resemples the original signal depends on the sampling rate, the quantisation method and the reconstruction olgorithm used. The theory of signal reconstruction is quite extensive and goes beyond the scope of this thesis. A good introduction can be found in. 2.1.3) Mixing audio signals When using VoIP in virtual environments, these is another thing that we must take into account. Each participant will send its own digitised voice signal which will be received by a number of other participants. If two or more persons are talking at the same time, their signals will have to be mixed somehow. Luckily this is very simple: physics teaches us that for sound waves, the principle of superposition applies. This principle states that when two waves overlap, the amplitude of the combined wave at a specific time can be obtained simply by adding the amplitudes of the two individual waves at that time. Practically speaking this means that we merely have to take the sum of the digitized. 2.2) Communication requirements Nowadays everybody is used to telephone quality voice which typically has very few noticeable errors and low delay. Also, when using the telephone system there is no such thing as variation in delay. With packetised voice however , each packet will typically arrive with a slightly different amount of delay, resulting in jitter. These is also no guarantee about delay caused by the network and in general, some packets will contain errors on arrival or will not even arrive at all. In this section, we wll see what the requirements are for decent voice communication. With decent communication a form of conversation is meant which does not cause irritation with the participants. 2.2.1) Error tolerance In contrats to data communication, where even the smallest errors can cause nasty results, voice communication is much more tolerant to the presence of errors. An occasional error will not seriously disturb the conversation as long as the error does not affect a relatively large portion of the signal. 2.2.2) Delay requirements When you are using data communication, it does not really matter how much delay there is between the sending of a packet and its arrival. With voice communication however, the overall delay is extremely important.The time that passes between one person saying something and another person hearing what was said, should be as low as possible. Studies show that when the delay exceeds 800 ms, a normal telephone conversation becomes very hard to do. They also show that a delay of 200 to 800 ms is tolerable for short portions of the conmunication. However, in general a delay below 200 ms has got to be attained to hold a pleasant conversation. 2.2.3) Tolerance for jitter If each block containing a part of a digitised voice signal would be played immediately on arrival, the quality of the communication would be rather low. Since each block typically arrived with a slightly different delay, sometimes a block would be played before the previous one was finished and sometimes there would be a small gap between the end of one block and the next. Since this jitter is not something that occurs for short periods, but continuously, this will be very annoying to the participants of the conversation. 2.3) Communication patterns In a conversation between two persons, it is very unlikely that both are always talking at the same time. Usually , when one person is speaking, the other one listens, possibly giving short affirmation. The same principle applies when a group of people is hoding a discussion: when one person is talking, the other ones listen. It is because of this pattern that a normal telephone call wastes a large amount of bandwidth. When someone is not speaking, the bandwidth stays assigned without being used. With packetised voice this bandwidth could be used by other calls or applications. Several speech models are presented. Such models could be used to predict arrival patterns of packets containing voice data. These predictions in turn could be used to create a network design with a more effective utilization of resources. Although these models are obviously important, I feel that they are beyond the scope of this document. If you are interested in these matters, you should refer. 2.4) Impact on VoIP We have just seen some aspects of voice communication. In this section the importance of these aspects for VoIP is described. 2.4.1) Sampling rate and quantisation At the start of the chapter we saw what sampling and quantisation is. It was also mentioned that a higher sampling rate and a smaller quantisation step implied a better representation of the original signal. But this also means that more digitized information will have to be transmitted and more bandwidth is required. So we have to determine how much information is necessary to hold a telephone quality conversation. The Nyquist theorem is imfortant in this matter. It states that the minimum sampling frequency should be twice the maximum frequency of the analogue signal. This is in fact quite logical: to be able to capture N cycles, you have to take measures at least 2N points along the signal. Otherwise it would be impossible to capture the maxima and minima of the signal. The speech signals that human produce can contain frequencies of even beyond 12 kHz. However, in the telephone system, only frequencies below 4000 Hz are transmitted and this still allows high-quality communication. Using this information together with the Nyquist theorem suggests that a sampling rate of 8000 Hz is adequate for the digitization of speech. To cover the range of amplitude that a voice signal cam produce, at least twelve bits are nedded when a uniform quantisation scheme is used. However,a uniform scheme which reduce each sample into an eight bit value is ususlly good enough to attain telephone quality conversation. As for logarithmic quantisation, there are two schemes that are also worth mentioning at this point. In the United States and Japan, m-law encoding is the standard for transmission over network. It reduces a thirteen bit uniformly quantised signal into an eight bit value. In Europe, A-law is used. This schemes does the same but stsrts with a twelve bit uniformly quantised value. From this information we can calculate the required bandwidth for a telephone quality conversation. Above was explained that we needed a sampling rate of 8000 Hz and that an eight bit value is usually used to store a sample. So we wll be transmitting 8000 Hz eight bit values each second. This requires a bandwidth of at least 64000bps or 64kbps. 2.4.2) Packet length With voive over IP. packets can get corrupted or even lost. To reduce the amount of lost information, a packet should contain only a very small amount of the voice signal. This way, if a packet gets lost, only a tiny fraction of the conversation will be missing, which is very unlikely to disturb the conversation. It is important to note that this argument is made from the point of view of the conversation. We will see later on that from the transmission’s point of view, an argument can be made in favour of larger packets. Somehow, a compromise wil have to be made. 2.4.3) Buffering In a previous section the negative effects of jitter were explained. A simple technique to avoid jitter in the playback of a voice signal, is to introduce an amount of buffering, as figure 3.2 illustrates. Arrival time Playback time Time Figure 3.2: Buffering to voice jitter Instead of playing in the voice data of an incoming packet as soon as the packet arrives, a small amount of delay is introduced. Because this is done for all packets, there is a higher probability that when one packet has been played, the next one is immediately available. Inpractice, normally only a small amount of buffering is needed. In the applications I developed, I have used jitter calculations to determine the amount of buffering needed. The amount of jitter is usually not very high and accordingly only a small amount of buffering is done. This method appears to have good results. 2.4.4) Delay A large delay is disastrous for a conversation. The total delay can be categoriesd into two types. The first type is fixed delay. This is the total delay which is always present due to buffering, link capacity etc. The second type is variable delay. This is the delay component which is caused by packet queuing in routers, congestions etc. The components shown in figure 3.3 determine the amount of fixed delay for a VoIP system in virtual environments. For ‘nomal’ VoIP, the 3D processing component can simply be left out. Sampling delay Compression delay Transmission delay Decompression delay 3D processing delay Buffering delay Figure 3.3 Types of delay The sampling delay is the delay introduced by the sampling of the voice signal. For example, if the sampling interval is one second, the total delay will be at least one second long since the digitised voice signal cannot be processed before the data is collected. This means that from the point of view of the delay, the sampling interval should be kept as small as possible. Again, from the point of view of the transmission, an argument will be made in favour of larger sampling intervals. The compression and decompression delays are introduced by compression and decompression algorithms respectively. The transmission delay is the delay which is present due to link capacities. The 3D processing delay is the delay caused by the algorithms which generate the three dimensional sound for use with virtual environments. Finally, the buffering delay is the delay which is artificially introduced to compensate for jitter. This delay could be set manually or determined automatically, like it is done in my own VoIP application. 2.4.5) Silence suppression We saw earlies that in a conversation, there is usually one person speaking at a time. In packetised voice, this gives us the opportunity to save bandwidth because packets containing only silence do not need to be sent. However, before we can discard packets, we must first be able to determine whether they contain silence or not. One way this could be done is by calculating the amount of energy of the voice signal in a packet. Packets which do not contain a sufficient amount of energy are assumed to hold only silence and can be discarded. A simpler technique which I have used is to check a packet for samples with a value above a certain threshold. If no such samples exists, the packet is considered to hold silence and can be discarded. This method has proven to be simple and effective. Silence technique doeshave a minor side effect. Because the ‘silence’ packets are discarded there is absolutely no sound at all at the receiving side, not even background noise. This is truly a deadly silence and it might even seem that the connection has gone. A solution is to artificially introduce some background noise at the receiver side. 2.5) Summary Several aspects of voice communication have an important meaning for Voice over IP. To make VoIP possible, we must be able to digitize and reconstruct voice information. A sampling rate of 8000 Hz, using eight bit samples is sufficient to provife telephone quality communication and need a bandwidth of 64 kbps. Humans tend to be very tolerant to corrupted or lost voice packets. However, they are far less tolerant to delay and jitter. Jitter should be avoided through the use of buffering as it is disastrous for the quality of the communication. Delay should be kept below 200ms to maintain a telephone quality conversation. From the point of view of the commuication, small packet are to be preferred since this way, a lost or corrupted packet causes a small interruption in the communication. From the delay’s point of view, a small sampling interval is important since that interval directly contributes to the overall delay. Finally, in practice there is usually only one person talking at the same time in a discussion. This means that a lot of bandwidth can be saved by not sending any packets containing only silence. This is called silence suppression. Chapter 3 : Phone Service 1 . Quick Concept: 1.1.How traditional long distance works: You pick up your phone and dial a long distance phone number, the call goes through your local telephone company to your long distance provider who charges you a connection fee and per minute charge, billed monthly in your long distance phone bill. 1.2 How long distance works with VoIP: You pick up your phone and dial a long distance phone number, the call goes through your local telephone company to a VoIP provider, this is a local call. The call then goes over the Internet to the receiver's local calling area were a local call is placed (by the VoIP provider) to complete the connection. You have just circumvented your long distance company and eliminated your long distance phone bill! This "quick concept" is based on phone-to-phone VoIP services 2. Overview: The possibility of voice communications traveling over the Internet, rather than the PSTN, first became a reality in February 1995 when Vocaltec, Inc. introduced its Internet Phone software. Designed to run on a 486/33-MHz (or higher) personal computer (PC) equipped with a sound card, speakers, microphone, and modem, the software compressed the voice signal and translated it into IP packets for transmission over the Internet. This PC-to-PC Internet telephony worked, however, only if both parties were using Internet Phone software. In the relatively short period of time since then, Internet telephony has advanced rapidly. Many software developers now offer PC telephony software but, more importantly, gateway servers are emerging to act as an interface between the Internet and the PSTN. Equipped with voice-processing cards, these gateway servers enable users to communicate via standard telephones over great distances without going over the "Long Distance" telephone network. A call goes over the local PSTN to the nearest gateway server, which digitizes the analog voice signal, compresses it into IP packets, and moves it onto the Internet for transport to a gateway server at the receiving end. This server converts the digital IP signal back to analog and completes the call locally. With its support for computer-to-telephone calls, telephone-to-computer calls and telephone-to-telephone calls, VoIP represents a significant step toward the integration of voice and data networks. Originally regarded as a novelty, Internet telephony is attracting more and more users because it offers tremendous cost savings relative to the PSTN. Users can bypass long-distance carriers and their per-minute usage rates and run their voice traffic over the Internet for a flat monthly Internet-access fee. VoIP provides a competitive threat to the providers of traditional telephone services that, at the very least, will stimulate improvements in cost and function throughout the industry. VoIP could be applied to almost any voice communications requirement, ranging from a simple inter-office intercom to complex multi-point teleconferencing/shared screen environments. Widespread deployment of a new technology seldom occurs without a clear and sustainable justification, and this is also the case with VoIP. Demonstrable benefits to end-users are also needed if VoIP products (and services) are to be a long-term success. Generally, the benefits of technology can be divided into the following four categories: *Cost Reduction. Reducing long distance telephone costs is always a popular topic and provides a good reason for introducing VoIP. Today flat rate long distance pricing is available with the Internet and can result in considerable savings for both voice and facsimile (at least currently). The sharing of equipment and operations costs across both data and voice users can also improve network efficiency since excess bandwidth on one network can be used by the other, thereby creating economies of scale for voice (especially given the rapid growth in data traffic). *Simplification. An integrated infrastructure that supports all forms of communication allows more standardization and reduces the total equipment complement. This combined infrastructure can support dynamic bandwidth optimization and a fault tolerant design. The differences between the traffic patterns of voice and data offer further opportunities for significant efficiency improvements. *Consolidation. Since people are the most significant cost elements in a network, any opportunity to combine operations, to eliminate points of failure, and to consolidate accounting systems would be beneficial. In the enterprise, SNMP-based management can be provided for both voice and data services using VoIP. Universal use of the IP protocols for all applications holds out the promise of both reduced complexity and more flexibility. Related facilities such as directory services and security services may be more easily shared. *Advanced Applications. Even though basic telephony and facsimile are the initial applications for VoIP, the longer term benefits are expected to be derived from multimedia and multiservice applications. For example, Internet commerce solutions can combine WWW access to information with a voice call button that allows immediate access to a call center agent from the PC. Needless to say, voice is an integral part of conferencing systems that may also include shared screens, whiteboarding, etc. Combining voice and data features into new applications will provide the greatest returns over the longer term. Although the use of voice over packet networks is relatively limited at present, there is considerable user interest and trials are beginning. End user demand is expected to grow rapidly over the next five years. Frost & Sullivan and other research firms have estimated that the compound annual growth rate for IP-enabled telephone equipment will be 132% over the period from 1997 to 2002 (from $47.3M in 1997 to $3.16B by 2002). It is expected that VoIP will be deployed by 70% of the Fortune 1000 companies by the year 2002. Industry analysts have also estimated that the annual revenues for the IP fax gateway market will increase from less than $20M in 1996 to over $100M by the year 2002. It is clear that a market has already been established and there exists a window of opportunity for developers to bring their products to market, and for consumers to realize significant savings. Chapter 4: Compression techniques In the previous chapter we learned that for oneway voice communication, a bandwidth of 64 kbps is sufficient. For a LAN it is not a problem to achieve this rate, but for dialup links at this time that rate is not possible. Even a LAN may get quite heavily loaded when VoIP IS used in virtual environments, since there could be incoming packets from a large amount of senders at the same time. If we are considering a WAN, it is also not always possible to attain that rate since one slower link is enough to prevent it. Clearly there is a need for compression and luckily voice information offers the possibility of large compression ratios. In this chapter we will take a look at several compression techniques and explain their importance for VoIP. We will start with some general methods and then we will take a look at some waveform coding and vocoding algorithms. The chapter ends with I discussion about some compression standards for Voice over IP. 4.1 Preliminaries We will see in the next chapter that with VoIP usually unreliable protocols are used. It was already mentioned that Voice over IP can tolerate corrupted or lost packets very well, so an unreliable protocol normally does not cause a bad communication quality. Furthermore, reliable protocols rely on the retransmission of packets and these retransmissions add to the overall delay. An important consequence of the use of unreliable protocols is that compression techniques can only rely on the data in the packet that is to be compressed. Compression algorithms which need information from previous packets cannot be used since It is possible that one of those previous packets did not reach the destination. This would either make decompression impossible or would reconstruct an invalid packet. One could argue that because of the tolerability of voice Communication to errors, this is not a problem. However, with such methods it would mean that one lost or corrupted packet can create several lost packets: all those which relied on the lost packet for compression. So unless the transmission path is highly reliable it is, probably better to avoid such compression schemes. The quality of voice compression is usually measured in terms of Mean Opinion Score (MOS). This is a value between one and five which expresses how close the voice quality is to reallife communication. 4.2 General compression techniques In this section 1 will discuss some widely used compression techniques: LempelZiv compression and Huffman coding. These are both lossless compression techniques which means that when data is decompressed, the original data will be restored, without any modifications. This implies that these techniques can be used for both data in general and voice information. When these methods are directly applied to voice data they do not offer very good compression ratios and for this reason compression is almost never done this way. However, the algorithms can be used as a postprocessing step for other compression methods to further enhance the compression ratio, so it is useful to explain them. Note that several other lossless compression techniques exist. The reason that I will discuss LempelZiv and Huffman compression, is that I have used these schemes in the applications I developed. 4.2.1 LempelZiv compression There are several LempelZiv (LZ) compression algorithms, but they all work more or less according to the same principles. The algorithms in the LZ family all try to substitute a series of characters by a fixed length code. Two important members of this family are LZ77 and LZ78. An overview of these and other members of the LZ family can be found . Since I have used the LZ78 algorithm myself, this is the one I will explain. It gives a good idea about the way the LZ algorithms work. The LZ78 algorithm makes use of a 'dictionary'. This is a data structure which can hold a number of strings and their length. This dictionary is built both when coding and when decoding. At the start of the algorithm, the dictionary is empty. The compression algorithm will output doubles with 'i' being. an index into the dictionary and 'c' being the next character. At the current position in the data which has to be compressed, the algorithm searches through the dictionary for a match. Suppose a match with length L is found. The current position is then incremented by L. Next, the algorithm outputs a double with 'i' being the index of the found entry and 'c' being the character at the current position. Also, an entry is added to the dictionary. This entry is the concatenation of the found string and the current character. Then the Current position is incremented by one and the algorithm again starts searching in the dictionary. The routine is repeated until there is no more data to compress'. If no match is found when searching through the dictionary, the algorithm outputs a double . The zero indicates that there was no match and 'c' is the character at the current position. The entry, which is added to the dictionary contains only the Current character. The current position is then incremented b one and the algorithm starts searching the dictionary again. The decompression algorithm reads doubles . If the index 'I' is zero, the character 'c' is added to the decompression output and an entry containing 'c' is added to the dictionary. If 'i' is not zero, the concatenation of the dictionary entry at position 'I' and the character 'c' is made. This new string is added to both the decompression output and the dictionary. 4.2.2 Huffman coding For a given set of possible values and the frequency with which each value occurs, the Huffman algorithm determines a way to encode each value binary. More important, it does this in such a way that an optimal encoding is created. In this section, I will only present the algorithm itself. Proof that it indeed constructs an optimal encoding can be found in which is also the source of the information in this section. The Huffman algorithm produces a binary string for each value that is to be encoded and these strings can have an arbitrary length. However, the decoding process has to know when a certain binary string has to be replaced by the appropriate value. To be able to do this, the strings must have the following property: none of the binary strings can be a prefix to another string. Binary strings with this prefix property can be represented by a binary tree in which the branches themselves contain the labels zero and one. The strings which are created by traversing the tree from the root to the leafs are all strings with the prefix property. The Huffman algorithm constructs such a tree in which the leafs are marked with the values that need to be encoded. To find out by which binary code a value has to be replaced, you only need to follow the path from the root to the leaf containing that value. The decompression routine is also easy. The algorithm sets the current position at the root node and starts reading bits. For each bit the ap

Các file đính kèm theo tài liệu này:

  • doc40687.DOC
Tài liệu liên quan