<br><div class="h5"><br>
</div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">It shouldn&#39;t be hard to do with a small lua script with an input<br>

callback handling DTMFs.<br>
<br>
You could even create a small DTMF editor with a digit for &quot;backspace&quot;<br>
character for example, that would erase the last digit, or a digit that<br>
would say the current sequence....<br>
<br>
Check out:<br>
<a href="http://wiki.freeswitch.org/wiki/Lua#session:setInputCallback" target="_blank">http://wiki.freeswitch.org/wiki/Lua#session:setInputCallback</a><br>
<br>
François.<br>
<br></blockquote><div><br>Nice!<br><br> i wrote a small script:<br><br><br></div></div>function onInput(s, type, obj)<br>   if (type == &quot;dtmf&quot;) then<br>      freeswitch.consoleLog(&quot;info&quot;, &quot;DTMF Digit: &quot; .. obj.digit .. &quot;\n&quot;);<br>
      freeswitch.consoleLog(&quot;info&quot;, &quot;DTMF Duration: &quot; .. obj.duration .. &quot;\n&quot;);<br>      if (obj.duration &gt; 2000) then<br>        freeswitch.consoleLog(&quot;info&quot;, &quot;we got long DTMF \n&quot;);<br>
      end<br>   end<br>end<br><br><br>session:answer();<br>session:setInputCallback(&quot;onInput&quot;);<br>session:sleep(200);<br><br>while (session:ready() == true) do<br>   session:sleep(100);<br>end<br><br><br><br><br>
i run it in dialplan as:<br><br><br>&lt;include&gt;<br>  &lt;extension name=&quot;longPound&quot;&gt;<br>    &lt;condition field=&quot;destination_number&quot; expression=&quot;^pound$&quot;&gt;<br>      &lt;action application=&quot;lua&quot; data=&quot;Pound.lua&quot;/&gt;<br>
<br>      &lt;action application=&quot;playback&quot; data=&quot;bla1&quot;/&gt;<br>      &lt;action application=&quot;playback&quot; data=&quot;bla2&quot;/&gt;<br>      &lt;action application=&quot;playback&quot; data=&quot;bla3&quot;/&gt;<br>
<br><br>      &lt;!-- &lt;action application=&quot;sleep&quot; data=&quot;10000&quot;/&gt; --&gt;<br>    &lt;/condition&gt;<br>  &lt;/extension&gt;<br>&lt;/include&gt;<br><br><br><br>but it seems the lua scripts is blocking .... i never get to playback part. I need to make it run in background for the entire duration of the session<br>
<br>how can i do it?<br><br>T.<br><br>