<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/1329/">https://reviewboard.asterisk.org/r/1329/</a>
     </td>
    </tr>
   </table>
   <br />





<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On July 25th, 2011, 12:21 p.m., <b>Mark Michelson</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">While the rewrite to python is all good, the change I disagree with is removing all the SIPp scenarios and replacing them with SendDTMF from the dialplan. Using SIPp, we were able to make sure that we were properly detecting RFC 2833 DTMF both when the DTMF was well-formed and when the DTMF had errors in it. Switching to SendDTMF removes the ability to test that we properly handle malformed RFC 2833 DTMF sequences, which was pretty much the reason this test was originally written.</pre>
 </blockquote>




 <p>On July 25th, 2011, 12:23 p.m., <b>Mark Michelson</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I should clarify something. When I say &quot;the rewrite to python is all good&quot; I mean that I&#39;m in agreement with doing that as a way of potentially helping the test to pass more often. I haven&#39;t looked in-depth at the changes to see if they are actually correct/optimal.</pre>
 </blockquote>








</blockquote>

<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Alrighty, I&#39;ll have to take another look later to see about making the test run the SIPp scenarios and also have a look at figuring out what the original test did with malformed RFC 2833 DTMF sequences.  Is there a proper way to invoke SIPp scenarios within Python and the Asterisk test suite or would it be alright to run SIPp using shell commands?

And yeah, I suppose it makes sense that what we are really looking for in this test is what we do with the wrong type of data being sent as DTMF.  This will probably take a decent amount of change.</pre>
<br />








<p>- jrose</p>


<br />
<p>On July 25th, 2011, 11:50 a.m., jrose wrote:</p>






<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 and Paul Belanger.</div>
<div>By jrose.</div>


<p style="color: grey;"><i>Updated July 25, 2011, 11:50 a.m.</i></p>




<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </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;">This is an attempt to replace the rfc2833 dtmf test with a python specific test in order to address the fact that the current test bounces at seemingly random intervals.  This replacement test is based loosely on the sip_tls_call test which for the immediate history of the test has only failed when it was meant to fail.

This test is also somewhat more verbose than the existing test.

Adding new strings to the test is fairly simple and requires the following:

1.  create a new self.expected_results.append(character_array) in the test class in the appropriate marked section of run-test
2.  create an extension using sendDTMF with a string to match that character array in configs/ast1/extensions.conf in the context with the other sendDTMF extensions
3.  add the extension to the self.originates array in the test class in run-test

Note:  If any of my code isn&#39;t &#39;pythonic&#39;, just let me know and I&#39;ll rewrite it to match those amusing standards.

As is, this test outright replaces the existing LUA/sipp based rfc2833 dtmf test.  It might perhaps be more ideal to simply add it in as a second test for the same functionality instead.  Or perhaps to put it in as a second test with the intention of killing the other test if this one turns out to be more reliable.</pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </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;">Tested receiving strings that were too short or too long, tested receiving strings with mismatched DTMF values, tested receiving no DTMF at all.  So far it seems pretty robust.  I&#39;ve probably ran this test 30 times without seeing any unexpected failures on my box, though when things get over to Bamboo, there are more complications to keep in mind than that.

Example run:


--&gt; Running test &#39;tests/rfc2833_dtmf_detect&#39; ...

