Voice Over IP - Per Call Bandwidth Consumption

Introduction

One of the most important factors to consider when you build packet voice networks is proper capacity planning. Within capacity planning, bandwidth calculation is an important factor to consider when you design and troubleshoot packet voice networks for good voice quality.

This document explains voice codec bandwidth calculations and features to modify or conserve bandwidth when Voice over IP (VoIP) is used.

Note: As a complement to this document, you can use theTAC Voice Bandwidth Codec Calculator (registered customers only) tool. This toolprovides information on how to calculate the bandwidth required for packetvoice calls.

Prerequisites

Requirements

There are no specific requirements for this document.

Components Used

This document is not restricted to specific software and hardware versions.

Conventions

Refer to Cisco Technical Tips Conventions for more information on document conventions.

VoIP – Per Call Bandwidth

These protocol header assumptions are used for the calculations:

  • 40 bytes for IP (20 bytes) / User Datagram Protocol (UDP) (8 bytes) /Real-Time Transport Protocol (RTP) (12 bytes) headers.

  • Compressed Real-Time Protocol (cRTP) reduces the IP/UDP/RTP headersto 2or 4bytes (cRTP is not available over Ethernet).

  • 6 bytes for Multilink Point-to-Point Protocol (MP) or Frame RelayForum (FRF).12 Layer 2 (L2) header.

  • 1 byte for the end-of-frame flag on MP and Frame Relayframes.

  • 18 bytes for Ethernet L2 headers, including 4 bytes of Frame CheckSequence (FCS) or Cyclic Redundancy Check(CRC).

Note: This table only contains calculations for the default voice payloadsizes in Cisco CallManager or Cisco IOS® Software H.323 gateways. Foradditional calculations, including different voice payload sizes and otherprotocols, such as Voice over Frame Relay (VoFR) and Voice over ATM (VoATM),use theTAC Voice Bandwidth Codec Calculator (registered customers only) tool.

Note: 

Codec InformationBandwidth Calculations
Codec & Bit Rate (Kbps)Codec Sample Size (Bytes)Codec Sample Interval (ms)Mean Opinion Score (MOS)Voice Payload Size (Bytes)Voice Payload Size (ms)Packets Per Second (PPS)Bandwidth MP or FRF.12 (Kbps)Bandwidth w/cRTP MP or FRF.12 (Kbps)Bandwidth Ethernet (Kbps)
G.711 (64 Kbps)80 Bytes10 ms4.1160 Bytes20 ms5082.8 Kbps67.6 Kbps87.2 Kbps
G.729 (8 Kbps)10 Bytes10 ms3.9220 Bytes20 ms5026.8 Kbps11.6 Kbps31.2 Kbps
G.723.1 (6.3 Kbps)24 Bytes30 ms3.924 Bytes30 ms33.318.9 Kbps8.8 Kbps21.9 Kbps
G.723.1 (5.3 Kbps)20 Bytes30 ms3.820 Bytes30 ms33.317.9 Kbps7.7 Kbps20.8 Kbps
G.726 (32 Kbps)20 Bytes5 ms3.8580 Bytes20 ms5050.8 Kbps35.6 Kbps55.2 Kbps
G.726 (24 Kbps)15 Bytes5 ms 60 Bytes20 ms5042.8 Kbps27.6 Kbps47.2 Kbps
G.728 (16 Kbps)10 Bytes5 ms3.6160 Bytes30 ms33.328.5 Kbps18.4 Kbps31.5 Kbps
G722_64k(64 Kbps)80 Bytes10 ms4.13160 Bytes20 ms5082.8 Kbps67.6Kbps87.2 Kbps
ilbc_mode_20(15.2Kbps)38 Bytes20 msNA38 Bytes20 ms5034.0Kbps18.8 Kbps38.4Kbps
ilbc_mode_30(13.33Kbps)50 Bytes30 msNA50 Bytes30 ms33.325.867 Kbps15.73Kbps28.8 Kbps

Explanation of Terms

