[Asterisk-Dev] [PATCH] busy detect toneonly typpo

Julian J. M. julianjm at gmail.com
Mon Jan 10 20:18:08 MST 2005


Hello,

I'm new to this list. My name is Julian J. M., and i've been playing
with asterisk and a Digium TDM400P (TDM11B) for 2 weeks... I've had
problems with busy detect, here in Spain. According to some cisco
documentation, here are the diferent signals reported by the telco:

Dial: 425Hz -10dB
     Continuous

Ringback: 425Hz -10dB
    1.5 seconds on,
    4.0 seconds off,
    REPEATED
	
Busy: 425Hz -10dB
    0.2 seconds on,
    0.2 seconds off,
    REPEATED

Fast Busy: 425Hz -10dB
    0.2 seconds on,
    0.2 seconds off,
    0.2 seconds on,
    0.2 seconds off,
    0.2 seconds on,
    0.6 seconds off,
    REPEATED


Busy is detected fine, because both tone and silence are the same
length... The real problem is Fast Busy, which has an extra 0.4
seconds silence every 3 tones. Reading the mailing lists, one posible
solution is adding -DBUSYDETECT_TONEONLY to the Makefile, so that only
tones are taken into account. This method has a typo in dsp.c, to
which I'm sending a patch... Now I can detect without problems that
signal.

Anyway, I think the solution would be implementing callprogress for
the above tone plan. Can anyone give me a clue about it? Standard busy
detect (MARTIN) just looks for patterns of noise/silence... What i'd
need is just check for that patterns BUT with noise being a 425Hz
tone. That would eliminate the possible sporadic hangups.

Anyway, thanks for developing asterisk... Apply this (trivial) patch
if you consider it's ok:

Index: dsp.c
===================================================================
RCS file: /usr/cvsroot/asterisk/dsp.c,v
retrieving revision 1.35
diff -u -r1.35 dsp.c
--- dsp.c       3 Jan 2005 01:21:15 -0000       1.35
+++ dsp.c       11 Jan 2005 03:01:28 -0000
@@ -1196,10 +1196,10 @@
                }
 #endif
                if (avgtone > dsp->historicnoise[x]) {
-                       if (avgtone - (avgtone / BUSY_PERCENT) <=
dsp->historicsilence[x])
+                       if (avgtone - (avgtone / BUSY_PERCENT) <=
dsp->historicnoise[x])
                                hittone++;
                } else {
-                       if (avgtone + (avgtone / BUSY_PERCENT) >=
dsp->historicsilence[x])
+                       if (avgtone + (avgtone / BUSY_PERCENT) >=
dsp->historicnoise[x])
                                hittone++;
                }
        }


Greetings
Julian J. M.



More information about the asterisk-dev mailing list