[Freeswitch-dev] lua session:playAndGetDigits question
Guys, I would like to play a file and stop playing on (0,* or #) but don't stop or restart playing on any other digit. I need to know which digit was pressed... How to achive this in lua? local digits = session:playAndGetDigits(0, 1, 5, 3000, "0*#", wavbasedir .. "f.wav", "", "\*|\#|0"); Is there any DETAILED doc how playAndGetDigits works or do I have to dig into source? Thanks in advance. Freeswitch ROCKS!!!
This example should help answer these questions. http://svn.freeswitch.org/svn/freeswitch/trunk/scripts/lua/callback.lua On Feb 8, 2010, at 3:33 AM, rentmycoder rentmycoder wrote:
Guys,
I would like to play a file and stop playing on (0,* or #) but don't stop or restart playing on any other digit. I need to know which digit was pressed... How to achive this in lua?
local digits = session:playAndGetDigits(0, 1, 5, 3000, "0*#", wavbasedir .. "f.wav", "", "\*|\#|0");
Is there any DETAILED doc how playAndGetDigits works or do I have to dig into source?
Thats the best example of returns from the input callback, I think you can also retun "true" to have the file continue uninterrupted. http://wiki.freeswitch.org/wiki/Mod_lua#session:setInputCallback http://wiki.freeswitch.org/wiki/Mod_lua Mike
participants (2)
-
Michael Jerris
-
rentmycoder rentmycoder