IntroductionOne 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 designing and troubleshooting 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, we recommend the TAC Voice Bandwidth Codec Calculator ( registered customers only) tool. This tool provides information on how to calculate the bandwidth required for packet voice calls. PrerequisitesRequirementsThere are no specific requirements for this document. Components UsedThis document is not restricted to specific software and hardware versions. ConventionsFor more information on document conventions, refer to the Cisco Technical Tips Conventions. VoIP – Per Call BandwidthThe following protocol header assumptions are used for the calculations:
Note: The following table only contains calculations for the default voice payload sizes in Cisco CallManager or Cisco IOS?Software H.323 gateways. For additional calculations, including different voice payload sizes and other protocols such as Voice over Frame Relay (VoFR) and Voice over ATM (VoATM), use theTAC Voice Bandwidth Codec Calculator ( registered customers only) tool.
Explanation of Terms
Bandwidth Calculation FormulasThe following calculations are used:
Sample CalculationFor 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:
Configuring Voice Payload Sizes in Cisco CallManager and IOS GatewaysThe 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 a Media Gateway Control Protocol (MGCP) gateway, all the codec information (codec type, payload size, voice activity detection, and so on) is controlled by Cisco CallManager. 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 the following three service parameters:
In Cisco CallManager, the voice payload size is configured in terms of milliseconds (ms) samples. Based on the codec, the following table maps some ms samples to the actual payload size in bytes.
In Cisco IOS gateways, a feature was added in Cisco IOS Software Release 12.0(5)T that allows the voice payload size (in bytes) for VoIP packets to be changed via 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 SizesThe number of codec samples per packet is another factor in determining 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:
Note: L2 headers are not considered in the above calculation. Note: The calculations show that while the payload size is doubled, the number of packets per second required is subsequently cut in half. Note: As defined in the International Telecommunication Union Telecommunication Standardization Sector (ITU-T) G.114 specifications, the recommended one-way overall delay for voice is 150 ms. For a private network, 200 ms is a reasonable goal, and 250 ms should be the maximum. Voice Activity DetectionWith 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. Using 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 may 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 should 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 enable (it is disabled by default) with the following service parameter:
You can find these service parameters under Cisco CallManager Administration (Service > Service Parameters > select_server > Cisco CallManager). RTP Header-Compression or Compressed RTP (cRTP)
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 may 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. Using 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. A summary of the history follows.
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 CompressionAs 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 for detecting RTP packets for compression are as follows:
NetPro Discussion Forums - Featured Conversations |
|