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





 <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">As discussed on #asterisk-dev, I think we&#39;ll benefit changing our the print command for the Python logging class.

I&#39;ve also added a few notes.  In the process of testing this now.</pre>
 <br />





<div>




<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
 <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
    <a href="https://reviewboard.asterisk.org/r/1363/diff/3/?file=18475#file18475line13" style="color: black; font-weight: bold; text-decoration: underline;">/asterisk/trunk/tests/apps/voicemail/check_voicemail_nominal/configs/ast1/extensions.conf</a>
    <span style="font-weight: normal;">

     (Diff revision 3)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>

  </tr>
 </tbody>




 
 



 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">13</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        same =&gt; n,Wait(2)</pre></td>
  </tr>

 </tbody>

</table>

<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">We should avoid using Wait() in the dialplan.</pre>
</div>
<br />

<div>




<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
 <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
    <a href="https://reviewboard.asterisk.org/r/1363/diff/3/?file=18484#file18484line46" style="color: black; font-weight: bold; text-decoration: underline;">/asterisk/trunk/tests/apps/voicemail/check_voicemail_nominal/run-test</a>
    <span style="font-weight: normal;">

     (Diff revision 3)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>

  </tr>
 </tbody>




 
 



 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">46</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        if state == &#39;AUTHENTICATED&#39;:</pre></td>
  </tr>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">47</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">            self.changeState(AuthenticatedTestState(self.controller, self.voiceMailTest))</pre></td>
  </tr>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">48</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        elif state == &#39;PLAYBACK&#39;:</pre></td>
  </tr>

 </tbody>

</table>

<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">invert code block. EG: Have large block on top.</pre>
</div>
<br />

<div>




<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
 <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
    <a href="https://reviewboard.asterisk.org/r/1363/diff/3/?file=18484#file18484line62" style="color: black; font-weight: bold; text-decoration: underline;">/asterisk/trunk/tests/apps/voicemail/check_voicemail_nominal/run-test</a>
    <span style="font-weight: normal;">

     (Diff revision 3)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>

  </tr>
 </tbody>




 
 



 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">62</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        return &quot;START&quot;</pre></td>
  </tr>

 </tbody>

</table>

<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Maybe we should turn the state values into constants within the VoiceMailState class.</pre>
</div>
<br />



<p>- Paul</p>


<br />
<p>On August 16th, 2011, 4:55 p.m., mjordan 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, David Vossel and Paul Belanger.</div>
<div>By mjordan.</div>


<p style="color: grey;"><i>Updated Aug. 16, 2011, 4:55 p.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 review is part 2 of 2.  It demonstrates writing a test in the Asterisk Test Suite that takes advantage of the TestEvent in Asterisk to exercise functionality in a complex application.  The test does the following:

1. Calls into VoiceMailMain and enters a password (optionally, it would also do a user mailbox, but the dialplan takes care of that.  The test is &#39;smart enough&#39; to recognize this)
2. Listens to an Urgent message, making sure that it hears the Urgent message first, then saves it to the old folder
3. Listens to two new messages, saving them to the old folder as well
4. Exits cleanly

This involves triggering off a number of events returned from app_voicemail, telling the test where it is in the sequence of playing voice prompts and what menu it happens to be in.  Since app_voicemail tends to recycle voice prompts in various places, the test &#39;helps itself&#39; a few times, but by and large the states are driven completely off of what is being sent from the application itself.</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/lib/python/asterisk/TestCase.py <span style="color: grey">(1839)</span></li>

 <li>/asterisk/trunk/lib/python/asterisk/TestState.py <span style="color: grey">(PRE-CREATION)</span></li>

 <li>/asterisk/trunk/lib/python/asterisk/voicemail.py <span style="color: grey">(1839)</span></li>

 <li>/asterisk/trunk/tests/apps/voicemail/check_voicemail_nominal/configs/ast1/extensions.conf <span style="color: grey">(PRE-CREATION)</span></li>

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

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

 <li>/asterisk/trunk/tests/apps/voicemail/check_voicemail_nominal/configs/ast1/sip.conf <span style="color: grey">(PRE-CREATION)</span></li>

 <li>/asterisk/trunk/tests/apps/voicemail/check_voicemail_nominal/configs/ast1/voicemail.conf <span style="color: grey">(PRE-CREATION)</span></li>

 <li>/asterisk/trunk/tests/apps/voicemail/check_voicemail_nominal/configs/ast2/extensions.conf <span style="color: grey">(PRE-CREATION)</span></li>

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

 <li>/asterisk/trunk/tests/apps/voicemail/check_voicemail_nominal/configs/ast2/manager.users.conf.inc <span style="color: grey">(PRE-CREATION)</span></li>

 <li>/asterisk/trunk/tests/apps/voicemail/check_voicemail_nominal/configs/ast2/sip.conf <span style="color: grey">(PRE-CREATION)</span></li>

 <li>/asterisk/trunk/tests/apps/voicemail/check_voicemail_nominal/run-test <span style="color: grey">(PRE-CREATION)</span></li>

 <li>/asterisk/trunk/tests/apps/voicemail/check_voicemail_nominal/test-config.yaml <span style="color: grey">(PRE-CREATION)</span></li>

 <li>/asterisk/trunk/tests/apps/voicemail/tests.yaml <span style="color: grey">(1839)</span></li>

</ul>

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




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








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