Summary

In this chapter we delved right into the middle of a moderately complex LuaIVR.

We saw an example of how to implement different Lua FreeSWITCH techniques: logging, nesting, multiple files, setting and getting channel variables, accounting, asynchronous execution, web access, database access, error handling, post-hangup execution, functions, and more.

First, we introduced how to create interactive voice menus with PlayAndGetDigits(), the workhorse of FreeSWITCH LuaIVR scripting.

At the same time we showed TTS usage with say(), which is very useful both for prototyping and for reading arbitrary messages to the caller.

Then we originated a new call leg and connected the incoming call to the outbound leg, bridging them in an end-to-end call.

Get Mastering FreeSWITCH now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.