Docsity

Voice over Internet Protocol-Implementation and Applications In Computer Sciences-Project Report, Study Guides, Projects, Research of Applications of Computer Sciences

Toggle sidebar
bg1
1
Chapter 1
Introduction
VOIP stands for Voice over IP or Voice over Internet Protocol and consists of a
number of processes that interconnect and then convert a traditional voice, video
and data signal into a stream of packets that are distributed over a packet network
and then back through RTP.
Voice over IP (VoIP) technology is gaining ground in key service industries as a
cost-effective means of provisioning additional, enhanced services instead of
traditional circuit-switched technology. The convergence of voice, video, fax, and
data has revolutionized the world of telecommunication. VoIP has been proven to
drastically reduce long-distance costs and continues to provide unprecedented
opportunities for service providers, resellers, developers, and end users alike.
PC to PC connectivity
PC to Phone call
IP based H.323/SIP Terminals
VOIP uses RTP (Real Time Protocol) as means of delivering voice, video and
data traffic. VOIP is packet networks like internet, it occasionally loses and
reorders packets and delays them by variable amounts of time. To cope with these
impairments, the RTP header contains timing information and a sequence number
that allow the receivers to reconstruct the timing produced by the source.
Compressing the RTP header will provide an efficient control and bandwidth
utilization and greater data traffic to be generated.
The true scope of VoIP is that it starts getting used as a platform for supporting a
virtual contact center. This will enable the distribution of the contact handling to
anywhere in the organization; thereby ensuring that the right person with the right
skill set handles the calls.
Real time communication is increasingly becoming popular due to its low cost and
performance. There has been growing interest in using RTP as one step to achieve
docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c

Partial preview of the text

Download Voice over Internet Protocol-Implementation and Applications In Computer Sciences-Project Report and more Study Guides, Projects, Research Applications of Computer Sciences in PDF only on Docsity!

Chapter 1

Introduction

VOIP stands for Voice over IP or Voice over Internet Protocol and consists of a number of processes that interconnect and then convert a traditional voice, video and data signal into a stream of packets that are distributed over a packet network and then back through RTP. Voice over IP (VoIP) technology is gaining ground in key service industries as a cost-effective means of provisioning additional, enhanced services instead of traditional circuit-switched technology. The convergence of voice, video, fax, and data has revolutionized the world of telecommunication. VoIP has been proven to drastically reduce long-distance costs and continues to provide unprecedented opportunities for service providers, resellers, developers, and end users alike.  PC to PC connectivity  PC to Phone call  IP based H.323/SIP Terminals VOIP uses RTP (Real Time Protocol) as means of delivering voice, video and data traffic. VOIP is packet networks like internet, it occasionally loses and reorders packets and delays them by variable amounts of time. To cope with these impairments, the RTP header contains timing information and a sequence number that allow the receivers to reconstruct the timing produced by the source. Compressing the RTP header will provide an efficient control and bandwidth utilization and greater data traffic to be generated. The true scope of VoIP is that it starts getting used as a platform for supporting a virtual contact center. This will enable the distribution of the contact handling to anywhere in the organization; thereby ensuring that the right person with the right skill set handles the calls. Real time communication is increasingly becoming popular due to its low cost and performance. There has been growing interest in using RTP as one step to achieve

interoperability among different implementations of network audio/video applications. However, there is also concern that the12-byte RTP header is too large an overhead for 20-byte payloads. This document describes a method for compressing the headers of IP/UDP/RTP datagram to reduce overhead.

1.1 Historical Perspective

