<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://reviewboard.asterisk.org/r/2084/">https://reviewboard.asterisk.org/r/2084/</a>
</td>
</tr>
</table>
<br />
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('https://reviewboard.asterisk.org/media/rb/images/review_request_box_top_bg.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
<tr>
<td>
<div>Review request for Asterisk Developers, rmudgett and Jason Parker.</div>
<div>By Alec Davis.</div>
<p style="color: grey;"><i>Updated Aug. 26, 2012, 2:20 a.m.</i></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Changes</h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">After documenting, DTMF events, before and after this patch, the existing code works well.
Except to handle fast DTMF;
DTMF_HITS_TO_BEGIN needs to be changed to 3.
DTMF_MISSES_TO_END needs to be changed to 2.
History:
The DTMF_HITS_TO_BEGIN and DTMF_MISSES_TO_END and other variables were added to handle GSM issues.
https://issues.asterisk.org/view.php?id=11968
"These will allow people easily patch the code and have reliable DTMF recognition in cases where signal is wobbling (like when GSM phone calls in). Increasing DTMF_MISSES_TO_END to 4-6 will allow DSP code to ignore long "dropouts" of DTMF within digit without ending it. "
There is one improvement to existing code, in the case where 'no interdigit pause' is received.
Hits should be incremented as current_hit is set to 0
</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description (updated)</h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Use a simpler method to detect changes in DTMF ON/OFF tones.
Similar method to latest spandsp/dtmf.c
We must detect 2 silences for DTMF END.
Reverts some of 111022 that added DTMF_HITS_TO_BEGIN and DTMF_MISSES_TO_END
Exisiting dtmf events with;
/* hits_to_begin = 3, misses to end = 2 */
/* --------A hits=1, misses=1, lasthit='A'
* -------AA hits=2
* ------AAA hits=3, store_digit, current_hit='A',        BEGIN A
* -----AAA- hits=1, misses=1, lasthit=' '
* ----AAA-- misses=2, current_hit=' ',                 END A
* ---AAA--B hits=1, misses=1, lasthit='B'
* --AAA--BB hits=2
* -AAA--BBB hits=3, store_digit, current_hit='B',        BEGIN B
* AAA--BBB- hits=1, misses=1, lasthit=' '
* AA--BBB-B hits=1, misses=1, lasthit='B'
* A--BBB-BB digitlen += GSIZE
* deal with an interruption
* --BBB-BB- hits=1, misses=1, lasthit=' '
* -BBB-BB-B hits=1, misses=1, lasthit='B'
* BBB-BB-BB digitlen += GSIZE
* deal with no interdigit pause
* BB-BB-BBC hits=1, misses=1, lasthit='C'
* B-BB-BBCC current_hit=' ',                        END B
* -BB-BBCCC hits=2
* BB-BBCCCC hits=3, store_digit, current_hit='C',        BEGIN C
*/
How it would be without, hits_to_begin, and misses_to_end
/* ------AA Begin A
* -----AA- no change
* ----AA-- End A
* ---AA--B no change
* --AA--BC no change
* -AA--BCC Start C
* AA--BCCD no change
* A--BCCDD Start D
* --BCCDD- no change
* -BCCDD-E no change
* BCCDD-EE Start E
* CCDD-EE- no change
* CDD-EE-F no change
* DD-EE-F- no change
* D-EE-F-- End E
*/
</pre>
</td>
</tr>
</table>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>
<a href="https://issues.asterisk.org/jira/browse/ASTERISK-17493">ASTERISK-17493</a>,
<a href="https://issues.asterisk.org/jira/browse/ASTERISK-19610">ASTERISK-19610</a>
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>trunk/main/dsp.c <span style="color: grey">(371649)</span></li>
</ul>
<p><a href="https://reviewboard.asterisk.org/r/2084/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>