<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">This example should help answer these questions.<div><br></div><div><a href="http://svn.freeswitch.org/svn/freeswitch/trunk/scripts/lua/callback.lua">http://svn.freeswitch.org/svn/freeswitch/trunk/scripts/lua/callback.lua</a></div><div><br></div><div>On Feb 8, 2010, at 3:33 AM, rentmycoder rentmycoder wrote:</div><div><div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Guys,<br><br>I would like to play a file and stop playing on (0,* or #) but don't<br>stop or restart playing on any other digit. I need to know which digit<br>was pressed...<br>How to achive this in lua?<br><br>local digits = session:playAndGetDigits(0, 1, 5, 3000, "0*#",<br>wavbasedir .. "f.wav", "", "\*|\#|0");<br><br>Is there any DETAILED doc how playAndGetDigits works or do I have to<br>dig into source?<br><font class="Apple-style-span" color="#000000"><font class="Apple-style-span" color="#144FAE"><br></font></font></div></blockquote><br></div><div>Thats the best example of returns from the input callback, I think you can also retun "true" to have the file continue uninterrupted.</div><div><br></div><div><a href="http://wiki.freeswitch.org/wiki/Mod_lua#session:setInputCallback">http://wiki.freeswitch.org/wiki/Mod_lua#session:setInputCallback</a></div><div><a href="http://wiki.freeswitch.org/wiki/Mod_lua">http://wiki.freeswitch.org/wiki/Mod_lua</a></div><div><br></div><div>Mike</div><div><br></div><div><br></div></div></body></html>