|Summary:||ASTERISK-04708: [patch] add busypattern= to zapata.conf so end-of-call busydetector can know and detect actual busy tone lengths|
|Reporter:||Steve Davies . (stevedavies)||Labels:|
|Date Opened:||2005-07-27 13:03:29||Date Closed:||2008-01-15 15:44:02.000-0600|
|Environment:||Attachments:||( 0) asterisk-patch-busypattern.patch|
|Description:||The existing zapata end-of-call busydetector works by listening out for any regular, repeating pattern of sound-silence-sound-silence. This is prone to false positives - which results in calls being cut off.|
Turning off the busy detector causes problems of its own as people route inbound calls to voicemail and queues and suchlike and get annoyed when Asterisk doesn't know the caller abandoned and hangs on to "phantom" calls.
This patch allows you to tell Asterisk the exact tone and silence lengths, which for me completely eliminates false positives but still reliably detects hangups.
Asterisk behaves exactly as before until you put the "busypattern" setting into your zapata.conf so no backward-compatibility issues.
This patch also fixes a minor bug in the dsp routines: the BUSY_PERCENT value is advertised as a percent but isn't actually used that way in the code. For the default of 10% the calcs come out the same, but for other values the code isn't right. I've included a fix.
Please try out - this patch has completely stopped us having to make excuses for the analogue boards and busydetect!
|Comments:||By: twisted (twisted) 2005-07-27 16:38:53|
shouldn't this just use the busy indication from indications.conf instead? perhaps we should add a new entry there as disconnect= to handle exactly this...
By: Steve Davies . (stevedavies) 2005-07-28 09:38:00
don't mind looking at that if its the consensus.
By: cmaj (cmaj) 2005-08-05 19:48:45
I think indications.conf should stick to tone generation. Perhaps make indications.conf a little clearer in specifying that is in fact only for tone generation and not detection.
Putting this patch into zapata.conf flows better with the busy* lines already there.
By: Mark Spencer (markster) 2005-08-07 10:16:05
Great idea for a ptach, well implemented...
A few comments:
1) Seems to be some superfluous messages. Those should probably be DEBUG not NOTICE....
2) Your patch changes the default 10% to 15%... Why?
3) You divide by 200 instead of 100 when comparing the pattern... If you want to use another level of accuracy for that, make it a new define, don't divide the same parameter by a larger number.
I could make the changes for #1 and #3 no problem, but knowing the answer to #2 is pretty important :)
Thanks for the contribution!
By: Steve Davies . (stevedavies) 2005-08-07 12:17:22
I'm away on a break and connected over GPRS (cellphone). I'll be back on Tuesday evening and I'll respond to your comments in more detail then if you need me to.
The "200" is just an abbrievated way of adding an additional /2 into the calculation. The extra / 2 had the purpose that a "10%" BUSY_PERCENT should mean a permitted 10% error which would mean up to 5% too short or 5% too long.
The change to 15% was just a practical change based on testing the patch against our local tones. I found that at 10% it was sometimes just a bit slow to hit a match. especailly if the busy count was set up at 6 or something.
I guess I think it all should be one BUSY_PERCENT, but I wouldn't have a problem with you (or me) putting BUSY_PERCENT back to 10 and changing those /200s to /100s if that's what you want. It will leave the other busy detection behaviour exactly as was and just make my detector a little more forgiving.
(I dont want it too forgiving, though, otherwise we are back as false positives).
By: Mark Spencer (markster) 2005-08-07 20:05:22
Added to CVS (with mods), your explanations were fine.
By: Digium Subversion (svnbot) 2008-01-15 15:44:02.000-0600
r6304 | markster | 2008-01-15 15:44:01 -0600 (Tue, 15 Jan 2008) | 2 lines
Merge steve's busy detect stuff (bug ASTERISK-4708)