Cisco IOS Voice Troubleshooting and Monitoring Guide, Release 12.4
Troubleshooting Quality of Service for VoIP
Downloads: This chapterpdf (PDF - 326.0KB) The complete bookPDF (PDF - 2.89MB) | Feedback

Troubleshooting Quality of Service for VoIP

Table Of Contents

Troubleshooting Quality of Service for VoIP

Understanding VoIP QoS Issues

Measuring QoS

Common QoS Problems

Delay in Voice Networks

Packet Loss

Jitter Adjustment

Echo Adjustment

Determine Where Echo Is Occurring

Troubleshooting Echo in Cisco IOS Gateways

Measuring Echo in Cisco IOS Gateways

Voice Level Adjustment

Input and Output Levels

Voice Activity Detection Level

Voice Call Tuning

Restrictions for Voice Call Tuning

Information About Voice Call Tuning

Packet-Flow Detection

DSP State

Echo-Cancellation State

Jitter-Buffer Parameters

How to Verify Voice Call Tuning Functionality

Voice Call Tuning Configuration Examples


Troubleshooting Quality of Service for VoIP


The primary goal of Quality of Service (QoS) is to make network service better and more predictable by providing dedicated bandwidth, controlled jitter and latency, and improved loss characteristics. QoS achieves these goals by providing tools for managing network congestion, shaping network traffic, using expensive wide-area links more efficiently, and setting traffic policies across the network.

For information about configuring QoS for voice, refer to the Quality of Service for Voice document. For more information about QoS, refer to the Cisco IOS Quality of Service Solutions Configuration Guide.

This chapter contains the following topics:

Understanding VoIP QoS Issues

Common QoS Problems

Voice Call Tuning

Understanding VoIP QoS Issues

When VoIP calls are properly established, the next step is to verify that the voice quality is good. You should consider the following guidelines as you attempt to achieve good voice quality:

Understand how much bandwidth a VoIP call consumes with each codec, including Layer 2 and IP/UDP/RTP headers. For more information about VoIP bandwidth consumption, refer to Voice Over IP - Per Call Bandwidth Consumption, document ID 7934.

Understand the characteristics of the IP network over which the calls travel. For example, the bandwidth of a Frame Relay network at CIR is much different than that above-CIR (or burst), where packets could be dropped or queued in the Frame-Relay cloud. Ensure that delay and jitter are controlled and eliminated as much as possible. One-way transmit delay should not exceed 150 ms (per G.114 recommendation).

Use a queuing technique that allows VoIP traffic to be identified and prioritized.

When transmitting VoIP over low-speed links, consider using Layer 2 packet fragmentation techniques, such as Multilink Point-to-Point Protocol (MLPPP) with Link Fragmentation and Interleaving (LFI) on point-to-point links, or FRF.12 on Frame Relay links. Fragmentation of larger data packets allows less jitter and delay in transmitting VoIP traffic because the VoIP packets can be interleaved onto the link.

Try the call with a different codec and with the voice activity detector (VAD) enabled and disabled to possibly narrow down the issue to the digital signal processor (DSP), as opposed to the IP network.

With VoIP, when you are troubleshooting QoS issues, look especially for dropped packets and network bottlenecks that can cause delay and jitter.

Specifically, look for the following:

Interface drops

Buffer drops

Policy-map drops

Interface congestion

Link congestion

Each interface in the path of the VoIP call should be examined and drops and congestion should be eliminated. Also, round-trip delay should be reduced as much as possible. Pings between the VoIP end points give an indication of the round trip delay of a link. The round trip delay should not exceed 300 ms whenever possible. If the delay does have to exceed this value, efforts should also be taken to ensure this delay is constant, so that you do not introduce jitter or variable delay.

When low latency queueing (LLQ) is set up, you can check policy-map drops by looking for packets that match the priority class by entering the show policy interface serial command. This shows how much traffic is matching the priority class and how much bandwidth is used.

Ensure that the Cisco IOS queuing mechanism is placing the VoIP packets within the proper queues. Cisco IOS commands, such as show queue and show priority can help you to verify queueing.

Measuring QoS

Cisco offers several options for monitoring QoS in networks using VoIP solutions. Cisco offers tools that provide information about the voice quality you are experiencing by measuring delay, jitter, and packet loss. Cisco solutions do not measure voice quality using Perceptual Speech Quality Measurement (PSQM) or some of the new proposed algorithms for voice quality measurement. Tools from outside vendors are available for this purpose.

When implementing service policies using the QoS command line interface (CLI), start with the Cisco Class-Based QoS Configuration and Statistics Management Information Base (MIB). This MIB provides read access to QoS configuration and statistics information for Cisco platforms that support the Modular QoS CLI. Statistics available through this MIB include summary counts and rates by traffic class before and after any configured QoS policies are enforced. In addition, detailed feature-specific statistics are available for select PolicyMap features. See Cisco MIBs for the object IDs.

In addition, Cisco offers the following software tools for monitoring QoS:

Network monitoring using Cisco Service Assurance Agent (Cisco SSA)—The response time and availability monitoring capabilities of this tool include support for VoIP, QoS, and the World Wide Web. The Cisco SSA is an application-aware synthetic operation agent that monitors network performance by measuring key metrics such as response time, availability, jitter (interpacket delay variance), connect time, throughput, and packet loss. These metrics can be used for troubleshooting, for analysis before problems occur, and for designing future network topologies. This tool is designed more for trending, rather than real-time monitoring. Refer to Using Cisco Service Assurance Agent and Internetwork Performance Monitor to Manage Quality of Service in Voice over IP Networks for more information.