Making sure Asterisk isn&#39;t running ...
Running [&#39;tests/rfc2833_dtmf_detect/run-test&#39;, &#39;-v&#39;, &#39;SVN-branch-1.8-r329203&#39;, &#39;-n&#39;, &#39;tests/rfc2833_dtmf_detect&#39;] ...
Parsing /tmp/asterisk-testsuite/rfc2833_dtmf_detect/ast1/etc/asterisk/extconfig.conf
Parsing /tmp/asterisk-testsuite/rfc2833_dtmf_detect/ast1/etc/asterisk/logger.conf
Parsing /tmp/asterisk-testsuite/rfc2833_dtmf_detect/ast1/etc/asterisk/logger.general.conf.inc
Parsing /tmp/asterisk-testsuite/rfc2833_dtmf_detect/ast1/etc/asterisk/logger.logfiles.conf.inc
No handlers could be found for logger &quot;AMI&quot;
Creating Asterisk instance 1 ...
Starting Asterisk instance 1 ...
Executing [&#39;/usr/sbin/asterisk&#39;, &#39;-C&#39;, &#39;/tmp/asterisk-testsuite/rfc2833_dtmf_detect/ast1/etc/asterisk/asterisk.conf&#39;, &#39;-rx&#39;, &#39;core waitfullybooted&#39;] ...
Asterisk has fully booted.
Parsing /tmp/asterisk-testsuite/rfc2833_dtmf_detect/ast1/etc/asterisk/extconfig.conf
Asterisk ending (0).
Creating AMIFactory 1 ...
AMI 1 - connected, registering DTMF event...

Starting Phase 1...
received: 1234567890*#ABCD
expected: 1234567890*#ABCD
Phase 1 passed

Starting Phase 2...
received: 8675309***
expected: 8675309***
Phase 2 passed

Starting Phase 3...
received: 65748392A1B#C*D0
expected: 65748392A1B#C*D0
Phase 3 passed

final phase complete, stopping reactor
Stopping Asterisk instance 1 ...
Executing [&#39;/usr/sbin/asterisk&#39;, &#39;-C&#39;, &#39;/tmp/asterisk-testsuite/rfc2833_dtmf_detect/ast1/etc/asterisk/asterisk.conf&#39;, &#39;-rx&#39;, &#39;core stop gracefully&#39;] ...

rfc2833_dtmf_detect test PASSED. Yay.


&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;testsuite errors=&quot;0&quot; tests=&quot;1&quot; time=&quot;26.29&quot; failures=&quot;0&quot; name=&quot;AsteriskTestSuite&quot;&gt;
        &lt;testcase time=&quot;26.29&quot; name=&quot;tests/rfc2833_dtmf_detect&quot;/&gt;
&lt;/testsuite&gt;
</pre>
  </td>
 </tr>
</table>




<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>/asterisk/trunk/tests/rfc2833_dtmf_detect/configs/ast1/manager.general.conf.inc <span style="color: grey">(PRE-CREATION)</span></li>

 <li>/asterisk/trunk/tests/rfc2833_dtmf_detect/configs/ast1/sip.conf <span style="color: grey">(1790)</span></li>

 <li>/asterisk/trunk/tests/rfc2833_dtmf_detect/run-test <span style="color: grey">(1790)</span></li>

 <li>/asterisk/trunk/tests/rfc2833_dtmf_detect/configs/ast1/extensions.conf <span style="color: grey">(1790)</span></li>

 <li>/asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/broken_dtmf.pcap <span style="color: grey">(UNKNOWN)</span></li>

 <li>/asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/broken_dtmf.xml <span style="color: grey">(1790)</span></li>

 <li>/asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_1.pcap <span style="color: grey">(UNKNOWN)</span></li>

 <li>/asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_1_noend.pcap <span style="color: grey">(UNKNOWN)</span></li>

 <li>/asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_2.pcap <span style="color: grey">(UNKNOWN)</span></li>

 <li>/asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_2_noend.pcap <span style="color: grey">(UNKNOWN)</span></li>

 <li>/asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_3.pcap <span style="color: grey">(UNKNOWN)</span></li>

 <li>/asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_3_noend.pcap <span style="color: grey">(UNKNOWN)</span></li>

 <li>/asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_4.pcap <span style="color: grey">(UNKNOWN)</span></li>

 <li>/asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_4_noend.pcap <span style="color: grey">(UNKNOWN)</span></li>

 <li>/asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_5.pcap <span style="color: grey">(UNKNOWN)</span></li>

 <li>/asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_6.pcap <span style="color: grey">(UNKNOWN)</span></li>

 <li>/asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_7.pcap <span style="color: grey">(UNKNOWN)</span></li>

 <li>/asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_8.pcap <span style="color: grey">(UNKNOWN)</span></li>

 <li>/asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_9.pcap <span style="color: grey">(UNKNOWN)</span></li>

 <li>/asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_pound.pcap <span style="color: grey">(UNKNOWN)</span></li>

 <li>/asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_2833_star.pcap <span style="color: grey">(UNKNOWN)</span></li>

 <li>/asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_baseline.xml <span style="color: grey">(1790)</span></li>

 <li>/asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/dtmf_noend.xml <span style="color: grey">(1790)</span></li>

 <li>/asterisk/trunk/tests/rfc2833_dtmf_detect/sipp/register.xml <span style="color: grey">(1790)</span></li>

 <li>/asterisk/trunk/tests/rfc2833_dtmf_detect/test.lua <span style="color: grey">(1790)</span></li>

</ul>

<p><a href="https://reviewboard.asterisk.org/r/1329/diff/" style="margin-left: 3em;">View Diff</a></p>




  </td>
 </tr>
</table>








  </div>
 </body>
</html>