[asterisk-dev] [Code Review] 3546: DTMF emulation bad calculation that hurts RTP

Olle E Johansson reviewboard at asterisk.org
Fri May 23 08:06:46 CDT 2014



> On May 17, 2014, 12:33 a.m., Matt Jordan wrote:
> >

Thank you. Found even more issues so I need to come back on this.
Easiest patch was to avoid DTMF emulation fully by checking min duration in res_asterisk_rtp before you send it up to the core. Now, if other channels send small DTMF tones we still need to fix emulation.

The problem is that we calculate the difference between the current length and the min duration, then use the difference as the end duration. This is very confusing.


- Olle E


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/3546/#review11911
-----------------------------------------------------------


On May 16, 2014, 3:56 p.m., Olle E Johansson wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/3546/
> -----------------------------------------------------------
> 
> (Updated May 16, 2014, 3:56 p.m.)
> 
> 
> Review request for Asterisk Developers.
> 
> 
> Bugs: ASTERISK-23747
>     https://issues.asterisk.org/jira/browse/ASTERISK-23747
> 
> 
> Repository: Asterisk
> 
> 
> Description
> -------
> 
> This code in channel.c is wrong. It first checks if we have a length. If not, we set it to a measured time, which is fine.
> 
> If we have a length and it's under the minimum DTMF duration, we set it again to the measured time. In an RTP session, the duration can be under minimum, but has no relationship to the measured time between DTMF start and end. We should keep the given RTP DTMF time and use that for emulation. I have had DTMF that was extended by up to 60 ms because of this code and that really, really broke communication for these alarm panels that send many short DTMF tones.
> 
> I suggest that this fix goes into 1.8 and later revisions.
> 
> 
> Diffs
> -----
> 
>   /trunk/main/channel.c 414046 
> 
> Diff: https://reviewboard.asterisk.org/r/3546/diff/
> 
> 
> Testing
> -------
> 
> Hours and hours of reading DTMF logs. Countless cups of tea. A gazillion milliseconds wasted. All tested in 1.8.
> 
> 
> Thanks,
> 
> Olle E Johansson
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20140523/3c166334/attachment.html>


More information about the asterisk-dev mailing list