[asterisk-dev] [Code Review] Fix various issues that can cause out of order DTMF processing

Russell Bryant russell at digium.com
Thu Dec 11 11:21:39 CST 2008


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.digium.com/r/85/#review195
-----------------------------------------------------------



/branches/1.4/main/channel.c
<http://reviewboard.digium.com/r/85/#comment359>

    I forgot to include a comment with the diff update.
    
    rev2 includes the fix to queue_dtmf_readq() which makes the function queue DTMF to the tail of the readq instead of the head.  This was the result of discussion on the asterisk-dev list.


- Russell


On 2008-12-11 11:20:12, Russell Bryant wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.digium.com/r/85/
> -----------------------------------------------------------
> 
> (Updated 2008-12-11 11:20:12)
> 
> 
> Review request for Asterisk Developers and Joshua Colp.
> 
> 
> Summary
> -------
> 
> The reporter of 12658 pointed out a few problems with DTMF processing logic.  There were various cases where processing order of received DTMF could be incorrect.
> 
> 1) Change autoservice to put digits on the head of the channel's frame readq instead of the tail.  If there were frames on the readq that autoservice had not yet read, the previous code would have resulted in out of order processing.  This required a new API call to queue a frame to the head of the queue instead of the tail.
> 
> 2) Change up the processing of DTMF in ast_read().  Some of the problems were the result of having two sources of pending DTMF frames.  There was the dtmfq and the more generic readq.  Both were used for pending DTMF in various scenarios.  Simplifying things to only use the frame readq avoids some of the problems.
> 
> 3) Fix a bug where a DTMF END frame could get passed through when it shouldn't have.  If code set END_DTMF_ONLY in the middle of digit emulation, digits would get processed out of order.
> 
> 
> This addresses bug 12658.
>     http://bugs.digium.com/view.php?id=12658
> 
> 
> Diffs
> -----
> 
>   /branches/1.4/include/asterisk/channel.h 163103 
>   /branches/1.4/main/autoservice.c 163103 
>   /branches/1.4/main/channel.c 163103 
> 
> Diff: http://reviewboard.digium.com/r/85/diff
> 
> 
> Testing
> -------
> 
> 1) It compiles!
> 
> 2) I made a SIP call using RFC2833 for DTMF and verified that passing through DTMF BEGIN/END frames still worked.
> 
> 3) I made a SIP call using RFC2833 for DTMF, and enabled rfc2833compensation=yes in sip.conf, and verified that DTMF emulation still worked.
> 
> 
> Thanks,
> 
> Russell
> 
>




More information about the asterisk-dev mailing list