[Freeswitch-dev] lua session:playAndGetDigits question

Michael Jerris mike at jerris.com
Mon Feb 8 18:46:31 PST 2010


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


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-dev/attachments/20100208/cb781453/attachment.html 


More information about the FreeSWITCH-dev mailing list