<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/3693/">https://reviewboard.asterisk.org/r/3693/</a>
</td>
</tr>
</table>
<br />
<table bgcolor="#e0e0e0" width="100%" cellpadding="8" style="border: 1px gray solid;">
<tr>
<td>
<h1 style="margin-right: 0.2em; padding: 0; font-size: 10pt;">This change has been marked as submitted.</h1>
</td>
</tr>
</table>
<br />
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('https://reviewboard.asterisk.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
<tr>
<td>
<div>Review request for Asterisk Developers.</div>
<div>By Tyler Austin Cambron.</div>
<p style="color: grey;"><i>Updated Aug. 14, 2014, 4:12 p.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;">Committed in revision 5449</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-23953">Asterisk-23953</a>
</div>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
testsuite
</div>
<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 test uses the dialplan to enter the Authenticate application, which has been given a hard coded password, and sends the wrong dtmf password three times. The Authenticate application should respond twice with the sound file "auth-incorrect", and then after a third incorrect try, play "vm-goodbye" and end the session. This test checks, using a header match, to ensure that "auth-incorrect" is played twice, followed by "vm-goodbye". To make the test give off an event for the playing of "vm-goodbye", the line of code that was in charge of raising the event in app.c had to be moved to file.c. I will post the diff in this description for clarification. The AppTest module also had to be modified to allow for an action to be executed each time that the event is matched instead of just executing once, regardless of the number of times the header match was told to match the event.
app.c and file.c diff file:
Index: app.c
===================================================================
--- app.c (revision 415357)
+++ app.c (working copy)
@@ -256,7 +256,6 @@
filename = ast_strdupa(prompt);
while ((front = strsep(&filename, "&"))) {
- ast_test_suite_event_notify("PLAYBACK", "Message: %s\r\nChannel: %s", front, ast_channel_name(c));
if (!ast_strlen_zero(front)) {
res = ast_streamfile(c, front, ast_channel_language(c));
if (res)
Index: file.c
===================================================================
--- file.c (revision 415357)
+++ file.c (working copy)
@@ -1105,6 +1105,7 @@
return -1;
if (vfs && ast_applystream(chan, vfs))
return -1;
+ ast_test_suite_event_notify("PLAYBACK", "Message: %s\r\nChannel: %s", filename, ast_channel_name(chan));
res = ast_playstream(fs);
if (!res && vfs)
res = ast_playstream(vfs);
@@ -1611,7 +1612,6 @@
{
int res = 0;
if (!ast_strlen_zero(file)) {
- ast_test_suite_event_notify("PLAYBACK", "Message: %s\r\nChannel: %s", file, ast_channel_name(chan));
res = ast_streamfile(chan, file, ast_channel_language(chan));
if (!res) {
res = ast_waitstream(chan, digits);</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;">The test passes, and the logs show a call is made, the incorrect DTMF password is sent three times, the correct sound files are played as according to the header matches, and the session terminates upon hearing "vm-goodbye".</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/apps/tests.yaml <span style="color: grey">(5202)</span></li>
<li>/asterisk/trunk/tests/apps/authenticate/tests.yaml <span style="color: grey">(PRE-CREATION)</span></li>
<li>/asterisk/trunk/tests/apps/authenticate/off_nominal/test-config.yaml <span style="color: grey">(PRE-CREATION)</span></li>
<li>/asterisk/trunk/tests/apps/authenticate/off_nominal/configs/ast1/extensions.conf <span style="color: grey">(PRE-CREATION)</span></li>
<li>/asterisk/trunk/lib/python/asterisk/apptest.py <span style="color: grey">(5202)</span></li>
</ul>
<p><a href="https://reviewboard.asterisk.org/r/3693/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>