[Home]

Summary:ASTERISK-00947: Unhandled DTMF Tones
Reporter:bfranks (bfranks)Labels:
Date Opened:2004-01-29 11:07:51.000-0600Date Closed:2011-06-07 14:10:24
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:I have seen the DTMF 'f' problem on my usage with Polycom Phones, and altered channel.c to fix this, however more and more people are beginning to see this, so I thought it appropriate to submit this.

Basically in channel.c it does a return -1; on unhandled dtmf tones.  My feeling is this is a bit severe, as it disconnects the sip call that it happens on.

Obviously, it is stupid the Polycom phones send out DTMF 'f' when the mic mute button is unmuted.

Attached is my change, however it only takes care of 'f', I would think that there might be a better way to handle unrecgonized tones..?

Just a thought,

Brent

static int do_senddigit(struct ast_channel *chan, char digit)
{
       int res = -1;

       if (chan->pvt->send_digit)
               res = chan->pvt->send_digit(chan, digit);
       if (!chan->pvt->send_digit || res) {
               /*
                * Device does not support DTMF tones, lets fake
                * it by doing our own generation. (PM2002)
                */
               static const char* dtmf_tones[] = {
                       "!941+1336/50,!0/50",   /* 0 */
                       "!697+1209/50,!0/50",   /* 1 */
                       "!697+1336/50,!0/50",   /* 2 */
                       "!697+1477/50,!0/50",   /* 3 */
                       "!770+1209/50,!0/50",   /* 4 */
                       "!770+1336/50,!0/50",   /* 5 */
                       "!770+1477/50,!0/50",   /* 6 */
                       "!852+1209/50,!0/50",   /* 7 */
                       "!852+1336/50,!0/50",   /* 8 */
                       "!852+1477/50,!0/50",   /* 9 */
                       "!697+1633/50,!0/50",   /* A */
                       "!770+1633/50,!0/50",   /* B */
                       "!852+1633/50,!0/50",   /* C */
                       "!941+1633/50,!0/50",   /* D */
                       "!941+1209/50,!0/50",   /* * */
                       "!941+1477/50,!0/50" }; /* # */
               if (digit >= '0' && digit <='9')
                       ast_playtones_start(chan,0,dtmf_tones[digit-'0'], 0);
               else if (digit >= 'A' && digit <= 'D')
                       ast_playtones_start(chan,0,dtmf_tones[digit-'A'+10], 0);
               else if (digit == '*')
                       ast_playtones_start(chan,0,dtmf_tones[14], 0);
               else if (digit == '#')
                       ast_playtones_start(chan,0,dtmf_tones[15], 0);
               else if (digit == 'f');
               else {
                       /* not handled */
                       ast_log(LOG_WARNING, "Unable to handle DTMF tone '%c' for '%s'\n", digit, chan->name);
                       return -1;
               }
       }
       return 0;
}
Comments:By: Brian West (bkw918) 2004-01-29 11:25:53.000-0600

this has been fixed in recent CVS can you confirm?

By: Brian West (bkw918) 2004-02-02 00:31:35.000-0600

Fixed in recent CVS please confirm