Troubleshoot Audio Issues on PRI/FXO and FXO Disconnect Issue Using PCM
There are cases/situations where we have to configure custome CPTONE to resolve FXO disconnect issue. Following are situations which can arise due to FXO disconnect issue:
- Phone A calls Phone B, Phone B does not answer. Phone A then goes on-hook but Phone B keeps on ringing.
- FXO ports remains busy/off-hook even if the call has been cleared.
So, to resolve FXO disconnect issue we can configure custome CPTONE. Cisco router’s have CPTONE which can be applied on FXO ports based on the country (standard countries, e.g.: US, UK, INDIA). But for countries other than standard countries, where TELCO uses different frequencies to send the calls, we have to configure custom CPTONE.
We will go through following steps in this documents.
- Collecting PCM captures on FXO port for any affected call.
- Analysing PCM captures using pcet tool to get SIN tone.
- Using Cool EditPro software to find Cadence and Frequency of the SIN tone.
- Configuring custome CPTONE using the Cadence and frequency.
- Applying the custome CPTONE on FXO port.
- Let’s start with collecting PCM captures. Below are the commands to collect PCM captures on Cisco router.
Run below commands: (Use the below commands on IOS 15.2 and above)
voice pcm capture buffer 200000
voice pcm capture destination flash:TAC.dat
>> Make a test call and keep the call active. (Use this step if we are unaware of the port number through which call is coming)
>> Check “show voice call status” output
For example If the output is as below.
VG01#sh voice call status
CallID CID ccVdb Port Slot/DSP:Ch Called # Codec MLPP Dial-peers
0x129C 0 0x3FB6A80C 0/0/0 0/1:2 *4444 g722-64 7217002/7217004
1 active call found
Make a note of port number, copy the same and paste it in below command:
test voice port 0/0/0 pcm-dump caplog 7 duration 255
Once the issue is reproduced disconnect the phone and check if there is a PCM file in the flash or not.
Check “show flash: | i TAC.dat”
PCM file name would look like : TAC.datX-0_1_2-15_46_10_Dec_5_18.dat
If it’s available disable the PCM configuration
conf t#no voice pcm capture buffer
conf t# no voice pcm capture destination
>>Transfer/copy the PCM file to your system.
>>Rename the the PCM file to <Filename.dat> only. E.g.: TAC.dat. (Remove datX-0_1_2-15_46_10_Dec_5_18 from the file name). This is done because sometimes the PCET tool does not accepts original PCM file name.
- Analysing PCM captures using pcet tool to extract SIN tone. a. Open pcet.cisco.com>>Click to select a file>>select the PCM file*.dat)>>>Open>>>Decode PCM.
Note: PCET tool can be accessed only when you have a Cisco credentials else you have to open a TAC case.
b. You will see three files as output: RIN.pcm.wav, SIN.pcm.wav and SOUT.pcm.wav.
Q: What are all audio these files I am seeing?
A1: Files ending with “rin” contain audio received from IP going towards the PSTN.
A2: Files ending with “sin” contain audio received from the PSTN going towards IP, before the DSP does any processing.
A3: Files ending with “sout” contain audio received from the PSTN going towards IP, after the DSP processes the audio. Things like echo cancellation and input gain adjustments are visible here.
Below image explains RIN, SIN and SOUT.
a. So, we have to analyze the SIN file.
b. Download SIN.pcm.wav file.
Till here, the same method can be used to troubleshoot audio related issues on PRI and FXO. If you hear a bad audio in SIN tone, that means the problem is from non-IP side (Provider). And if you hear the bad audio in RIN tone, then the problem is from IP side (our enterprise network)
3. Using Cool EditPro software to find Cadence and Frequency of the SIN tone.(For FXO disconnect issue) . Cool EditPro can be downloaded from Google.
a. Open Cool edit Pro>>Go to File>>Open>>Select the SIN.pcm.wav file from the location on your system>>Open
b. You will see the below screen.
c. To determine the Cadence values (On/Off Tone or on/off timing), you need to zoom in the tones. Select only the ‘on’ part of the tone- the part you can hear. In the lower right hand corner, it should give you the “Length 0:00.xxx”. This value is in miliseconds. Record this – this is your ON-Tone. In the below image, value of On-Tone is 101. (see the Length value on the right-bottom corner)
d. Next, select the empty area between your first and second tones. Look towards the Length field again and record this value, this is your first OFF-tone. In the below image, value of Off-Tone is 99. (see the Length value on the right-bottom corner).
Note: Continue to do this for at least 2 to 3 On/Off tones.
e. To measure the frequency of the tone, go to Analyze>>Show Frequency Analysis. This will give you the time domain of the audio you have selected. Hover your mouse over the tip of the spike, and you will find out the frequency. For a disconnect tone, you should have either one or two tones, record these values.
4. Configure custome CPTONE using the Cadence and frequency.
(Config)#voice class custom-cptone TAC_TEST
dualtone disconnect
frequency <the frequency that you have note down>
Cadence On-Tone Off-Tone On-Tone Off-Tone
(Config)#voice class dualtone-detect-params 1
cadence-variation 10
freq-max-deviation 10
Cadence-variation and freq-max-deviation values can be different and greater than 10. Here it is just a sample config.
To specify the cadence variation time allowed for detection of a tone, use the cadence-variation command in voice-class configuration mode. To restore the default cadence variation time, use the no form of this command.
To specify the maximum frequency deviation allowed in a tone, use the freq-max-deviation command in voice-class configuration mode. To reset to the default maximum frequency deviation, use the no form of this command.
5. Apply the custome CPTONE on FXO port
voice-port 0/2/0
supervisory disconnect dualtone mid-call
supervisory custom-cptone TAC_TEST
supervisory dualtone-detect-params 1
timeouts call-disconnect 1
timeouts wait-release 1
shut
no shut
I have experience of 6+ Years in Cisco VoIP. I have worked on most of the Cisco Voice products: CUCM, CUC, IM&P, Cisco VGs, CUBE, CME, CUE. I have also experience working on vCenter and UCS. I’m an ex Cisco TAC engineer and have expertise in working on Voice Gateways and CUBE. I’m certified in CCNA (R&S) and SIP School Certified Associate(SSCA). I also run a YT channel to share my knowledge on Cisco Voice Gateways.