Cisco Gateway Management Agent (CGMA)—The only real-time management Cisco IOS software agent and protocol for VoIP. The CGMA is a new gateway Cisco IOS agent that provides real-time call-state information for all VoIP calls. CGMA supports a push protocol, in which certain call-state changes result in a message being sent out of CGMA by the gateways. The interface from the CGMA is the Real Time Management Protocol (RTMP). RTMP is a lightweight XML-based protocol that uses TCP as the transport protocol. This solution allows Service Providers to monitor their calls (session initiation protocol (SIP) and H.323 networks), viewing call detail records (CDRs) and trunk utilization in real time. The validated gateways for the CGMA include the Cisco 2600 series, the Cisco 3600 series, and the Cisco 5000 series. The Cisco IOS that has been validated on all gateways is the 12.2(2)XB mainline release.

CiscoWorks QoS Policy Manager (QPM)QPM provides a scalable platform for defining, applying, and monitoring QoS policy on a system-wide basis for Cisco devices, including routers and switches.

QPM enables you to baseline profile network traffic, create QoS policies at an abstract level, control the deployment of policies, and then monitor QoS to verify intended results. As a centralized tool QPM is used to monitor and provision QoS for groups of interfaces and devices.

QPM provides a web-based intuitive user interface to define QoS policies, and translates those policies into the device's command line interface (CLI) commands.

QPM runs on the CiscoWorks Common Services server, which can be installed as a standalone server, or as an add-on to CD One 5th Edition. CiscoWorks Common Services provides the infrastructure required by QPM to run from the CiscoWorks desktop environment, and also provides management of user roles and privileges, allowing you to control who gets access to specific tasks in QPM.

Common QoS Problems

Common voice quality issues include the following:

Delay in Voice Networks

Packet Loss

Jitter Adjustment

Echo Adjustment

Voice Level Adjustment

Table 44 lists some QoS problems you might encounter after configuring voice ports and suggests some remedies. To configure QoS features on voice ports, see the "Fine-Tuning Analog and Digital Voice Ports" section in the Voice Port Configuration document.

Table 44 Troubleshooting Voice Quality on Voice Ports 

Symptom
Suggested Action

Telephony device buzzes or does not ring.

Use the show voice port command to confirm that ring frequency is configured correctly. It must match the connected telephony equipment and might be country-dependent.

Distorted speech.

Use the show voice port command to confirm that the cptone keyword setting (also called region tone) is set to us for the United States.

Note Having a wrong cptone setting can cause faulty voice reproduction during analog-to-digital or digital-to-analog conversions.

Music on Hold (MOH) is not heard.

Reduce the music-threshold level to make VAD less sensitive with the music-threshold voice-port configuration command. Valid entries are from -70 to -30.

Background noise is not heard.

Enable the comfort-noise command.

Long pauses occur in conversation, as if you were speaking on a walkie-talkie.

Overall delay is probably excessive; the standard for adequate voice quality is 150 ms one-way transit delay. Measure delay by using ping tests at various times of the day with different network traffic loads. If delay must be reduced, examine propagation delay of signals between the sending and receiving endpoints, voice encoding delay, and the voice packetization time for various VoIP codecs.

Jerky or choppy speech.

Variable delay, or jitter, is being introduced by congestion in the packet network. There are two possible remedies:

Reduce the amount of congestion in your packet network. Pings between VoIP endpoints provide information about the round-trip delay of a link, which should never exceed 300 ms. Network queuing and dropped packets should also be examined.

Increase the size of the jitter buffer with the playout-delay command. (See the "Jitter Adjustment" section for more information.)

Clipped or fuzzy speech.

Reduce input gain. (See the "Voice Level Adjustment" section for more information.)

Change the VAD level. Sometimes VAD cuts the sound too early and the speaker's voice is clipped. You can also change the time period that VAD waits for silence.

Clipped speech.

Reduce the input level at the listener's router. (See the "Voice Level Adjustment" section for more information)

Volume too low or missed DTMF.

Increase speaker's output level or listener's input level. (See the "Voice Level Adjustment" section for more information.)

Echo interval is greater than 25 ms (sounds like a separate voice).

Configure the echo-cancel enable command and increase the value for the echo-cancel coverage keyword. (See the "Echo Adjustment" section for more information.)

Too much echo.

Reduce the output level at the speaker's voice port. (See the "Voice Level Adjustment" section for more information.)


Delay in Voice Networks

Delay is the time it takes for voice packets to travel between two endpoints. Excessive delay can cause quality problems with real-time traffic such as voice. However, because of the speed of network links and the processing power of intermediate devices, some delay is expected.

When listening to speech, the human ear normally accepts up to about 150 ms of delay without noticing it. The ITU G.114 standard recommends no more than 150 ms of one-way delay for a normal voice conversation. Once the delay exceeds 150 ms, a conversation is more like a "walkie-talkie" conversation in which one person must wait for the other to stop speaking before beginning to talk.

Several different types of delay combine to make up the total end-to-end delay associated with voice calls:

Coder delay—Amount of time used by the digital signal processor (DSP) to compress samples.

Handling delay—Amount of time it takes to process data (adding headers, taking samples, forming packets, and so forth).

