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



 <p>Ship it!</p>



 <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Hip.</pre>
 <br />







<p>- Joshua</p>


<br />
<p>On February 9th, 2012, 9:04 a.m., Matt Jordan 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, Mark Michelson and rmudgett.</div>
<div>By Matt Jordan.</div>


<p style="color: grey;"><i>Updated Feb. 9, 2012, 9:04 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;">In ASTERISK-18924, SIP INFO DTMF handling was changed to account for both lowercase alphabetic DTMF events, as well as uppercase alphabetic DTMF events.  When this occurred, the comparison of the character buffer containing the event code was changed such that the buffer was first compared against &#39;0&#39; and &#39;9&#39; to determine if it was numeric.  Unfortunately, since the first character in the buffer will typically be &#39;1&#39; in the case of event codes 10, 11, 16, and (if non-alphabetic) 12-15 (for &#39;A&#39; - &#39;D&#39;), this caused those codes to be converted to a DTMF event of &#39;1&#39;.

Pressing &#39;#&#39; in voicemail resulted in hilarity.

This patch changes this to attempt to parse the DTMF codes first as &#39;*&#39;, &#39;#&#39;, &#39;!&#39;, and &#39;A&#39;/&#39;a&#39; - &#39;D&#39;/&#39;d&#39;.  If those fail, it then converts the character buffer to an integer value; if this is invalid a 200 OK is sent and no DTMF tone is generated.

I didn&#39;t change the sending of a 200 OK for an invalid DTMF event sent from a UA, as that was the previous behavior.</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;">Test written for the Asterisk Test Suite (see review https://reviewboard.asterisk.org/r/1723/).  Without this patch the test fails, with it - great success.</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-19290">ASTERISK-19290</a>


</div>


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

 <li>/branches/10/channels/chan_sip.c <span style="color: grey">(354428)</span></li>

</ul>

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




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








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