Codec Bit Rate (Kbps)Based on the codec, this is the number of bits per second thatneed to be transmitted to deliver a voice call. (codec bit rate = codec samplesize / codec sample interval).
Codec Sample Size (Bytes)Based on the codec, this is the number of bytes captured by theDigital Signal Processor (DSP) at each codec sample interval. For example, theG.729 coder operates on sample intervals of 10 ms, corresponding to 10 bytes(80 bits) per sample at a bit rate of 8 Kbps. (codec bit rate = codec samplesize / codec sample interval).
Codec Sample Interval (ms)This is the sample interval at which the codec operates. Forexample, the G.729 coder operates on sample intervals of 10 ms, correspondingto 10 bytes (80 bits) per sample at a bit rate of 8 Kbps. (codec bit rate =codec sample size / codec sample interval).
MOSMOS is a system of grading the voice quality of telephoneconnections. With MOS, a wide range of listeners judge the quality of a voicesample on a scale of one (bad) to five (excellent). The scores are averaged toprovide the MOS for the codec.
Voice Payload Size (Bytes)The voice payload size represents the number of bytes (or bits)that are filled into a packet. The voice payload size must be a multiple of thecodec sample size. For example, G.729 packets can use 10, 20, 30, 40, 50, or 60bytes of voice payload size.
Voice Payload Size (ms)The voice payload size can also be represented in terms of thecodec samples. For example, a G.729 voice payload size of 20 ms (two 10 mscodec samples) represents a voice payload of 20 bytes [ (20 bytes * 8) / (20ms) = 8 Kbps ]
PPSPPS represents the number of packets that need to betransmitted every second in order to deliver the codec bit rate. For example,for a G.729 call with voice payload size per packet of 20 bytes (160 bits), 50packets need to be transmitted every second [50 pps = (8 Kbps) / (160 bits perpacket) ]

Bandwidth Calculation Formulas

These calculations are used:

  • Total packet size = (L2 header: MP or FRF.12 or Ethernet) +(IP/UDP/RTP header) + (voice payload size)

  • PPS = (codec bit rate) / (voice payload size)

  • Bandwidth = total packet size * PPS

Sample Calculation

For example, the required bandwidth for a G.729 call (8 Kbps codec bit rate) with cRTP, MP and the default 20 bytes of voice payload is:

  • Total packet size (bytes) = (MP header of 6 bytes) + ( compressedIP/UDP/RTP header of 2 bytes) + (voice payload of 20 bytes) = 28 bytes

  • Total packet size (bits) = (28 bytes) * 8 bits per byte = 224 bits

  • PPS = (8 Kbps codec bit rate) / (160 bits) = 50 pps

    Note: 160 bits = 20 bytes (default voice payload) * 8 bits per byte

  • Bandwidth per call = voice packet size (224 bits) * 50 pps = 11.2Kbps

Configuring Voice Payload Sizes in Cisco CallManager and IOS Gateways

The voice payload size per packet can be configured in Cisco CallManager and Cisco IOS gateways.

Note: If the Cisco IOS gateway is configured in Cisco CallManager as aMedia Gateway Control Protocol (MGCP) gateway, all the codec information (codectype, payload size, voice activity detection, and so on) is controlled by CiscoCallManager.

In Cisco CallManager, the voice payload size per packet is configurable on a systemwide basis. This attribute is set in Cisco CallManager Administration (Service > Service Parameters > select_server > Cisco CallManager) with these three service parameters:

  • PreferredG711MillisecondPacketSize—(Default setting: 20 ms. Availablesettings: 10, 20, and 30 ms.)

  • PreferredG729MillisecondPacketSize—(Default setting: 20 ms. Availablesettings: 10, 20, 30, 40, 50, and 60 ms.)

  • PreferredG723MillisecondPacketSize—(Default setting: 30 ms. Availablesettings: 30 and 60 ms.)

In Cisco CallManager, the voice payload size is configured in terms of milliseconds (ms) samples. Based on the codec, this table maps some ms samples to the actual payload size in bytes.

CodecVoice Payload Size (ms)Voice Payload Size (Bytes)Comments
G.71120 ms (default)160 BytesNotice that the codec bit rate is always maintained. Forexample: G.711 codec = [240 bytes * 8(bits/bytes)] / 30 ms = 64 Kbps
30 ms240 Bytes
G.72920 ms (default)20 Bytes
30 ms30 Bytes
G.72330 ms (default) 

In Cisco IOS gateways, a feature is added in Cisco IOS Software Release 12.0(5)T that allows the voice payload size (in bytes) for VoIP packets to be changed through the Command-Line Interface (CLI). The new command syntax follows:

Cisco-Router(config-dial-peer)#codec g729r8 bytes ?

Each codec sample produces 10 bytes of voice payload.

Valid sizes are:
10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120,
130, 140, 150, 160, 170, 180, 190, 200, 210, 220, 230

Any other value within the range will be rounded down to nearest valid size.

<10-230> Choose a voice payload size from the list above

Impact of Changing Voice Payload Sizes

The number of codec samples per packet is another factor that determines the bandwidth and delay of a VoIP call. The codec defines the size of the sample, but the total number of samples placed in a packet affects how many packets are sent per second.