Serialization delay—Fixed delay related to the clock rate on the interface. The amount of delay needed for different frame sizes is shown in Table 45.

Table 45 Serialization Delay

Line Speed
Frame Size
1 Byte
64 Bytes
128 Bytes
256 Bytes
512 Bytes
1024 Bytes
1500 Bytes

56 kpbs

143 µs

9 ms

18 ms

36 ms

72 ms

144 ms

214 ms

64 kbps

125 µs

8 ms

16 ms

32 ms

64 ms

128 ms

187 ms

128 kbps

62.5 µs

4 ms

8 ms

16 ms

32 ms

64 ms

93 ms

256 kbps

31 µs

2 ms

4 ms

8 ms

16 ms

32 ms

46 ms

512 kbps

15.5 µs

1.28 ms

2 ms

4 ms

8 ms

16 ms

23 ms

768 kbps

10 µs

640 µs

1.28 ms

2.56 ms

5.12 ms

10.24 ms

15 ms

1536 kbps

5 µs

320 µs

640 µs

1.28 ms

2.56 ms

5.12 ms

7.5 ms


Propagation delay—Amount of time it takes the data to physically travel over the media.

Queuing delay—Amount of time lost due to congestion. Every network device between two endpoints involved in a call is a potential source of queuing or buffering delays. Use a sniffer trace at each hop to see where the delay or jitter is being introduced.

Output drops can occur because of incorrectly configured priority queuing. For information about troubleshooting output drops with priority queueing, refer to Troubleshooting Output Drops with Priority Queueing , document ID 10105.

Variable delay or jitter—Amount of time that causes the conversation to break and become unintelligible. Jitter is described in the "Jitter Adjustment" section.

You can measure delay by using ping tests at various times of the day with different network traffic loads. Sniffer traces can also be used to find where delay is being introduced in the network. For more information about measuring QoS, see the "Measuring QoS" section.

The recommended ranges for delay are shown in Table 46. These ranges are for connections in which echo is controlled. Echo cancellers are required when one-way delay exceeds 25milliseconds. For more information about echo cancellation, see the "Echo Adjustment" section. These ranges are for total end-to-end delay, not just the delay on the WAN side of a connection. For more information about developing a delay budget, refer to the "Building the Delay Budget" section of the Understanding Delay in Packet Voice Networks white paper.

Table 46 Recommended Delay Ranges

ITU Recommdation
Private Network Recommendation
Description

0 to 150 milliseconds

0 to 200 milliseconds

Acceptable for most user appliations

150 to 400 milliseconds

200 to 250 milliseconds

Acceptable if administrators are aware of the transmission time and its impact on quality.

Above 400 milliseconds

Above 250 milliseconds

Unacceptable in most situations.


Packet Loss

Packet loss is a very common cause of voice quality problems on an IP network. In a properly designed network, packet loss should be near zero. Voice codecs can tolerate some degree of packet loss without a dramatic effect on voice quality. Voice packets should be tagged for zero packet loss. On converged voice/data networks, the quantity of the voice calls and link bandwidth should be limited. The bandwidth should be guarenteed for the voice calls by giving priority to voice traffic. Packet loss can have an impact voice quality in several ways:

Packet loss can grow as call volume increases

Fax and modem transmissons are greatly affected by packet loss

A common cause of packet loss is duplex mismatching. This occurs when one side of the connection is set up for full duplex and the other is set up for half duplex. Look at the link between the two endpoints experiencing the packet loss and check the speed and duplex settings for each side.

Although duplex mismatch is common, there are many other opportunities for packet loss in the network. To find the cause of these packet drops, check each interface between two endpoints by using the show interface command. If dropped packets are showing up on any interface, the link might be oversubscribed or there might be other traffic on this link that you are not expecting. In this case, use a network analyzer (or "sniffer") to check what traffic might be congesting the link. For more information about network analyzers, see the "Network Analyzers" section on page 178.

Jitter Adjustment

Delay can cause unnatural starting and stopping of conversations, but variable-length delays (also known as jitter) can cause a conversation to break and become unintelligible. Jitter is not usually a problem with PSTN calls because the bandwidth of calls is fixed and each call has a dedicated circuit for the duration of the call. However, in VoIP networks, data traffic might be bursty, and jitter from the packet network can become an issue. Packets from the same conversation can arrive at different interpacket intervals, especially during times of network congestion, which can disrupt the steady, even delivery needed for voice calls. Cisco voice gateways have built-in jitter buffering to compensate for a certain amount of jitter; the playout-delay command can be used to adjust the jitter buffer.

Normally, the defaults in effect are sufficient for most networks. However, a small playout delay from the jitter buffer can cause lost packets and choppy audio, and a large playout delay can cause unacceptably high overall end-to-end delay.


Note For Cisco IOS Release 12.1(5)T and later, in most cases playout delay should be configured in dial-peer configuration mode on the VoIP dial peer that is on the receiving end of the voice traffic that is to be buffered. This dial peer senses network conditions and relays them to the DSPs, which adjust the jitter buffer as necessary. When multiple applications are configured on the gateway, playout delay should be configured in dial-peer configuration mode. When there are numerous dial peers to configure, it might be simpler to configure playout delay on a voice port. If there are conflicting playout delay configurations on a voice port and also on a dial peer, the dial-peer configuration takes precedence.


