Search This Blog

Sunday, May 17, 2009

Cisco FXO Disconnect issue

Cisco FXO Disconnect issue

Prob:
~~~~
The most common symptoms of this problem are phones that continue to ring when the caller has cleared, or FXO ports that remain busy after the previous call should have been cleared.

Refer Cisco document (Understanding FXO Disconnect Problem)
Refer external source (Understanding FXO Disconnect Problem)


Solution :
~~~~~~~
FXO port dont know the diconnect frequency used in pstn line. we solve this issue by capturing the parameters( frequency and cadence)

create a custom cptone using the command ' voice class custom-cptone '
using this command we can customize disconnect tone,busy tone,pstn line parameter....

how to capture PSTN parameters for FXO disconnect ???


Method 1:

~~~~~~~

Goto the following webpage (World PSTN Tone Database)

webpage contains international call progress tones

search your country and select tone

then

voice class custom-cptone
dualtone disconnect
frequency
cadence ...

On your FXO port, you will want a configuration similar to:

voice-port 0/0/0
supervisory custom-cptone
cptone
supervisory disconnect dualtone mid-call
connection plar


how to capture PSTN parameters for FXO disconnect ???

Method 2:

~~~~~~~
method is documented in the following link (capture PSTN parameters for FXO disconnet)

for this method

we need two software

1) Wireshark (download)

wireshark is a packet sniffer , here we use wireshark for capturing packet and using these packet we create a audio file and extract disconnect frequency and cadence value.

2) Cool Edit Pro (download)

used for measuring disconnect frequency and cadence value

Getting the packet capture:
~~~~~~~~~~~~~~~~~~~~~

you can get it from the back of your phone. In CUCM, on the phone page, enable Span to PC Port and reset. In CME, use this command under telephony-service and reset
"service phone spanToPCPort 0". On the phone you can confirm: Model Information -> Ethernet Information -> Span to PC Port should be "Yes".

If above method is not working use monitor session command




Getting the packet capture:
Start your packet capture. Place call from FXO to IP phone. Hang up on the FXO and listen to the disconnect tone for 10 seconds. Stop the packet capture.

wireshark captured the voice packet which contains the disconnect sound(frequency)

we need to convert these packets to audio file format
follow the instruction given below:

If the blue voice packets show up as UDP instead of RTP, you'll need to decode them. Right click on one of the UDP packets(blue packets ,depends on wireshark config)
select "Decode As". In the list, you should choose RTP.

Then go to Statistics->RTP->Show all Streams. You should click on the stream from your gateway IP address to your IP phone. Click "Analyze Stream".

This will show you the stream analysis from the gateway to the IP phone. At the bottom you should be able to click "Save Payload". You need to choose the forward direction, and .au as the format. Then choose the filename.

now we have the audio file in .au format

{ Optional method :
You may use your PC (START => Program Files =>Accessories => Multi Media => Recorder) with Headset or Microphone to record the disconnect tone via a telephone set from PSTN/PBX and save to a voice file. }

Determining your frequencies and cadence:



Open the audio file in Cool Edit. You should be able to listen to the stream and confirm it's what you heard from the gateway.



Skip to the part where the disconnect tone is. Highlight the part that is the tone.


Go to Analyze-> Frequency Analysis. This will give you the Time Domain of the audio you have selected.



For DTMF and disconnect tones, you should see 2 distinct spikes in the frequency domain. 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.

To determine the cadence (on/off timing), you need to zoom in on the tones. Select only the 'on' part of the tone - the part you can hear. Go to View->Display Time Format->Decimal.


In the lower right hand corner, it should give you the "Length 0:00.xxx". This value is in milliseconds and is what you'll use in your custom disconnect class. Record this - this is your ON cadence.

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 time.

Continue to do this for each ON/OFF until there is a pattern.


You will then enter this into your router:

voice class custom-cptone
dualtone disconnect
frequency
cadence ...

Note: You want to use 3 or more values here for best results.

On your FXO port, you will want a configuration similar to:

voice-port 0/0/0
supervisory custom-cptone
cptone
supervisory disconnect dualtone mid-call
connection plar


###############################################################
#############################The EnD############################
###############################################################

14 comments:

Sephiroth said...

This method is awesome. TAC did not know my TELCO frequency so I had to use this method xD

Emad said...

Dear Sir,

I can't seem to figure out the FXO config for Bahrain?

can you please help?
alsindi@gmail.com

rustom said...

hi i cant seem to figure out the cp tone from the capture. would it be possible for you to analyse the recording and reply it to me...?

Anonymous said...

Worked for me a Well. I'm in the US and I'm using MagicJack as my telco simulation. Below is the example of the code that worked best for me:

voice class custom-cptone magicJack
dualtone disconnect
frequency 480 620
cadence 255 255 255

voice-port 0/3/0
supervisory disconnect dualtone mid-call
supervisory custom-cptone magicJack
timeouts call-disconnect 2
timing hookflash-out 500
connection plar opx 5551000
caller-id enable

Replace values as needed. Thanks for help

Anonymous said...

connection plar opx (Operator number) will do the trick.

Gustavo Romero said...

Thank you for this great post.

I have been looking for the solution for my lines in Mexico with Telmex (the main Telco here) for more than a year and was unable to find the disconnect tone and cadence values.

Really really thank you very much!

Gustavo R.

Anonymous said...

Thanks to Rohan for this post, you are a life saver! I will try this method for our client that having issue with FXO on UC540. I raised a ticket with Cisco TAC but 2 weeks after getting the PCM captures the Engr advised me to Factory Reset the device and re-do all the configurations using CCA. I asked them the PCM diagnostic results specifically regarding the Disconnect Tone and Cadence but they skip to answer the question.

I have a copy of the PCM captaure (.dat), does anybody knows how to get the Frequency and Cadence from .dat file? I tried Audacity but I dont know the correct parameters to use.

Thanks Guys

Anonymous said...
This comment has been removed by a blog administrator.
Anonymous said...

bookmarked!!, I love your web site!

Also visit my web-site check it out
My website > recommended reading

Anonymous said...

Everyone loves it when people get together and share opinions.
Great site, keep it up!

Feel free to surf to my web page; low carb foods

Anonymous said...

simply dropping by to say hi

Anonymous said...

I'm extremely impressed with your writing skills as well as with the layout on your weblog. Is this a paid theme or did you modify it yourself? Anyway keep up the nice quality writing, it is rare to see a nice blog like this one today.

Also visit my website; I loved This

Matt said...

Hi,

I did method 1 and got the below for the UK

Frequency 400
Cadence 0.375 on and 0.375 off

My IOS is Version 12.2(7r)XM2

My config

r-voice(cfg-cp-dualtone)#cadence ?
<50-10000> First On cadence
continuous Configure continuous cadence

So no option to add 0.375 ????

Can you advise? Do I need to convert this figure?

Thanks

Matt
matthew.dearden@nhs.net

Horacio Diaz Requejo said...

Great Post !!!

Thanks for Sharing this information. After few years I finally resolve the FXO mistery with TELMEX in Mexico.

Regards !!!!