When you increase the voice payload size the VoIP bandwidth reduces and the overall delay increases. The following example illustrates this:

  • G.729 call with voice payload size of 20 bytes (20 ms): (40 bytes ofIP/UDP/RTP headers + 20 bytes voice payload)* 8 bits per byte * 50 pps = 24Kbps

  • G.729 call with voice payload size of 40 bytes (40 ms): (40 bytes ofIP/UDP/RTP headers + 40 bytes voice payload) * 8 bits per byte * 25 pps = 16Kbps

Note: L2 headers are not considered in this calculation.

Note: The calculations show that while the payload size is doubled, thenumber of packets per second required is subsequently cut in half.

Note: As defined in the International Telecommunication UnionTelecommunication Standardization Sector (ITU-T) G.114 specifications, therecommended one-way overall delay for voice is 150 ms. For a private network,200 ms is a reasonable goal, and 250 ms must be the maximum.

Voice Activity Detection

With circuit-switched voice networks, all voice calls use 64 Kbps fixed-bandwidth links regardless of how much of the conversation is speech and how much is silence. With VoIP networks, all conversation and silence is packetized. With Voice Activity Detection (VAD), packets of silence can be suppressed.

Over time and as an average on a volume of more than 24 calls, VAD can provide up to a 35 percent bandwidth savings. The savings are not realized on every individual voice call, or on any specific point measurement. For the purposes of network design and bandwidth engineering, VAD must not be taken into account, especially on links that carry fewer than 24 voice calls simultaneously. Various features such as music on hold and fax render VAD ineffective. When the network is engineered for the full voice call bandwidth, all savings provided by VAD are available to data applications.

VAD also provides Comfort Noise Generation (CNG). Because you can mistake silence for a disconnected call, CNG provides locally generated white noise so the call appears normally connected to both parties. G.729 Annex-B and G.723.1 Annex-A include an integrated VAD function, but otherwise performs the same as G.729 and G.723.1, respectively.

In Cisco CallManager, VAD can be enabled (it is disabled by default) with these service parameters:

  • SilenceSuppressionSystemWide—This parameter selectsthe VAD setting for all skinny endpoints (for example: Cisco IP Phones andSkinny gateways)

  • SilenceSuppressionWithGateways—This parameterselects the VAD setting for all MGCP gateways. This does not have an effect onH.323 gateways. VAD on H.323 gateways must be disabled on the gateway.

You can find these service parameters under Cisco CallManager Administration (Service > Service Parameters > select_server > Cisco CallManager).

RTP Header-Compression or Compressed RTP (cRTP)

bwidth_consume.gif

All VoIP packets are made up of two components: voice samples and IP/UDP/RTP headers. Although the voice samples are compressed by the Digital Signal Processor (DSP) and can vary in size based on the codec used, these headers are a constant 40 bytes in length. When compared to the 20 bytes of voice samples in a default G.729 call, these headers make up a considerable amount of overhead. With cRTP, these headers can be compressed to two or four bytes. This compression offers significant VoIP bandwidth savings. For example, a default G.729 VoIP call consumes 24 Kb without cRTP, but only 12 Kb with cRTP enabled.

Because cRTP compresses VoIP calls on a link-by-link basis, both ends of the IP link need to be configured for cRTP.

In Cisco IOS Software Releases 12.0.5T and earlier, cRTP is process-switched, severely limiting the scalability of cRTP solutions due to CPU performance. Most of these issues have been resolved through various cRTP performance improvements introduced in Cisco IOS Software Releases 12.0.7T through 12.1.2T. This is a summary of the history.

  • cRTP is process-switched in Cisco IOS Software Release 12.0.5T andearlier.

  • In Cisco IOS Software Release 12.0.7T, and continuing in 12.1.1T,fast-switching and Cisco Express Forwarding-switching support for cRTP isintroduced.

  • In Cisco IOS Software Release 12.1.2T, algorithmic performanceimprovements are introduced.

Moving cRTP into the fast-switching path significantly increases the number of RTP sessions (VoIP calls) that VoIP gateways and intermediate routers can process.

Heuristics for Compression

As RTP does not have a distinct packet header of its own, an RTP stream (for cRTP) is distinguished from a UDP stream (cUDP) by using heuristics. The exact heuristics used at present in order to detect RTP packets for compression are:

  • The destination port number is even.

  • The destination port number is in the range 16384-32767 or49152-65535.

  • The RTP version field is set to two.

  • The RTP extension field is set tozero.

Related Information

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值