Jitter is more likely to occur on low-speed links because even a single packet in the queue on a low-speed link can dramatically affect the amount of time a voice packet needs to wait in the queue before being transmitted. Jitter can be an even bigger problem if you do not have priority queuing, such as low latency queuing (LLQ), enabled or configured correctly on your WAN connections. For more information about LLQ, see the Cisco IOS Quality of Service Solutions Configuration Guide. For information about troubleshooting VoIP over Point-to-Point Protocol (PPP) links with QoS for low latency queueing, refer to VoIP over PPP Links with Quality of Service (LLQ / IP RTP Priority, LFI, cRTP), document ID 7111.

Low-speed links also require special considerations when data traffic is also present to ensure that a large data packet does not cause excessive jitter. Generally on WAN links that are 768 kbps or slower, you should use some form of fragmentation and interleaving to ensure that large data packets do not starve smaller voice packets. Even with LLQ enabled, the voice packet must wait if it arrives when a data packet is in the process of being transmitted.

To configure the playout delay jitter buffer, perform the following steps.

SUMMARY STEPS

1. enable

2. configure terminal

3. voice-port slot/port:ds0-group-number

4. playout-delay mode {adaptive | fixed}

5. playout-delay {nominal value | maximum value | minimum {default | low | high}}

6. exit

 
Command
Purpose

Step 1 

enable

Example:

Router> enable

Enables higher privilege levels, such as privileged EXEC mode.

Enter your password if prompted.

Step 2 

configure {terminal | memory | network}

Example:

Router# configure terminal

Enters global configuration mode.

Step 3 

voice-port slot/port:ds0-group-number

Example:

Router(config)# voice-port 1/0:0

Enters voice-port configuration mode on the selected slot, port, and DS-0 group.

Each defined DS-0 group number is represented on a separate voice port. This allows you to define individual DS-0s on the digital T1/E1 card.

Step 4 

playout-delay mode {adaptive | fixed}

Example:

Router(config-voiceport)# playout-delay mode adaptive

Determines the mode in which the jitter buffer operates for calls on this voice port.

adaptive—Adjusts the jitter buffer size and amount of playout delay during a call based on current network conditions. This is the default.

Note Cisco recommends using the adaptive mode playout buffer as a place to begin checking QoS issues. Changing the playout buffers is an advanced technique that should be done last after all other QOS methods have been explored.

fixed—Defines the jitter buffer size as fixed so that the playout delay is not adjusted during a call. A constant playout delay is added.

Step 5 

playout-delay {nominal value | maximum value | minimum {default | low | high}}

Example:

Router(config-voiceport)# playout-delay nominal 0

Tunes the playout buffer to accommodate packet jitter caused by switches in the WAN. The keywords and arguments are as follows:

nominal—Defines the amount of playout delay applied at the beginning of a call by the jitter buffer in the gateway. In fixed mode, this is also the maximum size of the jitter buffer throughout the call.

 

value—Specifies the range which depends on the type of DSP and configured codec complexity. For medium codec complexity, the range is from 0 to 150 ms. For high codec complexity and DSPs that do not support codec complexity, the range is from 0 to 250 ms.

 

maximum (adaptive mode only)—Specifies the jitter buffer's upper limit (80 ms), or the highest value to which the adaptive delay is set.

minimum (adaptive mode only)—Specifies the jitter buffer's lower limit (10 ms), or the lowest value to which the adaptive delay is set.

default—Specifies 40 ms.

Step 6 

exit

Example:

Router(config-voiceport)# exit

Exits voice-port configuration mode.

For more information about jitter, refer to Understanding Jitter in Packet Voice Networks (Cisco IOS Platforms), document ID 18902.

Echo Adjustment

Echo is a common problem, but can sometimes be difficult to troubleshoot. Echo exists in almost any telephone network but problems are more apparent in packet networks. Echo is perceived as a problem when all of the following conditions are true:

Signal leakage between analog transmit (Tx) and receive (Rx) paths. This leakage is in one of these forms of echo:

Acoustic echoAcoustic echo is caused by poor acoustic isolation between the earpiece and the microphone in handsets and hands-free devices.

Hybrid echoHybrid echo is caused by an impedance mismatch in the hybrid circuit, such as a two-wire to four-wire interface. This mismatch causes the Tx signal to appear on the Rx signal.

Perceptible delay between when the originating signal is transmitted and when the echo returns. In most telephones, sidetone helps mask some of the echo. Echos must be delayed by at least 20 milliseconds to be perceived.

Sufficient echo amplitude. If the amplitude of the echo is low, it can go unnoticed.

The packet segment of the voice connection introduces a significant delay, typically 30 ms in each direction. The introduction of delay causes echoes generated on analog tail circuits that were normally indistinguishable from the side tone to be perceived by the user. The delay introduced by packet voice is unavoidable, therefore, the voice gateways must prevent the echo.

For a description about echo cancellation features and how echo cancellation is implemented on different Cisco platforms and Cisco IOS software releases, refer to the "Information about Echo Cancellation" section in Voice Port Configuration.

To configure echo cancellation, refer to the "How to Configure the Extended G.168 Echo Canceller" section in Voice Port Configuration.

When troubleshooting echo problems, see the following:

Determine Where Echo Is Occurring

Troubleshooting Echo in Cisco IOS Gateways

Measuring Echo in Cisco IOS Gateways

Determine Where Echo Is Occurring

When troubleshooting echo, first determine who is being affected by the echo problems.

PSTN Phone Users Hears Echo

