In addition to important programming constructs such as conditionals and looping, there are other things that are possible by utilizing a scripting language. One of the advanced functions of a really useful IVR is the ability to interact with a third-party database. In some cases, this is a simple web lookup function. In other cases, it involves asking the caller for an account or ID number and a PIN code, and then polling a database. Let's consider simple examples of each method.
The LuaSQL interface implements a simple interface between Lua and a DBMS. (The LuaSQL interface is provided by the Kepler project. More information is available at http://www.keplerproject.org/luasql/.)