Summary:ASTERISK-06890: [patch] Only first digit of RFC2833 DTMF being sent
Reporter:Ben Smithurst (bsmithurst)Labels:
Date Opened:2006-05-03 08:19:55Date Closed:2006-05-08 10:03:14
Versions:Frequency of
Environment:Attachments:( 0) dtmf-log.txt
( 1) dtmf-patch1.txt
( 2) dtmf-patch2.txt
Description:If I make a call out from my Asterisk server, using SIP with RFC2833 DTMF, then it appears that only the first digit is being sent in the case where no audio is received from the other end.  For some AGI scripts I was able to make them read a digit, and send back a short quiet white noise, before reading the next - but clearly this is not a satisfactory workaround in general.

I have attached a rtp debug log showing this behaviour - I dialled voicemail which runs on another server, and entered '123' as the mailbox and '456' as the PIN, and only the first digit of each is sent, although the log shows asterisk is reading and understanding all the RFC2833 packets.

The problem seems to be that the do_senddigit function is calling ast_playtones_start with interruptible = 0, which for some reason is preventing Asterisk from sending subsequent digits.

I have attached two patches - either one OR the other is enough to fix the problem.  Patch1 makes Asterisk not use playtones for SIP, since as far as I know, it doesn't need to, and Patch2 makes it use playtones with interruptible = 1.

Has anyone else seen this problem or is it something strange at my end?  I am running SVN trunk code with no modifications and pretty simple config files.

I have tested this patch only lightly, but I will run it on a couple of servers and look out for any problems.
Comments:By: SIP:ian@txrx.ca (weezey) 2006-05-03 12:01:15

Well, I'm not sure of anyone else's need for this, but I know I have one.  I've been having this problem for a few months now.  To get around it, I've been putting all of my child boxes back to stable.  I've been using IAX2 to connect between my main box and other sites and if I used the latest SVN at any site, it would not let me get to voicemail.  The console shows the same thing, just the first digit.  I used your patches (I used both, but after re-reading, I didn't need to) and now I can once again check my voice mail while running latest SVN at my sites.  I'll recompile with either patch if you can tell me which one, if any, is harmless to the operation of my machines.

Thank you for tracking this down.  I think there must be such a small number of people affected by this so it hasn't come up until now.  I just keep coming back to this system with my search for DTMF and hoping someone who knows their way around the code has run into it.

By: Ben Smithurst (bsmithurst) 2006-05-05 10:32:57

Weezey - I'm using patch 1 on a server with a handful of users and it hasn't caused any problems yet.  I'll keep an eye out for any other problems that crop up.  I suspect problems are perhaps more likely with other channel types, I have only tested this with SIP and IAX.

Like you I'd like someone who knows the code inside out to comment on if either patch is correct, or if not, what a better fix might be.

By: Serge Vecher (serge-v) 2006-05-08 10:03:14

dtmf-patch1.txt added to trunk in r25567 by markster.