O'Reilly logo

FreeSWITCH 1.6 Cookbook by Giovanni Maruzzelli, Michael S Collins, Anthony Minessale II

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 7. Dialplan Scripting with Lua

In this chapter, we will cover these recipes:

  • Creating a basic Lua script
  • User interaction and DTFM gathering
  • Using conditionals, loops, web calls, and regular expressions
  • Connecting to an external database

Introduction

An XML dialplan is the standard and most efficient way to describe how a call must be handled by FreeSWITCH. There are cases where you need loops, conditionals, and other call handling logic that is not easily expressed in XML. Enter scripting, and you can use your programming language of choice.

FreeSWITCH supports many scripting languages (almost all of them). These languages also allow you to use the same primitives and access the same variables, so they're all functionally equivalent. The difference ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required