In this case, a PSTN phone user hears echo, which is caused by acoustic coupling between the earpiece and the microphone in the IP phone handset. The solution is to use a load ID on the IP phone, which includes echo suppression on the handset and headset. Available load IDs only include echo cancellation on the speaker phone.

IP Phone User Hears Echo

In this case, an IP phone user hears echo caused by hybrids in a PSTN network. The solution is to configure and verify echo cancellation operation on a Cisco IOS gateway. The echo canceller in the voice gateway cancels the echo heard by the IP phone user.

Troubleshooting Echo in Cisco IOS Gateways

It is important to make sure that the echo canceller has enough information to distinguish between echo and voice conversation. The following parameters control the distinction:

Input level—Signal input gain is performed before the echo canceller has detected the echo.

Output level—Signal output attenuation is performed after the echo canceller has seen the original output signal.

Echo canceller coverage—The amount of time the echo canceller retains a signal that has been output. This parameter must be set to a value greater than the time the echo needs to return to the gateway.

To eliminate echo, perform the following steps.

SUMMARY STEPS

1. Verify echo cancellation.

2. Configure echo canceller coverage.

3. Measure the echo and adjust the echo signal level.

4. Verify the impedance configured in the voice port.


Step 1 Verify that echo cancellation is enabled on the voice port. Echo cancellation is enabled by default on most platforms in most Cisco IOS releases.

Gateway(config-voiceport)# echo-cancel

  coverage   Echo Cancel Coverage 
  enable     Echo Cancel Enable


Note You must enter the shut, then the no shut commands on the voice port for the changes to take effect


Step 2 Configure the echo canceller coverage to a value greater than the time the echo needs to return to the gateway. It must be long enough to cover the worst case for your environment, but not longer.

Gateway(config-voiceport)# echo-cancel coverage

  16  16 milliseconds echo canceller coverage 
  24  24 milliseconds echo canceller coverage 
  32  32 milliseconds echo canceller coverage 
  8   8 milliseconds echo canceller coverage

Note You must enter the shut and no shut commands on the voice port for the changes to take effect.


The default coverage is set to 8 ms, but it can be increased up to 64 ms, depending on the Cisco IOS software release. If the PSTN delay (tail length) is more than 32 ms, echo cancellers in Cisco IOS gateways cannot cancel the echo.

Step 3 Measure the echo and adjust the echo signal level as required.

Insufficient echo return loss (ERL) to handle the echo might cause the following problems:

Echo canceller is cancelling but not enough to make echo inaudible. If the ERL value is too low, the total ERL seen by the IP network Acombined (ACOM) might be insufficient to suppress the echo. ERL should be approximately 20 dB (at least 15 dB).

ACOM is the total ERL seen across the incoming and outgoing terminals of the echo canceller. The incoming terminal is equal to the signal sent into the ECAN toward the PSTN (voice), and the outgoing terminal is equal to the signal coming out of the ECAN toward the IP network (echo). ACOM is the sum of the ERL, plus ERLE, or the total ERL seen by the network. ACOM (Total loss) is equal to the ERL (tail loss) plus ERLE (ECAN loss).

Echo canceller is not canceling. If the ERL value is too low, the echo signal returning to the gateway might be too loud (within 6 dB of the talker signal), causing the echo canceller to consider it as voice (double-talk) instead of echo. As a consequence, the echo canceller does not cancel it. ERL should be approximately 6 dB or higher for the echo canceller to engage. In 12.2(13)T, you can configure this ERL level.

To prevent these problems, you need to measure the ERL and signal levels, and adjust the signal levels on the Cisco IOS gateway based on the results. See the"Measuring QoS" section for more information about measuring QoS. See the "Measuring Echo in Cisco IOS Gateways" section for more information about measuring ERL. You can adjust these levels by configuring positive values for output attenuation and negative values for input gain. Input gain is performed before the echo canceller has seen the echo signal, and output attenuation is performed after the echo canceller has seen the original output signal.

voice-port 1/1:15 
  input gain -3 
  output attenuation 3

Note You must enter the shut and no shut command on the voice port for the changes to take effect.



Note In Cisco IOS Release 12.2(1) and later, output attenuation can be set to a negative value, which amplifies the output signal.


Step 4 An impedance mismatch can cause echo if both sides are not configured identically. Verify the impedance configured in the voice port and modify it if needed. A default of 600 ohms is consistent with most lines on the PSTN and PBXs.

Gateway(config-voiceport)# impedance

  600c 600 Ohms complex
  600r 600 Ohms real
  900c 900 Ohms complex
  complex1 complex 1
  complex2 complex 2


Measuring Echo in Cisco IOS Gateways

If you have a phone number to which echo is reproducible, using a Cisco IP Phone 7960 or Cisco IP Phone 7940, perform the following steps to generate test tones and measure the echo return loss (ERL).

SUMMARY STEPS

1. Enable the tone generator.

2. Place a call to the source of echo.

3. Press the i button twice.

4. Set the input and output levels to 0 dB gain/attenuation.

5. View the input and output levels for your call.

6. Configure 1 dB of attenuation in each direction.

7. Configure 3 dB of attenuation in each direction.

8. Change the coverage to 32 ms.


Step 1 To enable the tone generator, type **3 on the Cisco IP Phone 7960 or 7940 keypad while the phone is not on a call. This enables the Tone softkey for as long as this phone is registered to Cisco CallManager.


