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





<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On October 18th, 2012, 3:24 p.m., <b>Joshua Colp</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I think we should have *some* kind of message. If someone doesn&#39;t configure things properly they&#39;ll be confused very very fast when DTMF comes in via INFO and nothing happens.</pre>
 </blockquote>




 <p>On October 18th, 2012, 3:45 p.m., <b>Alec Davis</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">The reason why I agreed with opticron, if you&#39;re operating asterisk is a hosted PBX environment, where the clients have the INFO+INBAND or INFO+RFC2833 setting wrong already. A new release would spam the CLI, each time they press a digit if the warning was still there.

I&#39;m also wondering now about other permutations;
dtmfmode=auto

What if the client sends RFC2833+INBAND+INFO.
There are 7 senarios to consider from a client point of view.
And a few less from Asterisk&#39;s dtmfmode point of view.</pre>
 </blockquote>





 <p>On October 18th, 2012, 3:48 p.m., <b>Joshua Colp</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Yes, and I&#39;m thinking from a simple user perspective. If their configuration was/is incorrect we would now silently drop the DTMF and give no warning. That&#39;s not good. As for auto stuff can certainly fall apart with that, I personally think you should be explicit with DTMF.</pre>
 </blockquote>





 <p>On October 18th, 2012, 3:52 p.m., <b>opticron</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Actually, I was suggesting more that it just not be a warning.  I would definitely prefer to have the message in a 3+ verbose or debug level.</pre>
 </blockquote>





 <p>On October 18th, 2012, 4 p.m., <b>rmudgett</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">How about as a LOG_DTMF message instead?</pre>
 </blockquote>





 <p>On October 18th, 2012, 4:01 p.m., <b>jcolp</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">LOG_DTMF isn&#39;t on by default, verbose has more of a chance of being seen for normal users</pre>
 </blockquote>





 <p>On October 19th, 2012, 3:26 a.m., <b>Alec Davis</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">@Joshua: looking at sip_rtp_read(), the test as to whether to forward an RF2833 frame isn&#39;t explicit. Maybe it should be.

        /* Don&#39;t forward RFC2833 if we&#39;re not supposed to */
        if (f &amp;&amp; (f-&gt;frametype == AST_FRAME_DTMF_BEGIN || f-&gt;frametype == AST_FRAME_DTMF_END) &amp;&amp;
            (ast_test_flag(&amp;p-&gt;flags[0], SIP_DTMF) != SIP_DTMF_RFC2833)) {
                ast_debug(1, &quot;Ignoring DTMF (%c) RTP frame because dtmfmode is not RFC2833\n&quot;, f-&gt;subclass.integer);
                ast_frfree(f);
                return &amp;ast_null_frame;
        }
</pre>
 </blockquote>








</blockquote>

<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Looks explicit to me?</pre>
<br />








<p>- jcolp</p>


<br />
<p>On October 19th, 2012, 3:25 a.m., Alec Davis 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.</div>
<div>By Alec Davis.</div>


<p style="color: grey;"><i>Updated Oct. 19, 2012, 3:25 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;">Asterisk 1.8.16.0

file:/var/log/asterisk/dtmf when only &#39;2&#39; was hit once
[2012-10-17 19:46:17.879406] DTMF[17084] channel.c: DTMF begin &#39;2&#39; received on SIP/822-00000000
[2012-10-17 19:46:17.879467] DTMF[17084] channel.c: DTMF begin ignored &#39;2&#39; on SIP/822-00000000
[2012-10-17 19:46:17.950953] DTMF[17084] channel.c: DTMF end &#39;2&#39; received on SIP/822-00000000, duration 800 ms
[2012-10-17 19:46:17.951004] DTMF[17084] channel.c: DTMF end passthrough &#39;2&#39; on SIP/822-00000000
[2012-10-17 19:46:18.019135] DTMF[17084] channel.c: DTMF end &#39;2&#39; received on SIP/822-00000000, duration 51 ms
[2012-10-17 19:46:18.019228] DTMF[17084] channel.c: DTMF end passthrough &#39;2&#39; on SIP/822-00000000


In ASTERISK-20218 the attached file it can be seen that both PA2P.rtf has both &#39;inband&#39; and &#39;SIP INFO&#39; set. </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;">Asterisk SVN-branch-1.8-r375111M

I was able to verify the same conditions on a Grandstream GXP2000.

Below is after proposed patch:

file:/var/log/asterisk/dtmf when &#39;820&#39; was entered

[2012-10-17 20:16:18.883821] DTMF[23460] channel.c: DTMF begin &#39;8&#39; received on SIP/822-00000004
[2012-10-17 20:16:18.883868] DTMF[23460] channel.c: DTMF begin ignored &#39;8&#39; on SIP/822-00000004
[2012-10-17 20:16:18.963537] DTMF[23460] channel.c: DTMF end &#39;8&#39; received on SIP/822-00000004, duration 89 ms
[2012-10-17 20:16:18.963559] DTMF[23460] channel.c: DTMF end passthrough &#39;8&#39; on SIP/822-00000004
[2012-10-17 20:16:19.263805] DTMF[23460] channel.c: DTMF begin &#39;2&#39; received on SIP/822-00000004
[2012-10-17 20:16:19.263851] DTMF[23460] channel.c: DTMF begin ignored &#39;2&#39; on SIP/822-00000004
[2012-10-17 20:16:19.363423] DTMF[23460] channel.c: DTMF end &#39;2&#39; received on SIP/822-00000004, duration 89 ms
[2012-10-17 20:16:19.363444] DTMF[23460] channel.c: DTMF end passthrough &#39;2&#39; on SIP/822-00000004
[2012-10-17 20:16:19.643830] DTMF[23460] channel.c: DTMF begin &#39;0&#39; received on SIP/822-00000004
[2012-10-17 20:16:19.643876] DTMF[23460] channel.c: DTMF begin ignored &#39;0&#39; on SIP/822-00000004
[2012-10-17 20:16:19.783561] DTMF[23460] channel.c: DTMF end &#39;0&#39; received on SIP/822-00000004, duration 140 ms
[2012-10-17 20:16:19.783582] DTMF[23460] channel.c: DTMF end passthrough &#39;0&#39; on SIP/822-00000004


Console:

    -- Executing [s@voicemail-main:2] VoiceMailMain(&quot;SIP/822-00000004&quot;, &quot;&quot;) in new stack
    -- &lt;SIP/822-00000004&gt; Playing &#39;vm-login.gsm&#39; (language &#39;en&#39;)
[2012-10-17 20:16:18.935436] WARNING[23399]: chan_sip.c:19239 handle_request_info: Ignoring DTMF_INFO message as DTMF_INBAND is set on channel SIP/822-00000004
[2012-10-17 20:16:19.325618] WARNING[23399]: chan_sip.c:19239 handle_request_info: Ignoring DTMF_INFO message as DTMF_INBAND is set on channel SIP/822-00000004
[2012-10-17 20:16:19.734910] WARNING[23399]: chan_sip.c:19239 handle_request_info: Ignoring DTMF_INFO message as DTMF_INBAND is set on channel SIP/822-00000004
    -- &lt;SIP/822-00000004&gt; Playing &#39;vm-password.gsm&#39; (language &#39;en&#39;)
asterix*CLI&gt;
</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-20218">ASTERISK-20218</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/1.8/channels/chan_sip.c <span style="color: grey">(375136)</span></li>

</ul>

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




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








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