2002-12-12 10:37:42

by Roy Sigurd Karlsbakk

[permalink] [raw]
Subject: i4l dtmf errors

hi

it seems isdn4linux detects DTMF tones from normal speach. This is rather
annoying when using i4l for voice with Asterisk.org. This is tested on all
recent kernels

see thread "[MGCP] Asterisk/D-Link phones generates ugly DTMF tones!!!" at
http://www.marko.net/asterisk/archives/ for more info.

roy
--
Roy Sigurd Karlsbakk, Datavaktmester
ProntoTV AS - http://www.pronto.tv/
Tel: +47 9801 3356

Computers are like air conditioners.
They stop working when you open Windows.


2002-12-12 12:02:20

by Matti Aarnio

[permalink] [raw]
Subject: Re: i4l dtmf errors

This is possibly more of [email protected] list thing,
than linux-kernel per se.

On Thu, Dec 12, 2002 at 11:45:26AM +0100, Roy Sigurd Karlsbakk wrote:
> hi
>
> it seems isdn4linux detects DTMF tones from normal speach. This is rather
> annoying when using i4l for voice with Asterisk.org. This is tested on all
> recent kernels
>
> see thread "[MGCP] Asterisk/D-Link phones generates ugly DTMF tones!!!" at
> http://www.marko.net/asterisk/archives/ for more info.

Quick reading of drivers/isdn/isdn_audio.c(*) shows that it does use
fixed-point G?rtzel (Goertzel in english) algorithm for detecting
tones, but it does _not_ do comparison of received overall signal
power vs. detected DTMF tone powers.

When there is signal power outside the DTMF channels, signal should
not be detected. Also, DTMF tone powers should be roughly equal,
and exactly two tones should be present for valid detection.

http://www.numerix-dsp.com/goertzel.html

Adding those power tests should be fairly trivial, but I leave it
to Somebody Else...

(*) kernel version I looked upon was 2.4.16-0.11custom -- some RH kernel

> roy
> --
> Roy Sigurd Karlsbakk, Datavaktmester
> ProntoTV AS - http://www.pronto.tv/
> Tel: +47 9801 3356

/Matti Aarnio

2002-12-14 14:46:44

by Roy Sigurd Karlsbakk

[permalink] [raw]
Subject: Re: i4l dtmf errors

> Quick reading of drivers/isdn/isdn_audio.c(*) shows that it does use
> fixed-point G?rtzel (Goertzel in english) algorithm for detecting
> tones, but it does _not_ do comparison of received overall signal
> power vs. detected DTMF tone powers.
>
> When there is signal power outside the DTMF channels, signal should
> not be detected. Also, DTMF tone powers should be roughly equal,
> and exactly two tones should be present for valid detection.
>
> http://www.numerix-dsp.com/goertzel.html
>
> Adding those power tests should be fairly trivial, but I leave it
> to Somebody Else...

Is there a 'somebody else' (perhaps the isdn maintainer?) that have time to
look at this?

thanks

roy
--
Roy Sigurd Karlsbakk, Datavaktmester
ProntoTV AS - http://www.pronto.tv/
Tel: +47 9801 3356

Computers are like air conditioners.
They stop working when you open Windows.

2002-12-14 20:45:32

by Wolfgang Fritz

[permalink] [raw]
Subject: Re: i4l dtmf errors

Roy Sigurd Karlsbakk wrote:

> hi
>
> it seems isdn4linux detects DTMF tones from normal speach. This is
> rather annoying when using i4l for voice with Asterisk.org. This is
> tested on all recent kernels

The DTMF detection is broken since kernel 2.0.x. I have a patch for a
2.2 kernel which may manually be applied 2.4 kernels with some manual
work. It fixes an overflow problem in the goertzel algorithm (which
does the basic tone detection) and changes the algorithm to detect the
DTMF pairs. If interested, I can try to recover that patch.

Wolfgang

>
> see thread "[MGCP] Asterisk/D-Link phones generates ugly DTMF
> tones!!!" at http://www.marko.net/asterisk/archives/ for more info.
>
> roy


2002-12-14 23:06:52

by Kai Germaschewski

[permalink] [raw]
Subject: Re: i4l dtmf errors

On Sat, 14 Dec 2002, Wolfgang Fritz wrote:

> > it seems isdn4linux detects DTMF tones from normal speach. This is
> > rather annoying when using i4l for voice with Asterisk.org. This is
> > tested on all recent kernels
>
> The DTMF detection is broken since kernel 2.0.x. I have a patch for a
> 2.2 kernel which may manually be applied 2.4 kernels with some manual
> work. It fixes an overflow problem in the goertzel algorithm (which
> does the basic tone detection) and changes the algorithm to detect the
> DTMF pairs. If interested, I can try to recover that patch.

If you dig out that patch and submit it (to me), I'm pretty sure there's
a good chance of it going into the official kernel. ISTR there was talk
about that earlier, but nothing ever happened.

--Kai


2002-12-16 10:59:26

by Roy Sigurd Karlsbakk

[permalink] [raw]
Subject: Re: i4l dtmf errors

> The DTMF detection is broken since kernel 2.0.x. I have a patch for a
> 2.2 kernel which may manually be applied 2.4 kernels with some manual
> work. It fixes an overflow problem in the goertzel algorithm (which
> does the basic tone detection) and changes the algorithm to detect the
> DTMF pairs. If interested, I can try to recover that patch.

I'm very interested, as the alternative is to rewrite Asterisk (dot org) to
use it's own. Today, I get beeps whenever I speak on the phone - espessialy
with my girlfriend ;-P

roy
--
Roy Sigurd Karlsbakk, Datavaktmester
ProntoTV AS - http://www.pronto.tv/
Tel: +47 9801 3356

Computers are like air conditioners.
They stop working when you open Windows.