<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div><div>On Dec 3, 2007, at 1:24 PM, Dmitry Andrianov wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div lang="RU" link="blue" vlink="purple" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div class="Section1"><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">Regarding the<span class="Apple-converted-space"> </span></span><span lang="EN-US"><</span><a href="http://www.blueboxmoon.com/bitweaver/blogs/view_post.php?post_id=10" target="_blank" style="color: blue; text-decoration: underline; "><span lang="EN-US">http://www.blueboxmoon.com/bitweaver/blogs/view_post.php?post_id=10</span></a><span lang="EN-US">><span class="Apple-converted-space"> </span></span><span lang="EN-US" style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">patch – as I understand you allow up to 4 successive misses inside a digit to still consider it a single digit. With block size of 102 samples (12.75 ms @ 8 KHz sampling) it means about 50 ms. However, 50 ms is valid inter-digit interval (matching minimum interval duration requirements) .</span></div></div></div></span></blockquote><div><br class="webkit-block-placeholder"></div><div>In terms of spec (which is what I believe you are referring to), yes. In practice, pressing the buttons just as fast as I possibly can (i.e. sitting there and pressing the number 2 over and over again) the smallest interval I saw was 7 (or about 90ms). I tested a number of different automated dialers (phone speed dials, computer modem dials, flash transfer dials, etc) and all of those were also above 90ms...<div><br></div></div><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div lang="RU" link="blue" vlink="purple" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div class="Section1"><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); "> Which means your patch is not for “general public” because it will almost certainly be eliminating double-digits even where they are should remain.<o:p></o:p></span></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); "><o:p></o:p></span></div></div></div></span></blockquote><div><br class="webkit-block-placeholder"></div><div>... so it should be relatively safe, but I do agree whole heartedly. I wouldn't ever recommend this patch to trunk (which is why I have never posted it to mantis) except *possibly* as a compile time option, kind of like the RELAX_RADIO option as it's only purpose is to help with noisy lines, or other related issues. And especially with a lot of areas beginning to go digital we should hopefully have less and less need for things like this. I'm not a big fan of breaking specs, but being able to do this solved a 2 year old problem of people complaining about dialing one extension and getting another.</div><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div lang="RU" link="blue" vlink="purple" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div class="Section1"><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); "><o:p></o:p></span></div></div></div></span></blockquote><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div lang="RU" link="blue" vlink="purple" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div class="Section1"><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span class="Apple-style-span" style="color: rgb(20, 79, 174); font-size: 12px; -webkit-text-stroke-width: -1; "><b><span lang="EN-US" style="font-size: 10pt; font-family: Tahoma, sans-serif; "></span></b></span></div></div></div></span></blockquote><div><br class="webkit-block-placeholder"></div><div>Daniel</div><br><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div lang="RU" link="blue" vlink="purple" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div class="Section1"><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span class="Apple-style-span" style="color: rgb(20, 79, 174); font-size: 12px; -webkit-text-stroke-width: -1; "><b><span lang="EN-US" style="font-size: 10pt; font-family: Tahoma, sans-serif; ">From:</span></b><span lang="EN-US" style="font-size: 10pt; font-family: Tahoma, sans-serif; "> <a href="mailto:asterisk-dev-bounces@lists.digium.com" style="color: blue; text-decoration: underline; ">asterisk-dev-bounces@lists.digium.com</a> [<a href="mailto:asterisk-dev-bounces@lists.digium.com" style="color: blue; text-decoration: underline; ">mailto:asterisk-dev-bounces@lists.digium.com</a>] <b>On Behalf Of </b>Daniel Hazelbaker</span></span></div><div><div style="border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-top-style: solid; border-top-color: rgb(181, 196, 223); border-top-width: 1pt; padding-top: 3pt; padding-right: 0cm; padding-bottom: 0cm; padding-left: 0cm; "><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span lang="EN-US" style="font-size: 10pt; font-family: Tahoma, sans-serif; "><b>Sent:</b><span class="Apple-converted-space"> </span>Monday, December 03, 2007 9:31 PM<br><b>To:</b><span class="Apple-converted-space"> </span>Asterisk Developers Mailing List<br><b>Subject:</b><span class="Apple-converted-space"> </span>Re: [asterisk-dev] DTMF end accepted without begin<o:p></o:p></span></div></div></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><o:p> </o:p></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; ">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></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><o:p> </o:p></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; ">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></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><o:p> </o:p></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; ">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></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><o:p> </o:p></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; ">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></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><o:p> </o:p></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; ">This is from 1.4.12, line 591 and surrounding:<o:p></o:p></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><o:p> </o:p></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "> && goertzel_result(&s->row_out2nd[best_row])*DTMF_2ND_HARMONIC_ROW < row_energy[best_row]) {<o:p></o:p></div></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; ">#else<o:p></o:p></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "> /* ... and fraction of total energy test */<o:p></o:p></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; ">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></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; ">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></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "> if (i >= 4 &&<o:p></o:p></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "> (row_energy[best_row] + col_energy[best_col]) > DTMF_TO_TOTAL_ENERGY*s->energy) {<o:p></o:p></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; ">#endif<o:p></o:p></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "> /* Got a hit */<o:p></o:p></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><o:p> </o:p></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; ">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></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><o:p> </o:p></div></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; ">Daniel<o:p></o:p></div></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><o:p> </o:p></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; ">On Dec 3, 2007, at 9:55 AM, John Aughey wrote:<o:p></o:p></div></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><br><br><o:p></o:p></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; ">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></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; ">On Dec 3, 2007 10:31 AM, Daniel Hazelbaker <<a href="mailto:daniel@highdesertchurch.com" style="color: blue; text-decoration: underline; "><span class="Apple-converted-space"> </span>daniel@highdesertchurch.com</a>> wrote:<o:p></o:p></div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; ">On Dec 2, 2007, at 5:35 PM, John Aughey wrote:<span class="Apple-converted-space"> </span><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<span class="Apple-converted-space"> </span><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></div></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; ">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-<span class="Apple-converted-space"> </span><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<span class="Apple-converted-space"> </span><br>issue anymore.<br><br><<a href="http://www.blueboxmoon.com/bitweaver/blogs/view_post.php?post_id=10" target="_blank" style="color: blue; text-decoration: underline; ">http://www.blueboxmoon.com/bitweaver/blogs/view_post.php?post_id=10</a>><br><span style="color: rgb(136, 136, 136); "><br>Daniel</span><o:p></o:p></div><div><div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><br>_______________________________________________<br>--Bandwidth and Colocation Provided by<span class="Apple-converted-space"> </span><a href="http://www.api-digital.com--" target="_blank" style="color: blue; text-decoration: underline; ">http://www.api-digital.com--<span class="Apple-converted-space"> </span></a><br><br>asterisk-dev mailing list<br>To UNSUBSCRIBE or update options visit:<br> <span class="Apple-converted-space"> </span><a href="http://lists.digium.com/mailman/listinfo/asterisk-dev" target="_blank" style="color: blue; text-decoration: underline; ">http://lists.digium.com/mailman/listinfo/asterisk-dev</a><o:p></o:p></div></div></div></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><br>_______________________________________________<br>--Bandwidth and Colocation Provided by<span class="Apple-converted-space"> </span><a href="http://www.api-digital.com" style="color: blue; text-decoration: underline; ">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" style="color: blue; text-decoration: underline; ">http://lists.digium.com/mailman/listinfo/asterisk-dev</a><o:p></o:p></div></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><o:p> </o:p></div></div></div>_______________________________________________<br>--Bandwidth and Colocation Provided by<span class="Apple-converted-space"> </span><a href="http://www.api-digital.com" style="color: blue; text-decoration: underline; ">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" style="color: blue; text-decoration: underline; ">http://lists.digium.com/mailman/listinfo/asterisk-dev</a></div></span></blockquote></div><br></div></body></html>