<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:p="urn:schemas-microsoft-com:office:powerpoint" xmlns:a="urn:schemas-microsoft-com:office:access" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema" xmlns:b="urn:schemas-microsoft-com:office:publisher" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" xmlns:c="urn:schemas-microsoft-com:office:component:spreadsheet" xmlns:oa="urn:schemas-microsoft-com:office:activation" xmlns:html="http://www.w3.org/TR/REC-html40" xmlns:q="http://schemas.xmlsoap.org/soap/envelope/" xmlns:D="DAV:" xmlns:x2="http://schemas.microsoft.com/office/excel/2003/xml" xmlns:ois="http://schemas.microsoft.com/sharepoint/soap/ois/" xmlns:dir="http://schemas.microsoft.com/sharepoint/soap/directory/" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:dsp="http://schemas.microsoft.com/sharepoint/dsp" xmlns:udc="http://schemas.microsoft.com/data/udc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:sps="http://schemas.microsoft.com/sharepoint/soap/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:udcxf="http://schemas.microsoft.com/data/udc/xmlfile" xmlns:wf="http://schemas.microsoft.com/sharepoint/soap/workflow/" xmlns:mver="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns:mrels="http://schemas.openxmlformats.org/package/2006/relationships" xmlns:ex12t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:ex12m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
        {mso-style-priority:99;
        mso-style-link:"Plain Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.5pt;
        font-family:Consolas;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.PlainTextChar
        {mso-style-name:"Plain Text Char";
        mso-style-priority:99;
        mso-style-link:"Plain Text";
        font-family:Consolas;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:2.0cm 42.5pt 2.0cm 3.0cm;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=RU link=blue vlink=purple style='word-wrap: break-word;-webkit-nbsp-mode: space;
-webkit-line-break: after-white-space'>
<div class=Section1>
<p class=MsoNormal><span lang=EN-US>>> Based upon my own research and
that of somebody else (sorry can't remember name) that did some major fixing up
of code in the dsp.c DTMF detection code recently,</span><span lang=EN-US
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>I believe you are talking about Tony Mountifield (the “DTMF
detection in dsp.c intolerant?” thread on asterisk-dev). This finally
turned to a patch </span><a href="http://bugs.digium.com/view.php?id=10535"><span
lang=EN-US>http://bugs.digium.com/view.php?id=10535</span></a> <span
lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>However this patch is already part of Asterisk.</span><span
lang=EN-US><o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>To John: the DTMF detection for Zap channels is done in Asterisk
(main/dsp.c)<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Can you give me a few sample wav files of calls where DTMF
detection is unreliable. (Please do not mix/join channel’s in and out)<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Regards,<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Dmitry Andrianov<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<div>
<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'>
<p class=MsoNormal><b><span lang=EN-US style='font-size:10.0pt;font-family:
"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;
font-family:"Tahoma","sans-serif"'> asterisk-dev-bounces@lists.digium.com
[mailto:asterisk-dev-bounces@lists.digium.com] <b>On Behalf Of </b>Daniel
Hazelbaker<br>
<b>Sent:</b> Monday, December 03, 2007 9:31 PM<br>
<b>To:</b> Asterisk Developers Mailing List<br>
<b>Subject:</b> Re: [asterisk-dev] DTMF end accepted without begin<o:p></o:p></span></p>
</div>
</div>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>Have you tried setting the relaxdtmf setting in
/etc/asterisk/zapata.conf? You also have to turn on "Relax DTMF for
Radio Applications" (even though it has nothing to do with radio
communications). That might solve the completely missing tones.<o:p></o:p></p>
<div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<div>
<p class=MsoNormal>Based upon my own research and that of somebody else (sorry
can't remember name) that did some major fixing up of code in the dsp.c DTMF
detection code recently, dsp.c does the actual DTMF detection. Zaptel
doesn't seem to do squat when it comes to DTMF detection.<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<div>
<p class=MsoNormal>You can play around in dsp.c near line 165. Play with
those DTMF_ defines (make sure you are in the right #ifdef) and you might be
able to tweak some stuff to better detect in your situation. Personally I
found that when I turned on the relaxdtmf option people's voices were being
detected as tones, but you might be able to get a more precise "relaxed"
mode.<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<div>
<p class=MsoNormal>Also, my patch stemmed from the following logging
information. You might be able to turn it on and see exactly what is
happening when tones are missed. (Warning: this will spit out a TON of
logging information).<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<div>
<p class=MsoNormal>This is from 1.4.12, line 591 and surrounding:<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<div>
<p class=MsoNormal>
&&
goertzel_result(&s->row_out2nd[best_row])*DTMF_2ND_HARMONIC_ROW <
row_energy[best_row]) {<o:p></o:p></p>
</div>
<div>
<div>
<p class=MsoNormal>#else<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal>
/* ... and fraction of total energy test */<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal>ADD->
ast_log(LOG_NOTICE, "dtmf_detect row_energy=%f, col_energy=%f,
total=%f > %f (%f + %f)", row_energy[best_row], col_energy[best_col],<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal>ADD->
(row_energy[best_row] + col_energy[best_col]), (DTMF_TO_TOTAL_ENERGY *
s->energy), DTMF_TO_TOTAL_ENERGY, s->energy);<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal>
if (i >= 4 &&<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal>
(row_energy[best_row] +
col_energy[best_col]) > DTMF_TO_TOTAL_ENERGY*s->energy) {<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal>#endif<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal>
/* Got a hit */<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<div>
<p class=MsoNormal>It is a bit messy, but it might help track down exactly what
"energy" values you would need to catch those false negatives.<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
</div>
<div>
<p class=MsoNormal>Daniel<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><o:p> </o:p></p>
<div>
<div>
<p class=MsoNormal>On Dec 3, 2007, at 9:55 AM, John Aughey wrote:<o:p></o:p></p>
</div>
<p class=MsoNormal><br>
<br>
<o:p></o:p></p>
<p class=MsoNormal style='margin-bottom:12.0pt'>We actually get both the
"wobble" detection (multiple tones detected with one button press)
and missing detection (press 201 and it detects 01 missing the 2). The
suggestions on voip-info have not yet helped and the lack of DTMF_BEGIN events
concern me. It's also not clear right now where the dtmf detection is
done, if it's in the zaptel-1.4.6 code base or within
asterisk-1.4.14/main/dsp.c. They both seem to do tone detection.<br>
<br>
John<o:p></o:p></p>
<div>
<p class=MsoNormal>On Dec 3, 2007 10:31 AM, Daniel Hazelbaker <<a
href="mailto:daniel@highdesertchurch.com"> daniel@highdesertchurch.com</a>>
wrote:<o:p></o:p></p>
<div>
<p class=MsoNormal style='margin-bottom:12.0pt'>On Dec 2, 2007, at 5:35 PM,
John Aughey wrote: <br>
<br>
> The begin frames (and associated end frames) are helpful to filter<br>
> out short dtmf reads. There's even a #define which specifies the<br>
> minimum length of a dtmf tone. One problem we're having is multiple <br>
> dtmf detections on a noisy cell phone connection, which should be<br>
> mostly filtered by knowing the begin and end time so that the length<br>
> can be properly measured and filtered if needed.<br>
><br>
> John <o:p></o:p></p>
</div>
<p class=MsoNormal>If you are running 1.4.15 (it should apply down to .12 as
well I<br>
believe) then you can try this patch. We have a similar problem at<br>
our site, except it is due to a junky NEC that is currently the front- <br>
end to the Telco. Tones would have a drop-out in the middle of them<br>
so Asterisk was detected double digits. i.e. they dial 235 and it<br>
reads 2335. With this patch the "wobble" tones are almost never
an <br>
issue anymore.<br>
<br>
<<a
href="http://www.blueboxmoon.com/bitweaver/blogs/view_post.php?post_id=10"
target="_blank">http://www.blueboxmoon.com/bitweaver/blogs/view_post.php?post_id=10</a>><br>
<span style='color:#888888'><br>
Daniel</span><o:p></o:p></p>
<div>
<div>
<p class=MsoNormal><br>
_______________________________________________<br>
--Bandwidth and Colocation Provided by <a href="http://www.api-digital.com--"
target="_blank">http://www.api-digital.com-- </a><br>
<br>
asterisk-dev mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-dev"
target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-dev</a> <o:p></o:p></p>
</div>
</div>
</div>
<p class=MsoNormal><br>
_______________________________________________<br>
--Bandwidth and Colocation Provided by <a href="http://www.api-digital.com">http://www.api-digital.com</a>--<br>
<br>
asterisk-dev mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-dev">http://lists.digium.com/mailman/listinfo/asterisk-dev</a><o:p></o:p></p>
</div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
</div>
</body>
</html>