Warren Burstein
2005-Feb-21 15:50 UTC
[Asterisk-Users] some questions about busy detection
I'm going to be hooking FXS lines on a TDM400 to a PBX which doesn't drop line voltage at the end of a call, so I'm going to have to use busy detection. A few questions - The tones are taken from the tones specified by the zone in zaptel.conf, right? Which tones cause hangup? The PBX may not use the national standard tones. Does anyone have any suggestion for how I can determine what tones it uses if the information is not in the PBX manual? Back when I used to use Dialogic cards, there was a program called PBXpert (or something like that) which would measure all the PBX's tones. But I think all I need is to record a tone and get a program that would tell me what tones/cadence are in the sample. Cadence I could probably figure out from any graphical sound editor, tones too if it's single-frequency, but what if it's dual-frequency? Is there a sound editor (free, or at least with an evaluation version that has this feature) that would do this for me? thanks
Warren Burstein
2005-Feb-22 14:11 UTC
[Asterisk-Users] Re: some questions about busy detection
Warren Burstein wrote:> I'm going to be hooking FXS lines on a TDM400 to a PBX which doesn't > drop line voltage at the end of a call, so I'm going to have to use > busy detection. A few questions - > > The tones are taken from the tones specified by the zone in > zaptel.conf, right? Which tones cause hangup? > > The PBX may not use the national standard tones. Does anyone have any > suggestion for how I can determine what tones it uses if the > information is not in the PBX manual? Back when I used to use > Dialogic cards, there was a program called PBXpert (or something like > that) which would measure all the PBX's tones. But I think all I need > is to record a tone and get a program that would tell me what > tones/cadence are in the sample. Cadence I could probably figure out > from any graphical sound editor, tones too if it's single-frequency, > but what if it's dual-frequency? Is there a sound editor (free, or at > least with an evaluation version that has this feature) that would do > this for me?Well I wound up answering my own question. It turned out that asterisk was able to hang up when the PBX ended a call, but a separate IVR system connected to the PBX wasn't disconnecting when asterisk ended a call. So I dialed into the IVR from a local phone, an external phone, and from asterisk, went into voicemail, and hung up. Now I had wave files with all three termination tones - the IVR left a few cycles of the tones it got on local and remote hangups in the voicemail (because it recognized those tones and stopped recording, but fortunately left what it had already heard so far in the file) and quite a lot of the asterisk tone (because it didn't recognize it, good thing there is a limit on voicemail messages in the IVR or I would still be waiting for it to finish). I remembered that I used to use an editor on Windows named Cool Edit, that did frequency analysis. The current version turns out to be a rather expensive program for something I don't need to run all that often (there is also a time-limited demo version of the current product), but I found an old shareware version at http://www.threechords.com/hammerhead/cool_edit_96.shtml. Highlight a section of the sound, and it tells you how long it lasts, and hit alt-Z and it performs a frequency analysis on the highlighted section. It turned out that a disconnected internal call left a fast-busy, 400/500, 0/500, an external call left the same but both parts were 250 msec, and a call from asterisk ended with 480+620/250, 0/250, which is ZT_TONE_CONGESTION in zaptel's zonedata.c (I am using the US tones). The easiest thing was to just change the congestion tone there to 400/250,0/250, restart everything, and it now works. Now I'm wondering if asterisk detected the fast and slow busy tones (maybe not, because they're not the US busy tones), or if the PBX dropped voltage.