Understanding of bandwidth used by voice calls, voice call bandwidth

Source: Internet
Author: User

Understanding of bandwidth used by voice calls, voice call bandwidth

Sometimes the customer is concerned about how much M of bandwidth to apply for to ensure the number of voice calls that the server can achieve. Here, I will only describe my personal understanding.


The following uses G711 encoding as an example to describe it. At the same time, we should know that the standard encoding rate of G711 encoding is 64 Kbps. In addition, it is assumed that the LAN uplink device uses a static IP address that does not contain VLAN to access the Internet (these factors need to be taken into account when calculating the "entire packet size" below ).


1. The bandwidth formula for converting a single voice call is provided first:

Bandwidth of one call X the size of the entire message (if you encrypt the media, add the encrypted padding byte)
------------------------ = -----------------------------------------------------------------------------
The G711 encoding rate specifies the size of the G711 encoding load for the packaging duration (if you perform media encryption, add encrypted Padding Bytes here)

Bandwidth X = size of the entire message X G711 encoding rate/size of the G711 encoding load for the specified packaging duration


Here, we can calculate "the size of the entire message" and "specify the size of the G711 encoding load for the packaging duration" to find "one-way call bandwidth X ". (Note: G711 encoding speed is standard 64 Kbps, which is known)


2. Size of the entire packet = size of the Ethernet header + size of the IP header + size of the UDP header + size of the RTP Header + size of the G711 encoding load for the specified packaging duration

"Ethernet header size", "IP header size", "UDP header size", and "RTP Header size" all have standard definitions. For more information, see relevant standards, it is considered that all items are known and will not be described here.


3. specify the size of the G711 encoding load for the packaging duration

For example, if G711 encoding is used and the packaging duration of 20 ms is 80 bytes, the calculation method is as follows:

The standard encoding speed of G711 is 64 Kbps.

64 Kbps = (64 K) bit/second = (64 K/8) byte/second = (8 K) byte/second = (8 K/1000) byte/millisecond = (8 byte)/millisecond

Therefore, the 20 ms G711 encoding load is 20*8 bytes = 160 bytes.


Note:

The bandwidth value calculated for a single call is for a single call on a terminal device. If the server supports the media forwarding proxy function, multiply the bandwidth value calculated for the previous call on the server by 2, this is because a server call corresponds to two terminal devices.



What is the voice bandwidth?

For more information about the bandwidth, see the following section.

Regardless of the protocol used in call control signaling, the transmission of voice packets is basically based on the RTP (real-time transport protocol RFC 1889/RFC 3350) protocol. This is a protocol developed by IETF to transmit real-time media streams.
Almost all VoIP-related products use RTP to send and receive voice information. The structure of the voice package is as follows. After encapsulation on the IP layer, the package is sent to the network. The amount of information in the Payload part depends on the encoding method used.
Generally, G.729 encoding is widely used in the world of VoIP, while G.711 is widely used in the IP phone service provided by carriers. G.711 is a CODEC used in the ISDN network, with good sound quality, but more information than G.729. G.729 is a CODEC with high compression ratio and sound quality. When a channel of voice information is transmitted, G.711 requires a bandwidth of 64 kbps, while G.729 only requires 8 kbps. The two generally send data packets at an interval of 20 msec (this interval is variable), so we can calculate the actual package size.
Voice information is a analog signal. to convert a speech into a data packet, you must first convert the analog signal to a digital signal (digital-mode conversion ). I believe everyone knows about this. The process of digital transmission of analog voice information is roughly shown in.

In the existing telephone exchange network, G.711 (PCM) is used. The two sides of the call must undergo encoding/Decoding in the same way to implement voice calls, the encoding/decoding function is called CODEC (COder/DECoder ).

Two typical CODEC types in VoIP applications are as follows:
G.711 (PCM method: PCM = Pulse Code Modulation: Pulse Code Modulation)
? Sampling Rate: 8 kHz
? Information volume: 64 kbps/channel
? Theoretical delay: 0.125 msec
? Quality: MOS value 4.10
G.729 (CS-ACELP mode: Conjugate Structure Algebraic Code Excited Linear Prediction)
? Sampling Rate: 8 kHz
? Information: 8 kbps/channel
? Frame Length: 10 msec
? Theoretical delay: 15 msec
? Quality: MOS value 3.9

Next we will discuss the two types of CODEC. Using CODEC to digitize voice information is not a matter of encapsulating voice data packets.
To complete packaging, the VoIP Terminal has a built-in chip called Digital Signal Processor. Simply put, it is a chip that processes a large amount of digital information produced after Analog Signal Encoding in real time.
In the actual packaging process, you also need to use the RTP protocol to send voice packets to the network. The RTP package contains the load type (CODEC type), serial number (voice packet sequence), timestamp (sending interval of voice packets), and other information, the receiver restores the received digital information to a simulated voice signal based on the information.

(4) computing the size and required bandwidth of voice data packets

The Encapsulation Format of the actual voice information on the IP layer is as follows.
IP Header (20 bytes) + UDP Header (8 bytes) + RTP Header (12 bytes) + Payload (net part, variable length)

Encapsulation of voice information into an IP packet over three layers will inevitably produce additional 40 byte overhead. If G.711/G.729 CODEC is used to encapsulate the voice information package in 20 msec cycles, the length of the generated package is as follows.

G.711 hour
Packets sent per second: 1000/20 msec = 50pps
Bandwidth required for one voice message: 64 kbps = 50pps × Payload
Payload size = 64000/50 = 1280bit = 160 bytes
The length of the voice package... the remaining full text>

How much bandwidth is generally required for voice calls?

A: About 3-13 k/s, depending on the bandwidth, network conditions, and CPU performance of the other party.
 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.