[asterisk-dev] [Code Review] Keep RTP DTMF short and sweet

Olle E. Johansson oej at edvina.net
Tue Feb 1 07:33:51 CST 2011

1 feb 2011 kl. 12.57 skrev Olle E Johansson:

> This is an automatically generated e-mail. To reply, visit: https://reviewboard.asterisk.org/r/1091/
> Review request for Asterisk Developers.
> By Olle E Johansson.
> Description
> Asterisk by default adds 740 ms to every outbound DTMF in the RTP subsystem. For longer DTMF key presses, it doesn't matter much, but for very short ones, it adds a LOT of extra noise in the call. Unfortunately, we had a lot of very short DTMF and got complains.
> - 2*160 ms in the retransmits of DTMF begin packets. They all should have the same duration
> - 160 ms in an extra DTMF continue packet that doesn't match any incoming packet
> - 160 ms by bad calculation in the DTMF end packet
> This code fixes all of these issues and make sure that outbound DTMF has the same duration as inbound DTMF on the RTP channel. I am not proud over the code that stops the extra DTMF continue though. Will try to come up with something more cool. This works though. Feedback and ideas are more than welcome.
> Testing
> Tested beeping with Asterisk 1.6.0 between two SNOM phones many many times. Will continue testing on production servers.

We have now tested with a gateway that sends DTMF with 400 ms spacing after the first three, which is spaced with 40 ms. In that case, Asterisk makes the outbound DTMF shorter than the inbound... ARRGGHHH.

I now believe that the only way to fix this properly is to send the duration and ALL dtmf events across the bridge.

Any comments, thoughts, ideas?


More information about the asterisk-dev mailing list