Hi All, I haven't found a substantial example of IVR applications implemented in lua. Can anyone suggest where to look? My issue has to do with appropriate coding style.
I am implementing a voice message board application in lua. I want to allow the user to dial buttons to navigate forward and back in the list of messages. One way to implement playmessage() is to check for a forward/back command while playing the current message, and if a command is given to invoke playmessage() with the prev/next message in the list. However, this leaves a chain of unreturned playmessage calls on the execution stack (a recursive function). Alternatively, the playmessage() function can return control to its caller (perhaps a while loop that spins forever) and pass back a code to indicate the command. The caller acts accordingly. This is non-recursive, but for anything but simple applications this style becomes tedious as you start needing to pass back more info and up longer chains of functions. Any guidance on this would be appreciated. Thanks, Neil
_______________________________________________ FreeSWITCH-users mailing list [email protected] http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