The Internet has been used primarily for the reliable data transmission with minimal or no delay constraints. The TCP/IP protocols were designed for this type of traffic and work very well in this context. However, multimedia traffic, which constitutes of a significant portion of potential multicast traffic, possesses different characteristics and hence requires the use of different protocols to provide the necessary services. For example, if a receiver has to wait for a TCP retransmission, there can be a noticeable and unacceptable delay in play-out of the real-time data, whether audio, video, or something else. In addition, the "slow start" TCP congestion-control mechanism can interfere with the audio and video "natural" play-out rate. Since there is no fixed path for datagrams to flow across the Internet, there is no mechanism to make sure that the bandwidth needed for multimedia is available between the sender and receiver(s), so quality of service cannot be guaranteed. Additionally, TCP doesn't provide timing information, a critical requirement for multimedia support. Multimedia applications usually do not need the complexity of TCP and, instead, use a simpler transport framework. Most playback algorithms can tolerate missing data way better than long delays caused by retransmission. They don't require guaranteed in-sequence delivery either. Certain protocols have been developed to enhance the Internet and improve support of applications like audio, video and interactive multimedia conferencing. The main protocols are the Real-time Transport protocol (RTP), Real-time Control Protocol (RTCP), Resource Reservation Protocol (RSVP) and Real-Time Streaming Protocol (RTSP) protocols. These real-time oriented protocols are designed to be used in both multicast and unicast network services. Since many real-time applications can save network and server resources by using IP multicast, the special requirements and characteristics

  1. Compression of voice signal using LPC-10 which is being used in RTP communication.
  2. A simple implementation of RTP without compression. This was the basic phase of the project as it would not have been possible to do compression on RTP.
  3. Compressing the implemented RTP and measuring the difference of time for uncompressed and compressed header. Hence, the end product turned out as a parameterized code for the implementation of RTP and compressed RTP header which can later be further used to implement VoIP.

1.3 Basic Configuration and Functional Layout

The configuration of the project can be explained in Figure 1-2.

Figure 1-2: RTP Encapsulation

First of all a calling session is established, the audio or video input needs to be sampled and converted to a digital format. Next, the sampled data is encapsulated into RTP packets. Then, the RTP packet is encapsulated into a network transport protocol, which is most often the UDP. Alternatively, the TCP can be used for encapsulation. Throughout the transmission of the RTP packets, the RTCP is used to monitor the quality of an RTP session. Next, the network transport protocol, UDP or TCP, is encapsulated into an IP packet, which is then encapsulated into the link layer protocol. The link layer packet is then transmitted to the destination computer. Figure 1-2 shows the encapsulation process, from the encapsulation of the RTP packet to encapsulation of the link layer packet [2].

1.3.1 Functional Requirements

Voice Quality Voice is real time and requires real time handling from the network. If the bandwidth is utilized by the header then a very small packet of video or voice data can be transferred at a time. While compressing the header, the quality of voice shouldn‟t be compromised. Video Quality Since the video is another real time data so same is true for it as mentioned in voice quality. This will increase the quality of video conferencing in which both voice and video are being transferred at the same time. Improving Latency One of the basic requirements of RTP header compression is to minimize the time of data being transferred. Latency is basically the amount of time between when someone speaks and when the listener hears. This header compression would definitely make it possible to utilize lesser bandwidth which would in turn reduce the time delay and deliver data in real time. Secure Data Transfer The data being transferred is in the form of text, voice, and video. For the reliable and secure delivery of any type of real time data the communication should guarantee secure transmission by encrypting it. Minimum Bandwidth Utilization RTP header compression provides improved system performance by reducing network overhead and speeding transmission of RTP packets. Enabling compression on both ends of a low-bandwidth serial link can greatly reduce the network overhead if there is a lot of RTP traffic on that slow link.

1.4 Thesis synopsis

The author of this thesis has attempted to organize this manuscript in a manner so that the readers of this document can be furnished with all the obligatory information that is indispensable for getting a deeper insight into the effort done under the title of this research. The formulation of this documentation comprises of three chapters besides the preliminary chapter 1 giving an overview of the thesis research work.

Chapter 2

Voice over IP

This document is based on RTP header compression. Moving to the header compression it‟s important to have some basic knowledge of voice over IP and real time transfer protocol used for real time communications such as voice and video.

2.1 Voice over IP (VoIP)