Note From Load #P0030301ESP5, you need to unlock the phone first, then press **3. If you press **# **3 consecutively you reset the phone (because of the **#** sequence). Therefore, you need to press **#, make a call, then press **3.


Step 2 Place a call to the source of echo.

Step 3 After the call is established, press the i button twice. This brings up the statistics for the call.


Note If pressing **3 worked, you should have a Tone softkey available. Press the Tone softkey and the phone begins to generate a 1004 Hz tone at -15 dB. The only way to stop the tone is to end the call.


Step 4 Make sure you start with a cleared configuration by setting the input and output levels to 0 dB gain/attenuation. After the tone is being generated, keep the call up, then perform the remaining steps to measure the decibel levels.

Step 5 Use the show call active voice command to view the input and output levels for your call. The following is a call to a loopback number that simply echoes back whatever is sent with no attenuation.

Gateway# show call active voice 
  
  ! snip

  OutSignalLevel=-15 
  InSignalLevel=-15 
  ERLLevel=25 

  ! snip

The test tone in this example is output as -15 and is looped back with 0 dB loss. Therefore, the tone is coming back at -15 dB. The ERL value in the example has no significance because the echo canceller does not consider the input signal to be echo.


Note The OutSignalLevel shows the value of the level after the output attenuation has been applied to the signal. The InSignalLevel shows the value of the level after the input gain has been applied.


Step 6 If you configure 1 dB of attenuation in each direction, the resulting levels decrease, as shown in the following configuration examples:

voice-port 1/1:15
  input gain -1
  output attenuation 1

Gateway#show call active voice 

  ! snip

  OutSignalLevel=-16
  InSignalLevel=-17
  ERLLevel=11

  ! snip


Note Notice that the OutSignalLevel is -16 because the -15 dB signal is attenuated by 1 dB. The InSignalLevel is -17 dB, the result of the -1 input gain. The ERL is 11 dB in the example, but it is actually 2 dB; the echo canceller still does not acknowledge the input signal as echo.


Step 7 If you configure 3 dB of attenuation in each direction the resulting levels are shown in the following examples:

voice-port 1/1:15
  input gain -3
  output attenuation 3

Gateway#show call active voice 

  ! snip

  OutSignalLevel=-18
  InSignalLevel=-21
  ERLLevel=6

  ! snip


Note Notice that the OutSignalLevel is -18 because the -15 dB signal is attenuated by 3 dB. The InSignalLevel is -21 dB as a result of the input gain of -3. The expected ERL of 6 dB is now correct.


Step 8 If you keep the same 3 dB in each direction, but change the coverage to 32 ms, the resulting levels are shown in the following examples.


voice-port 1/1:15 
  input gain -3 
  output attenuation 3 
  echo-cancel coverage 32

Gateway#show call active voice 
                                    
  ! snip

  OutSignalLevel=-18
  InSignalLevel=-21
  ERLLevel=6
                                    
  ! snip

The levels look the same as the previous result, however the echo canceller takes a few more seconds longer to converge. Do not set the echo cancel coverage higher than necessary.

For more information about troubleshooting echo problems, refer to the following documents:

Troubleshooting Echo Problems between IP Phones and Cisco IOS Gateways, document ID 19640

Echo Analysis for Voice over IP white paper, at the following website:

http://www.cisco.com/en/US/docs/ios/solutions_docs/voip_solutions/EA_ISD.html

Voice Level Adjustment

Voice levels can require adjustment for a variety of reasons. The voice on a call might be too loud or quiet, or callers might have an issue with comfort noise generated when using voice activity detection (VAD). This section contains informaton about the following:

Input and Output Levels

Voice Activity Detection Level

Input and Output Levels

As much as possible, it is desirable to achieve a uniform input decibel level to the packet voice network. Doing so eliminates or at least reduces any voice distortion because of incorrect input and output decibel levels. Adjustments to levels might be required by the type of equipment connected to the network or by local country-specific conditions.

Incorrect input or output levels can cause echo, as can an impedance mismatch. Too much input gain can cause clipped or fuzzy voice quality. If the output level is too high at the remote router's voice port, the local caller hears an echo. If the local router's voice port input decibel level is too high, the remote side hears clipping. If the local router's voice port input decibel level is too low or the remote router's output level is too low, the remote side voice can be distorted at a very low volume, and DTMF signaling might be missed.

Use the input gain and output attenuation commands to adjust voice levels, and the impedance command to set the impedance value to match that of the voice circuit to which the voice port connects.

To change parameters related to voice levels, enter the following commands.

SUMMARY STEPS

1. enable

2. configure terminal

3. voice-port slot/port:ds0-group-number

4. input gain value

5. output attenuation value

6. impedance {600c | 600r | 900c | complex1 | complex2}

7. exit

 
Command
Purpose

Step 1 

enable

Example:

Router> enable

Enables higher privilege levels, such as privileged EXEC mode.

Enter your password if prompted.

Step 2 

configure {terminal | memory | network}

Example:

Router# configure terminal

Enters global configuration mode.

Step 3 

voice-port slot/port:ds0-group-number

Example:

Router(config)# voice-port 1/0:0

Enters voice-port configuration mode on the selected slot, port, and DS-0 group.

Each defined DS-0 group number is represented on a separate voice port. This allows you to define individual DS-0s on the digital T1/E1 card.

Step 4 

input gain value

Example:

Router(config-voiceport)# input gain 0

Specifies, in decibels, the amount of gain to be inserted at the receiver side of the interface, increasing or decreasing the signal.

