Summary:ASTERISK-05633: DTMF detection via GSM and VoIP very unreliable
Reporter:d-trix (d-trix)Labels:
Date Opened:2005-11-17 16:30:51.000-0600Date Closed:2011-06-07 14:10:02
Versions:Frequency of
Environment:Attachments:( 0) fact_0123456789011223344556677889900starstar_detected_1223456789011223344556677889900starstar.wav
( 1) fact_0123456789011223344556677889900star_detected_0134567890113344556677889900star.wav
( 2) fact_1234567890112233445566778899_detected_12344567890112233444556666778899.wav

While Mobile GSM and on VoIP connections, the DTMF detection is very unreliable.
Depending on the Numbers, they get doubled(2,5,8) or get lost(3,6,9), or will detected fine(1,4,7)

This behavior happens on the two releases I have tested with, 1.2.0-beta1 and 1.0.9.

I found an article, so I think the problem is well known:
Comments:By: Serge Vecher (serge-v) 2005-11-17 17:14:23.000-0600

AFAIK, inband DTMF on a compressed codec like GSM is not supposed to work by design. It's not a bug, but a configuration issue...

You didn't specify which protocol you use for VoIP connections, but your example specifies SIP, so we'll assume that's what you use. in sip.conf specify dtmfmode=rfc2833 for your sip friends.

By: d-trix (d-trix) 2005-11-17 17:49:24.000-0600

Ok this is a misunderstanding. I am talking about connection from a GSM cell phone to the Asterisk PSTN (ISDN) Interace Card. The digits are recognized very unreliable by Asterisk even if the cell connection is VERY good.

Also on Voip Connections with a Voip Provider to the Asterisk PSTN (ISDN) Interace Card the DTMF digits are as bad recognized as above.

By: Olle Johansson (oej) 2005-11-18 02:22:22.000-0600

Have you tried the relaxdtmf setting?

By: d-trix (d-trix) 2005-11-18 03:28:30.000-0600

yes, the behavior is the same

By: Tilghman Lesher (tilghman) 2005-11-18 08:35:28.000-0600

This behavior is network-specific.  The problem is that the DTMF is not sent from your cell phone, but rather a digit is sent out-of-band, which is then muxed into the signal when the digit reaches your carrier.  Your carrier is sending the DTMF code out of spec with the published standard, which is why you're getting bad DTMF detection.

I would encourage you to try with a different cell phone company.  This, at the very least, should indicate that it's the cell company at fault, not Asterisk.

In terms of resolving this, we need to have the exact tones that the cell company is sending, to see just how far out of spec the tones are being sent.  We may be able to relax the DTMF settings even further, with a config setting.

By: d-trix (d-trix) 2005-11-20 15:08:26.000-0600

Ok I uploaded two files with DTMF sequences.
These sequences are sent by an Nokia 6230 and the E+ Phone Company (GSM 1800Mhz).
The results are almost good, perhaps today is a good day ;)

(GSM 1800Mhz) :
fact 0123456789011223344556677889900(star) detected  0134567890113344556677889900(star).wav  

fact 0123456789011223344556677889900(star)(star) detected 1223456789011223344556677889900(star)(star).wav

By: d-trix (d-trix) 2005-11-21 02:35:06.000-0600

Ok here are the results with an SonyEriccson + Vodafone Phone Company (GSM 900Mhz)

(GSM 900Mhz) :

fact 1234567890112233445566778899 detected 12344567890112233444556666778899.wav

In most cases the 6 is doubled, so this example wav-file is very typically.

By: Mark Spencer (markster) 2005-11-25 13:09:45.000-0600

This smells of a hardware issue.  Please contact Digium tech support assuming this was  Digium card.  Thanks!