Вы находитесь на странице: 1из 2

Nyquist Theorem:

=============
States that 8000 samples are taken in a second to restore a signal back
Each sample takes 8 bits
1 sample takes 8 bits
8000 samples takes 64000bits
64000bits per second needs to be transmitted
Packet calculation:
===================
Packet May contain 20 or 30 ms of data.
All the units should be in seconds, so 20 ms becomes 20/1000.
We should divide by 8 since we are calculating for Bytes per second.
Bytes per packet = ((sampled milliseconds of data)*(codec bandwidth))/8
=(20/1000)*(64000)/8
=
A single packet conatins 20ms of data.
1 packet contains 20/1000 seconds of data
?

contains 1 sec of data

Packets =(1*1000)/20 =50 packets


Packets per second = 50
For a packet there are several overheads IP, UDP,RTP, Ethernet header(G729A)
Total packet size including the overhead= 20 bytes (voice payload)+ 20 bytes (IP
header)+ 8 bytes (UDP header)+ 12 bytes (RTP header)+ 20 bytes(Ethernet header)
=80 bytes
Total_Bandwidth = Packet_Size * Packets_Per_Second
=(80 * 50)=4000 bytes per second
=4000*8= 32000 bits per second.
Choosing the codec and sample size:
===================================
Sample size indicates the amount of audio included in each packet--Default=20ms
Larger samples =Bandwidth savings(for e.g u are packing a 30ms audio in packet t
hen the number of packets can be reduced-resulting in reduction of Bandwidth)

Larger samples =More delay


Change the default sample size of the codec in the voice gateway:
==================================================================
Default =20ms
If you want to change the sample size to 30ms=0.03 seconds
the command used in the router is
codec g711ulaw bytes ?
For calculating the bytes to specify in the commnad use the below formula
Bytes per sample =(sample size * codec bandwidth)
x = 0.03 * 640000(G711 codec bandwidth =64kbps)=1920 bits= 1920/8 = 240 Bytes
codec g711ulaw bytes 240
Add in Data Link and Network OVERHEAD:
======================================
Ethernet :18 Bytes
Frame Reelay :4-6 Bytes
PPP/MLPPP:6 Bytes
IP :20 Bytes
UDP: 8 Bytes
RTP: 12 Bytes
VOIP Bandwidth Saving Measures:
================================
1)VAD: Suppresses the silence
Average 35% Bandwidth Savings
2)COmpressed RTP:
Compressed Network and Transport Layer Headers from 40 Bytes to 2-4 bytes
Around 40% with G729 codec.

Вам также может понравиться