After an input gain setting is changed, the voice call must be disconnected and reestablished before the change takes effect.

The value argument is any integer from -6 to 14. The default is 0.

Step 5 

output attenuation value

Example:

Router(config-voiceport)# output attenuation -6

Specifies the amount of attenuation in decibels at the transmit side of the interface, decreasing the signal.

A system-wide loss plan can be implemented through the use of the input gain and output attenuation commands.

The default value for this command is based on the assumption that a standard transmission loss plan is in effect, meaning that normally there must be -6 dB attenuation between phones.

The value argument is any integer from -6 to 14. The default is 0.

Step 6 

impedance {600c | 600r | 900c | complex1 | complex2}

Example:

Router(config-voiceport)# impedance 600r

Specifies the terminating impedance of a voice port interface, which needs to match the specifications from the specific telephony system to which it is connected.

The following values are supported:

600c—Specifies 600 ohms complex

600r—Specifies 600 ohms real (default)

900c—Specifies 900 ohms complex

complex1—Specifies Complex 1

complex2—Specifies Complex 2

Step 7 

exit

Example:

Router(config-voiceport)# exit

Exits voice-port configuration mode.

Voice Activity Detection Level

Another way to reduce clipped or fuzzy speech is to change the VAD level. Sometimes VAD cuts the sound too early and the speaker's voice is clipped. Use the vad and no vad commands in dial-peer configuration mode to enable and disable VAD.

With VAD, voice data packets fall into three categories: speech, silence, and unknown. Speech and unknown packets are sent over the network; silence packets are discarded. The sound quality is slightly degraded with VAD, but the connection monopolizes much less bandwidth. If you use the no form of this command, VAD is disabled and voice data is continuously sent to the IP backbone.

When the aggressive keyword is used, the VAD noise threshold is reduced from -78 to -62 dBm. Noise that falls below the -62 dBm threshold is considered to be silence and is not sent over the network. Additionally, unknown packets are considered to be silence and are discarded.

You can also change the amount of time that VAD waits for silence. Use the voice vad-time command in global configuration mode to change the minimum silence detection time. For example, setting the VAD time to 3000 allows 30 seconds of silence before VAD is initiated.

On gateways that use MGCP, the call agent controls the amount of VAD. For H.323 gateways, VAD must be disabled on the gateway itself. VAD is enabled by default on H.323 gateways. To disable VAD, you must match a VoIP dial peer that has the no vad command configured.

Some codecs, such as G.729b and G.729ab, have VAD built into them and cannot be diabled. If you do not want to use VAD, use the standard G.729 or G.729a codecs instead.

Hissing or Static While You Are Using Voice Activity Detector

The VAD detects silence periods in the voice signal and temporarily discontinues transmission of the signal during these periods. This saves bandwidth and allows the far-end to adjust its jitter buffer. The downside is that the far-end phone has to generate its own signal to play to the listener during silence periods. Usually comfort noise is played out to the listener to mask the absence of an audio signal from the far-end. Comfort noise is usually modeled on the far-end noise so that there is not a stark contrast between the two. Sometimes there can be unwanted noise generated by VAD. To troubleshoot hissing or static issues that might be because of the VAD, refer to Troubleshooting Hissing and Static, document ID 22388.

Voice Call Tuning

The Voice Call Tuning feature monitors the interface between Cisco IOS software and a system's DSPs in real time and reports status on the following: packet flow, DSP state, echo-cancellation state, and jitter state. The feature also allows you to manipulate echo-cancellation and jitter-buffer parameters in real time.

The feature is part of the standard product and is supported under normal Cisco Technical Assistance Center (TAC) procedures. No new code is required and there are no configuration tasks for this feature. It is backward compatible with older versions of Cisco IOS software, Cisco VCWare, and Cisco voice DSP code base (DSPWare).

You should understand the following concepts to use this feature:

Restrictions for Voice Call Tuning

Information About Voice Call Tuning

How to Verify Voice Call Tuning Functionality

Voice Call Tuning Configuration Examples

Restrictions for Voice Call Tuning

If you wish to use this feature on a Cisco AS5300 platform, refer to the Combined Version Release Notes for Cisco VCWare on Cisco AS5300 Universal Access Servers/Voice Gateways. That document tells you which Cisco VCWare to use with this feature.

Information About Voice Call Tuning

To configure the Voice Call Tuning feature, you should understand the following concepts:

Packet-Flow Detection

DSP State

Echo-Cancellation State

Jitter-Buffer Parameters

Packet-Flow Detection

The Voice Call Tuning feature allows you to determine whether packets are flowing in each direction while a call is in progress.

The analog signal from the telephone is digitized into pulse code modulation (PCM) signals by the voice coder-decoder (codec). The PCM samples are then passed to the compression algorithm which compresses the voice into a packet format for transmission across the WAN. On the far side of the cloud similar functions are performed but in reverse order.

Depending on how the network is configured, the router or gateway can perform both the codec and compression functions or only one of them. For example, if an analog voice system is used, then the router or gateway performs the codec function and the compression function.

DSP State

The Voice Call Tuning feature allows you to check whether the DSP servicing an active call is functioning properly. Explicit configuration of a periodic ping message with both the period and timeout parameters configurable catches DSPs that are in a hung state as soon as possible. A failure can then signal this event to the console log or as a triggering event to a logging functionality. The DSP can also send periodic informational messages like jitter measures, echo canceller measures, and alarms to alert you if there is an impending problem.

