<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 05/16/2014 04:50 PM, Olle E
      Johansson wrote:<br>
    </div>
    <blockquote cite="mid:20140516135051.7025.77609@sonic.digium.api"
      type="cite">
      <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
        <table style="border: 1px #c9c399 solid;" bgcolor="#f9f3c9"
          cellpadding="8" width="100%">
          <tbody>
            <tr>
              <td> This is an automatically generated e-mail. To reply,
                visit: <a moz-do-not-send="true"
                  href="https://reviewboard.asterisk.org/r/3546/">https://reviewboard.asterisk.org/r/3546/</a>
              </td>
            </tr>
          </tbody>
        </table>
        <br>
        <table 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;" bgcolor="#fefadf" cellpadding="8"
          cellspacing="0" width="100%">
          <tbody>
            <tr>
              <td>
                <div>Review request for Asterisk Developers.</div>
                <div>By Olle E Johansson.</div>
                <div style="margin-top: 1.5em;"> <b style="color:
                    #575012; font-size: 10pt;">Repository: </b>
                  Asterisk
                </div>
                <h1 style="color: #575012; font-size: 10pt; margin-top:
                  1.5em;">Description </h1>
                <table style="border: 1px solid #b8b5a0"
                  bgcolor="#ffffff" cellpadding="10" cellspacing="0"
                  width="100%">
                  <tbody>
                    <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 code in channel.c is wrong. It first checks if we have a length. If not, we set it to a measured time, which is fine.

If we have a length and it's under the minimum DTMF duration, we set it again to the measured time. In an RTP session, the duration can be under minimum, but has no relationship to the measured time between DTMF start and end. We should keep the given RTP DTMF time and use that for emulation. I have had DTMF that was extended by up to 60 ms because of this code and that really, really broke communication for these alarm panels that send many short DTMF tones.

I suggest that this fix goes into 1.8 and later revisions.</pre>
                      </td>
                    </tr>
                  </tbody>
                </table>
                <h1 style="color: #575012; font-size: 10pt; margin-top:
                  1.5em;">Testing </h1>
                <table style="border: 1px solid #b8b5a0"
                  bgcolor="#ffffff" cellpadding="10" cellspacing="0"
                  width="100%">
                  <tbody>
                    <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;">Hours and hours of reading DTMF logs. Countless cups of tea. A gazillion milliseconds wasted. All tested in 1.8.</pre>
                      </td>
                    </tr>
                  </tbody>
                </table>
                <h1 style="color: #575012; font-size: 10pt; margin-top:
                  1.5em;">Diffs </h1>
                <ul style="margin-left: 3em; padding-left: 0;">
                  <li>/trunk/main/channel.c <span style="color: grey">(414046)</span></li>
                </ul>
                <p><a moz-do-not-send="true"
                    href="https://reviewboard.asterisk.org/r/3546/diff/"
                    style="margin-left: 3em;">View Diff</a></p>
              </td>
            </tr>
          </tbody>
        </table>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
    </blockquote>
    <br>
    Hello,<br>
    <br>
    Could this patch help with high cpu usage issue #21872?<br>
  </body>
</html>