<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 />
<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;">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;">Forgot to put Asterisk-dev into the review. Ouch.</pre>
</td>
</tr>
</table>
<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't 'pythonic', just let me know and I'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'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:
--> Running test 'tests/rfc2833_dtmf_detect' ...
Making sure Asterisk isn't running ...
Running ['tests/rfc2833_dtmf_detect/run-test', '-v', 'SVN-branch-1.8-r329203', '-n', 'tests/rfc2833_dtmf_detect'] ...
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 "AMI"
Creating Asterisk instance 1 ...
Starting Asterisk instance 1 ...
Executing ['/usr/sbin/asterisk', '-C', '/tmp/asterisk-testsuite/rfc2833_dtmf_detect/ast1/etc/asterisk/asterisk.conf', '-rx', 'core waitfullybooted'] ...
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 ['/usr/sbin/asterisk', '-C', '/tmp/asterisk-testsuite/rfc2833_dtmf_detect/ast1/etc/asterisk/asterisk.conf', '-rx', 'core stop gracefully'] ...
rfc2833_dtmf_detect test PASSED. Yay.
<?xml version="1.0" encoding="UTF-8"?>
<testsuite errors="0" tests="1" time="26.29" failures="0" name="AsteriskTestSuite">
        <testcase time="26.29" name="tests/rfc2833_dtmf_detect"/>
</testsuite>
</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>