VoIP (voice over IP) that is, voice delivered using the Internet Protocol is a term used in IP telephony for a set of facilities for managing the delivery of voice information using the Internet Protocol (IP). In general, this means sending voice information in digital form in discrete packets. Most data traveling over the Internet uses the Transmission Control Protocol (TCP) for the transport layer because it guarantees data delivery and integrity. VoIP does not need the kind of delivery guarantee which TCP provides, so most VoIP transmissions use the faster User Datagram Protocol (UDP) as the transport layer. VoIP data packets live in RTP (Real-Time Transport Protocol) packets which are inside UDP-IP packets as shown in Figure 2-1. UDP has no control over the order in which packets arrive at the destination or how long it takes them to get there (datagram concept). Both of these are very important to overall voice quality I-e, how well you can understand what the other person is saying and conversation quality I-e, how easy it is to carry out a conversation. RTP solves the problem enabling the receiver to put the packets back into the correct order and not wait too long for packets that have either lost their way or are taking too long to arrive (we don't need every single voice packet, but we need a continuous flow of many of them and ordered).

Figure 2-1: VoIP Packet Structure

2.2 Brief History

Voice communication has traditionally been carried over dedicated Telephone networks. Essentially, these networks have been designed differently in terms of their underlying architecture and communication protocols. Internet protocols became the preferred protocol for delivering communication payload for all types of networks, mainly for their open and widely accepted interface implementations. The activities of developing and implementing new IP-based protocol definitions for multimedia communications; their underlying network architecture and also integration with existing networks are collectively termed as Voice over IP.

2.3 VoIP Parameter

As the IP network was primarily designed to carry data, it does not provide real- time guarantees but only provides best effort service, which is inadequate for voice communication. The major issues governing transfer of a voice stream over the Internet or using Internet protocols are listed below.

2.3.1 Bandwidth

In the analog world, the voice transmission frequency spectrum requirement is 0- 3.4 KHz in the base band, and is nominally called a 4 KHz voice channel for convenience. For digital telecommunication, the signal is sampled at twice the rate. The minimum-sampling rate required is thus 8 KHz. If each sample contains 8 bits, the digital and width required works out to be 64 Kbps.

2.3.2 CODEC

Compression and decompression (CODEC) of digital signals is a means of reducing the required bandwidth or transmission bit rate. Many different

Table 2-2: Compression Methods and MOS Scores Compression Method Bit Rate (Kbps) Framing Size (ms) MOS Score

G.711 PCM 64 1.25 4. G.729 CS-ACELP 8 10 3. G.729 x 2 Encoding 8 10 3. G.729 x 3 Encoding 8 10 2. G.729a CS-ACELP 8 10 3.

2.3.4 Delay

A very important design consideration in implementing voice communications networks is minimizing one-way, end-to-end delay. Voice traffic is real-time traffic and if there is too long a delay in voice packet delivery, speech will be unrecognizable. There are basically two kinds of delay inherent in today's telephony networks:  Propagation delay – caused by the characteristics of the speed of light traveling via a Fiber-optic-based or copper-based medium of the underlying network.  Handling delay (also called serialization delay) – caused by the devices that handle voice information and have a significant impact on voice quality in a packet network. Serialization delay Serialization delay is the amount of time a router takes to place a packet on a wire for transmission. Fragmentation helps to eliminate serialization delay. It is essential that there is a method for a router to break large data packets into smaller ones, and a queuing strategy in place to help voice packets jump to the front of a queue ahead of data packets for transmission. End-to-End delay End-to-end delay depends on the end-to-end signal paths/data paths, the CODEC, and the payload size of the packets.

2.3.5 Jitter

Jitter is variation in the delay of arrivals of voice packets at the receiver. This causes a discontinuity of the voice stream. It is usually compensated for by using a play-out buffer for playing out the voice smoothly. Play-out control can be exercised both in adaptive or non-adaptive play-out delay mode.

2.3.6 Echo Cancellation

Echo is hearing your own voice in the telephone receiver while you are talking. When timed properly, echo is reassuring to the speaker. If the echo exceeds approximately 25ms, it can be distracting and cause breaks in the conversation. In voice over packet-based networks or VoIP, echo cancellers are built into the low bit-rate Codecs and are operated on each DSP. Echo cancellers are limited by design by the total amount of time they will wait for the reflected speech to be received, which is known as an echo trail. The echo trail is normally 32ms.

2.3.7 Reliability

Traditional data communication strives to provide reliable end-to-end communication between two peers. They use checksum and sequence numbering for error control and some form of negative acknowledgement with a packet retransmission handshake for error recovery. For time-critical data, the retransmitted message/packet might therefore be entirely useless. Thus, VoIP networks should leave the proper error control and error recovery scheme to higher communication layers. Audio data is delay-sensitive and requires the transmitted voice packets to reach the destination with minimum delay and minimum delay jitter. Although TCP/IP provides reliable connection, it is at the cost of packet delay or higher network latency.

2.3.8 Interoperability

In a public network environment, in order for products from different vendors to interoperate with each other, they need to conform to standards. These standards are being devised by the ITU-T and the IETF. H.323 from ITU-T is by far the more popular standard. However, SIP/MGCP standards from IETF are rapidly gaining more acceptance as relatively light weight and easily scalable protocols.

2.5 Speech Compression

Speech compression is concerned with obtaining compact digital representation of voice signals to reach more efficient transmission or smaller data size. The objective is to represent speech signal with minimum number of bits yet maintain the perceptual quality. Therefore, this involves sampling and quantization. The advantages with coded speech signals are:

  1. Lower sensitivity to channel noise.
  2. Easier to error-protect, encrypt, multiplex and packetize.
  3. Efficient transmission over bandwidth constrained channels due to lower bit rate. Speech coders can be categorized into waveform coders who quantize the speech samples directly and operate at higher bit rates (16-64kbps). Historically, digital speech signals are sampled at a rate of 8000 samples/sec. Typically; each sample is represented by 8 bits. This corresponds to an uncompressed rate of 64 kbps (kbits/sec). With current compression techniques (all of which are lossy), it is possible to reduce the rate to 8 kbps with almost no perceptible loss in quality. Further compression is possible at a cost of lower quality. All of the current low- rate speech coders are based on the principle of linear predictive coding (LPC) which is presented in the following section.

2.6 Linear Predictive Coding

Linear Predictive Coding is a method of predicting a sample of a speech signal based on several previous samples. Similar to the method employed by the CEPSTRUM, we can use the LPC coefficients to separate a speech signal into two parts: the transfer function (which contains the vocal quality) and the excitation (which contains the pitch and the sound). The method of looking at speech as two parts which can be separated is known as the Source Filter Model of Speech.

2.6.1 CEPSTRUM

Within human speech, there are two methods employed to form our words. These sounds are categorized into the voiced and unvoiced. For the voiced part, our throat acts like a transfer function. The vowel sounds are included in this category. The unvoiced part describes the “noisy” sounds of speech. These are the sounds

made with our mouth and tongue, such as the “f” sound, the “s” sound, and the "th" sound. This way of looking at speech as two separable parts is known as the Source Filter Model of Speech.

2.6.2 Source Filter Model of Speech

The components of speech are the words and the voice. Speech is a collection of words shaped by voice. Here, we present a model of this. In this model, the words are called the source. Since the words are modified by voice, we say the source passes through a filter. This brings us to the source filter model of speech as shown in Figure 2-2.

Figure 2-2: A simple model of speech

2.6.3 Signal Processing Considerations

The source filter model can easily be extended to signal processing. The source is simply a signal x ( t ). This signal is the input to the filter and is called the excitation signal since it excites the vocal tract. It is a linear time-invariant system with impulse response h ( t ). This is sometimes called the transfer function of speech since it is what transfers the excitation signal to speech - it adds voice to words. Speech is the output y ( t ) of the source signal x ( t ) passed through the filter with impulse response h ( t ). Thus, the output is given by y ( t ) = x ( t ) * h ( t ) [3].This is depicted in Figure 2-3:

Figure 2-3: Signal Processing Model of Speech

2.6.4 Description of LPC

LPC technique will be utilized in order to analyze and synthesize speech signals. This method is used to successfully estimate basic speech parameters like pitch, formants and spectra. A block diagram of an LPC vocoder can be seen in Figure

period / frequency. We used the autocorrelation function to estimate the pitch period. However, if the frame is unvoiced, then white noise is used to represent it and a pitch period of T=0 is transmitted. Therefore, either white noise or impulse train becomes the excitation of the LPC synthesis filter. It is important to emphasize that the pitch, gain and coefficient parameters will be varying with time from one frame to another.

2.6.6 Autocorrelation method

Autocorrelation (correlating a signal with itself) can be used to extract a signal from noise. Since;  Random noise has a distinctive 'spike' autocorrelation function.  A sine wave has a periodic autocorrelation function  So the autocorrelation function of a noisy sine wave is a periodic function with a single spike which contains all the noise power. The separation of signal from noise using autocorrelation works because the autocorrelation function of the noise is easily distinguished from that of the signal. What actually happens in autocorrelation is that we take an audio signal and a copy of it and move it through itself ready to multiply with each other. The two signals (the audio signal and the impulse response) move through each other until the last sample of the audio signal is multiplied by the last tap in the impulse response.

Figure 2-5: A block diagram of a convolution process

In this case, we're multiplying each sample by its corresponding sample as mentioned in Figure 2-5. We then add all the results of the multiplications and we get a result. We keep doing this over and over, each time, moving the two signals by one sample and adding the results of the multiplications. Eventually, we get to a point where the signals are almost aligned. The process continues, providing a symmetrical set of results, until the two signals have moved apart from each other, resulting in a zero. What we have done is a procedure called autocorrelation - in other words, we're measuring how well the signal is related to itself. We saw

above that, unless the signals are aligned, the result of the multiplications and additions are 0. This meant that, unless the signal was aligned with itself, it is unrelated to itself (because it is noise). As we move the signal through itself in the autocorrelation process, the output tells us that the signal is similar to itself when it's shifted in time. So, for example, the first wave in the signal is identical to the last wave in the signal. Therefore a periodic component in the output of the autocorrelation tells us that the signal being auto-correlated is periodic or at least that it has a periodic component. So, autocorrelation can tell us whether a signal has periodic components. If the autocorrelation has periodic components, then the signal must as well. If the autocorrelation does not, and is just low random numbers, with a spike in the middle, then the signal does not have any periodic components.

Since VoIP packets are very small and the payload is 20 to 150 bytes with a RTP/UDP/IP header of 40 bytes. The combination of the IP, UDP and RTP control information adds up to a significant overhead for small media samples, particularly over low speed links. An Internet Protocol Datagram has a 20 byte header, while the UDP header is 8 bytes (source and destination ports, plus length and checksum field). The RTP header adds 12 bytes to this, making a total of 40 bytes of control for a single sample [6].

3.1 RTP Functionalities

RTP which provides end-to-end delivery services for data with real-time characteristics, such as interactive audio and video. Those services include payload type identification, sequence numbering, time stamping and delivery monitoring. Applications typically run RTP on top of UDP to make use of its multiplexing and checksum services [7]. RTP does not provide any mechanism to ensure timely delivery or provide other quality-of-service guarantees, but relies on lower-layer services to do so. It does not guarantee delivery or prevent out-of- order delivery, nor does it assume that the underlying network is reliable and delivers packets in sequence. The sequence numbers included in RTP allow the receiver to reconstruct the sender's packet sequence, but sequence numbers might also be used to determine the proper location of a packet. To guarantee the delivery the data transport is augmented by a control protocol (RTCP) to allow monitoring of the data delivery in a manner scalable to large multicast networks, and to provide minimal control and identification functionality. RTP and RTCP are designed to be independent of the underlying transport and network layers. To start the basic coding of RTP packet the following are the basic concept used to differentiate between different RTP packet parts.

3.1.1 RTP payload

It is the data transported by RTP in a packet, for example audio samples or compressed video data.

3.1.2 RTP header

It is the basic information transported over the network along with the payload. It includes certain fields like the version, padding, marker etc.

3.1.3 RTP packet

It is the data packet consisting of the fixed RTP header, a possibly empty list of contributing sources, and the payload data. Some underlying protocols may require an encapsulation of the RTP packet to be defined. Typically one packet of the underlying protocol contains a single RTP packet, but several RTP packets may be contained if permitted by the encapsulation method.

3.1.4 RTCP packet

It is a control packet consisting of a fixed header part similar to that of RTP data packets, followed by structured elements that vary depending upon the RTCP packet type. The formats are defined in Section 6. Typically, multiple RTCP packets are sent together as a compound RTCP packet in a single packet of the underlying protocol; this is enabled by the length field in the fixed header of each RTCP packet.

3.1.5 RTP session

It is the association among a set of participants communicating with RTP. For each participant, the session is defined by a particular pair of destination transport addresses (one network address plus a port pair for RTP and RTCP). The destination transport address pair may be common for all participants, as in the case of IP multicast, or may be different for each, as in the case of individual uni- cast network addresses plus a common port pair. In a multimedia session, each medium is carried in a separate RTP session with its own RTCP packets. The multiple RTP sessions are distinguished by different port number pairs and/or different multicast addresses [8].

3.2 RTP Header Format

RTP defines the formatting of the packets sent across the network. The packets contain the media information, called the RTP payload, along with an RTP header. This header provides information to the receiver that allows it to reconstruct the media; it contains the fields as shown in fig. 3-2.