<div dir="ltr">Hello,<div><br></div><div>I&#39;m trying to capture DTMF when doing play_and_detect_speech:</div><div><br></div><div><div>function capture_dtmf(session,input_type,data,arg)</div><div>        if input_type == &quot;dtmf&quot; then</div>

<div>                freeswitch.consoleLog(&quot;CRIT&quot;,&quot;Key pressed: &quot; .. data[&quot;digit&quot;] .. &quot;\n&quot;)</div><div>        end</div><div>end</div></div><div><br></div><div><div>session:answer()</div>

<div>session:sleep(1000)</div><div>session:setInputCallback(&quot;capture_dtmf&quot;,&quot;true&quot;)<br></div></div><div><br></div><div><div>session:execute(&quot;play_and_detect_speech&quot;,</div><div>&quot;phrase:wellcome detect:unimrcp {start-input-timers=false,no-input-timeout=5000,recognition-timeout=5000, speech-language=es-ES}builtin:grammar/digits&quot;)</div>

</div><div><br></div><div><br></div><div><div>xml = session:getVariable(&#39;detect_speech_result&#39;)</div><div>if xml ~= nil then</div><div>        freeswitch.consoleLog(&quot;CRIT&quot;, xml ..&quot;\n&quot;)</div><div>

else</div><div>        freeswitch.consoleLog(&quot;CRIT&quot;, &quot;No result!\n&quot;)</div><div>end</div></div><div><br></div><div>The asr seems to work, but when no dtmf is captured in capture_dtmf. Is DTMF capture with input callback supported by play_and_detect_speech ? Need to use detect_speech ?</div>

<div><br></div><div>Thank you. Regards.</div></div>