Echo-Cancellation State

Echo is the sound of your own voice reverberating in the telephone receiver while you are talking. When timed properly, echo is not a problem in the conversation; however, if the echo interval exceeds approximately 25 ms, it can be distracting to the speaker. Echo is controlled by ECs. By design, ECs are limited by the total amount of time they wait for the reflected speech to be received, which is known as an echo tail. The echo tail is normally 32 ms.

In the traditional telephony network, echo is generally caused by an impedance mismatch when the four-wire network is converted to the two-wire local loop. Echo cancellation is required because of packet network latency.

Echo cancellation is implemented in DSP firmware on the gateways and is independent of other functions implemented in the DSP (the DSP protocol and compression algorithm). In voice packet-based networks, ECs are built into the low-bit-rate codecs and are operated on each DSP.

This feature gives you the ability to change echo canceller parameters while a call is in progress. Audible effects are immediately noticed, aiding in problem determination and resolution. You can change the echo canceller parameters (tail length and echo return loss (ERL) threshold) in the field.

Jitter-Buffer Parameters

Jitter is a variation in the delay of received packets. At the sending side, packets are sent in a continuous stream with the packets being spaced evenly apart. Due to network congestion, improper queuing, or configuration errors, this steady stream can become erratic, or the delay between and two packets can vary instead of remaining constant.

This feature gives you the ability to change jitter-buffer parameters while a call is in progress. Audible effects are immediately noticed, aiding in problem determination and resolution. You can change the jitter buffer parameters (delay, size, fixed state, or adaptive state) in the field.

How to Verify Voice Call Tuning Functionality

There are no configuration tasks for this feature. However, you can verify that the Voice Call Tuning feature is operating on your system by performing the following tasks:

Use the show vfc version command to show the version of the software that resides on your voice feature card (VFC). This command shows information in the output of the show vfc version vcware and show vfc version dspware commands that indicates whether the Cisco VCWare or DSPWare is compatible with the Cisco IOS image.

Use the show voice call command to show the real-time call status for voice ports, including packet flow indication, DSP state, echo canceller state, and jitter state. If you enable terminal monitor before doing this, you can also see the DSP and playout buffer statistics, overflow specifications, late packets, lost packets, and "concealment 9," in which the DSP invents a packet using interpolation.

Use the show voice dsp command to show the status of all DSP voice channels when abnormal behavior in the DSP voice channels occurs.

Use the test call id command to manipulate echo canceller and jitter-buffer parameters in real time. You can use this command with the extended G.168 echo canceller, which allows you to configure the voice card in a router individually, or with the Cisco G.165 echo canceller, which allows you to configure the router as a whole. Messages are visible in the command output when either an extended-only or a standard-only echo cancellation is requested, as in the following example:

Extended echo canceller not active for CallID callID
Basic echo canceller not active for CallID callID

Voice Call Tuning Configuration Examples

There are no specific configuration examples for the Voice Call Tuning feature, but you can verify that the Voice Call Tuning feature is operating on your system by performing the following tasks:

Use the show vfc version command to show the version of the software that resides on your VFC. This command was modified to include new information in the output of the show vfc version vcware and show vfc version dspware commands. Messages are output if the Cisco VCWare or DSPWare is not compatible with the Cisco IOS image. The new information is advisory only, so there is no action taken if the software is compatible or incompatible.

Cisco IOS Release 12.2(13)T adds new information to the output of the show vfc version vcware and show vfc version dspware commands. Messages are output if the Cisco VCWare or DSPWare is not compatible with the Cisco IOS image. The new information is advisory only, so there is no action taken if the software is compatible or incompatible.

If the versions detected fall within the defined criteria and are compatible, nothing is output at bootup time. A confirmation line is output when the show vfc version vcware and show vfc version dspware commands are used, as in the following example:

Router# show vfc 1 version vcware

Voice Feature Card in Slot 1:
VCWare Version     : 7.35
ROM Monitor Version: 1.3
     DSPWare Version    : 3.4.46L
     Technology         : C549
VCWare/DSPWare version compatibility OK

Use the show voice call command to show the real-time call status for voice ports, including packet flow indication, DSP state, echo canceller state, and jitter state. This command was modified with the status, call-id, and sample sample-period command options. This command is available on all voice platforms.

You can use the call-id argument to identify active calls. If the call-id argument is omitted, the enquiry shows all active voice calls. In the following example, a list of all active calls with relevant identifying information is shown, as in the following example:

Router# show voice call status

CallID    CID    ccVdb       Port     DSP/Ch  Called #   Codec    Dial-peers
0x3       11D4   0x62972834  1/0/0    1/1     10001      g711ulaw 1/2
0x4       11D4   0x62973AD0  1/0/1    2/1    *10001      g711ulaw 2/1
0xA       11DB   0x62FE9D68  1/1/0    3/1    *2692       g729r8   0/2692
2 active calls found

Use the test call id command to manipulate the echo canceller and jitter buffer parameters in real time. You can use this command with the extended echo canceller, which allows you to configure the voice card in a router individually, or with the standard echo canceller, in which the configuration occurs implicitly on the router.

The following example shows query output from a Cisco AS5350 universal gateway using the NextPort version of the standard echo canceller:

Router# test call id 99 ?

  echo-canceller  test echo canceller on an active voice call
  playout-delay   test playout-delay parameters