Voice over IP End-to-End Delay Measurements
Binyam Shiferaw Heyi
Department of Computer Engineering, Addis Ababa Science and Technology University (AASTU), Addis Ababa, Ethiopia
To cite this article:
Binyam Shiferaw Heyi. Voice over IP End-to-End Delay Measurements. American Journal of Networks and Communications. Vol. 4, No. 4, 2015, pp. 85-89. doi: 10.11648/j.ajnc.20150404.11
Abstract: VoIP refers to a method of transmission of voice data over IP networks rather than using traditional circuit PSTN (Public Switched Telephone Networks ).In this paper the researcher discusses about VoIP, about the design issues of RTP/RTCP (real-time transport/real time control protocol), how to measure packet losses at the sender and receiver side and also inter-arrival delay and delay variation (Jitter) , how the receiver and sender sends reports about the sender , how one-way end-to-end delay is measured, and explains the functionalities of static and dynamic jitter buffers and describe how Cisco routers are used to measure packet losses and round trip delays for IP-SLA (Service level agreement).
Keywords: VoIP, End-to-End Delay, RTP, RTCP, IP-SLA
VoIP is a technology that let us use normal internet to make and receive a call. The most attractive benefits of VoIP cost saving, having single network for voice and data helps for simplification of management and allow you to access your phone system anywhere you have a broadband internet. Although VoIP has different usage, it comes with a challenge; those challenges include speech quality, service reliability, packet loss, delay and delay variations. This paper discusses about the challenges and recommends a better way to use the technology. This chapter discusses the technologies behind VoIP.
Real-time transport protocol (RTP): it is a protocol that is used for application that has real-time characteristics. The protocol provide services that are end-to-end such as payload type identification, sequence numbering, time stamping and delivery monitoring for applications that are interactive videos and audios. 
RTP control protocol (RTCP): is a protocol that is used to convey information and monitor the quality of services of about the participants in an on-going session. .
As it has been known when there is communicate over an internet, the communication encounters packet losses, delays and out of order delivery of data (this thing is worse for real time communication). So RTP contains header that has fields for sequence number and for timestamps, where their values are going to be inserted by the sender and are read by the receiver used for correct reception of data.
2. Literature Review
In , it has been described a method of monitoring VoIP performance, the paper also suggested the measurement point to be taken in the path of the packet to get accurate result. The paper finally recommends more studies should be done in the near future.
In , discussing delay and jitter in VoIP traffic. This paper focuses on suggesting proper scheduling scheme especially in low-bandwidth networks that carry VoIP data.
In  discusses the end-to-end VoIP quality measurement. The paper focuses on recording voice samples to measure VoIP delay and delay variations and packet loss on the voice signals.
Paper , discusses the measurement scheme of one-way delay variation, this paper discusses on removing clock offsets and measuring all variables that is required for one way delay measurements
3. Proposed Methodology
The sender and receiver exchanges RTP Voice packets. Every RTP packet contains 12 byte header which contains 16 bit sequence number which is used to detect packet losses. This sequence number is generated by the sender and incremented by the sender after sending one packet after another. When receiver receives a packet it sees its sequence number and compares it with the expected value if it does not match the receiver concludes that there is some packet lost. If the expected sequence packet matches the receiver calculate the parameters as in 
The lost fraction can be calculated
3.1. Time Stamp Calculations
Time stamp calculations basically depends up on the type of application we use for example for voice and video data it is basically different since the given data is basically for voice I only use the formula for voice data only.
3.1.1. Timestamp Calculation at the Sender Side
For the experimentation purpose, the researcher uses 10 RTP packets .According to  since the audio that is used is fixed-rate the sampling period dictates the time stamp clock i.e for each increment by the sample period the time stamp would likely to increment by one. If an output device provide an audio application that has blocks covering 160 sampling period .the sender timestamp would increased by 160 ,regardless of the block has transmitted or dropped.
Table 1 shows the sender timestamp.
|Sequence No. i||Si (Timestamp)||Si (ms)|
3.1.2. Calculation at the Receiver Side
When a receiver is receives the packet, the timestamp of the received packet according to eq (5)
Where, Rec(i) in terms of time unit can be calculated by eq (6) sampling frequency of voice is 8000Samples/Sec
The receiver calculates the timestamp only when the packet is received. The initial timestamp is zero for the first packet is zero because it is used as a reference. In table 2 shown the packet nine does not arrive to the receiver that’s why no calculation has been done for the packet nine
|Seq.||Arrival Time||Rec(i) (ms)||RecTS(i) (timestamp)|
3.1.3. Inter-Arrival Jitter Calculation Method
In real time communication there is no guarantee that the packet sent, will arrive in order and delivered on time. If the receiver don’t receive the packet on time or in order over the network that means delay occur that create a delay gap. The inter-arrival jitter (J) is defined by variation of delay in the network that is perceived by the receiver for each packet. Every packet received contains a timestamp that informs the receiver at which time the received data in the packet should be played back. 
The difference in the "transit relative time" D (which is relative time difference between RTP timestamp of the packet and the receiver clock at the time when the packet arrives,)
D (x, y) for the two packets x and y can be calculated by equ (7)
Sx is the RTP timestamp from packet x, and
Rx is the time of arrival in RTP timestamp units for packet x
The receiver can calculate the inter-arrival delay variation or jitter according to eq(8) 
J(x) is the delay variation or Jitter of packet x
In the given question the first packet is sent at time t=01:02:02:00. The time distance at the sender between each packet is 20 ms and each packet contains 160 octets of voice data. The sampling frequency of the voice signal is 8 kHz (each sampled unit contains one octet).
The calculation of inter-arrival jitter for the packet 1 and 2 are shown below
Sender timestamp for packet 1, S1=: 0
Sender timestamp for packet 2, S2=0+160= 160 timestamp =160/8=20ms
Rec (1) in terms of time unit = 0 ms
Rec (2) in terms of time unit = (43-20) +0=23 ms
Now the receiver timestamp for packet 1,
RecTS(1) = 0
Receiver timestamp for packet 2,
RecTS(2) = 23 * 8000/1000 = 184
Delay: D(1,2) = (184-0)-(160-0) = 24timestamp =24/8Khz=3ms
Jitter: J(2) = 0+(24-0)/16 = 1.5 timestamps =1.5/8Khz =0.188 ms
In similar fashion we can calculate the other inter- arrival jitter values as show in table 3.
|Seq. No, i||Si (Timestamp)||Si (ms)||Arrival Time||Rec (i) (ms)||RecTS(i) (Timestamps)||D(i-1,i) timestamp||D(i-1,i) Ms||J(i) Timestamps||Ji (ms)|
3.2. How Senders and Receiver Reports to Each Other in RTCP
For reporting errors associated to losses and jitter, RTCP packets uses Send Report (SR) and Receive Report (RR) messages. The SR is issued by sender if a sender has sent any data during an interval since issuing the last SR.The sender SR includes absolute timestamp to help the receiver to synchronize with the receiver, if the transmission contains video and audio data transmitted at the same time, both requires independent time stamps.
The participants will issue RR together with SR if they are active senders and receivers; if they are no t active senders they will only issue RR. The RR report contains information about the quality of services of the transmission.
Fig 2 depicts how the report is sent from the two sides
4. One-Way Delay Calculation
For calculation of one-way delay in addition to those ones that are mentioned above ,we require the time it takes a packet to travel along the physical links that make up its path through the internet to the destination (what we call propagation delay) and the time it takes to pass through routers between those links (queuing and transmission time).
For calculation one-way delay for active measurement system between two measurement points we must continuously send test traffic into the network that increases either the queuing delay or transmission time this may be accomplished by introducing additional packet to the routers and or by increasing the propagation delay by re-routing the packet to another path and measure the delays and compare it with the normal functioning of the network ,here we must take care of the situation that the traffic we introduce does not going to be above that of the minimal value.
Finally the requirements needed for one way delay are
• Each node in the network sends a packet by setting its own time stamp to other node in the neighbor.
• When the other nodes receive this packet it will mark the arrival time with its own time stamp.
• The difference between this two time stamps is one way delay i.e. one way delay = Receiving timestamp - Sending timestamp
But this measurement is valid only if the two clocks (receiver and transmitter) are synchronized to the same time base, otherwise the calculation should consider clock drifts.
5. Building up End-to-End Delay Budget
In real-time communication to accurately estimate the performance of the communication, the designer should account and correctly calculate the delay associated with every device inside the network.
The following components should be considered to calculate the end-to-end delay budget.
Coder (processing) delay: it is the delay by the coder or the processor of the signal .This delay varies from one coder to another and also with their speed. Coder delay contains compression and decompression delays since some signals (e.g. voice) may be needed to be compressed or decompressed. 
Algorithmic delay: sometimes the system encounters digital signal processing; for correct processing of Sample Block (N) they need to know the behavior of sample block (N+1).So the time spent to overlook for sample block(N+1) is Algorithmic delay.
Coder delay and algorithmic delay are together are called lumped coder delay.
Packetization delay: it’s the delay associated with filling up the payload part of the packet with encoded data. This delay is a function of sample block size and the number of block in the frame. 
Serialization delay: it is the delay associated with clocking the dat frame on the network interface .It is basically dependant on the speed of the trunk. 
Queuing/buffering delay: it is the delay associated with queues inside the routers; it is basically dependant on the trunk speed and the state of the queue. 
Network switching delay: it is the most difficult of all delays to quantify is associated with the frame-relay or ATM networks that interconnect the end point locations
De-jitter delay: if the transmitted signal that is constant bit rate signal then, all the bit signal rate delay must be removed before the signal leaves the network; this is done in Cisco routers at the receiver end by transforming the variable delay into a fixed delay. 
So, end-to-end dlay comprises the sum of all the above delays.
6. Jitter Buffers
When packet travels inside the network it may be delayed at several points, but the delay associated with this packet is variable so this variation in delay is called jitter. So for giving high quality of service we need to control this jitter. Causes of jitter delay are basically congestion inside the network, or at the access link, route flapping and load sharing between routers.
Jitters are classified into
• Constant jitter,
• Transient jitter, S
• Short term delay variation,
One of the mechanisms to reduce delay jitter is just to introduce jitter buffer so that it buffers each arriving packet for a short interval before playing it out.
There are two types of jitter buffers static (De-Jitter) buffer and dynamic (Adaptive) buffer.
Both fixed and adaptive jitter buffers are capable of automatically adjusting to changes in delay. In many cases the jitter buffer can be considered as a time window with one side (the early side) aligned with the recent minimum delay and the other side (the late side) representing the maximum permissible delay before a packet would be discarded. 
De-Jitter buffer: as its name indicates it has a constant size and transforms the variable delay into a fixed delay. It just holds the first sample before playing it out. We must take care the holding time here because if we hold it for longer time it may lead to the buffer to be over-runed and increase the time over all delay to unacceptable level. . The maximum jitter that can be countered by a de-jitter buffer is equal to the buffering delay introduced before starting the play-out of the media stream. 
Dynamic Buffers: this buffer has the ability to adjust its size dynamically which able it to optimization. Dynamic jitter buffers react by either discard events when the measured jitter increase in level. When this event is occurred then the jitter buffer size is increased. If there is no discard event then the size jitter buffer size is reduced. 
7. Cisco IP-SLA
Different network equipment inside the network must satisfy service guarantees, validate network performance and the like; Cisco IOS (Internetwork Operating System) IP Service Level Agreements (SLAs) fulfill those requirements that are needed for creating a network that is "performance-aware". 
Cisco IP-SLA has unique subset of the following performance metric which includes: Delay, Packet loss, Packet sequencing….
Cisco routers can be used to measure packet loss and round-trip delay. When Cisco router is being used to measure round trip time the routers must be enabled with responder which notes down two timestamps: when the packet arrives and leaves the router interface as can be shown in t fig 2, to calculate the round trip delay four timestamps are needs. At the target router, arrival timestamp (T2) is subtracted from sent timestamp (T3) to produce the time spent processing the test packet. This is represented by delta. This delta value is then subtracted from the overall round-trip time to find the round trip time delay. 
8. Conclusion and Recommendation
This paper presented a method to calculate approximate values of delay in VoIP traffic carried through RTP packets. The suggested procedure different calculation methods to calculate delay and delay variation. These methods give a very good approximation to the real values that is obtained and also the values of VoIP delay which can be helpful in understanding the network behavior when changes in traffic happen.
The suggested methods and formulas can be used in any type of voice traffic independent of network types and independent of signaling protocols.
The calculations were implemented successfully to the 10 sample calls and the results were conclusive with the real measured values.
The research can further extended to operate on many samples, not only voice but also videos. The improved model can also be extended to include interpolations and regressions.