Book Image

FreeSWITCH Cookbook

Book Image

FreeSWITCH Cookbook

Overview of this book

FreeSWITCH is an open source telephony platform designed to facilitate the creation of voice, chat, and video applications. It can scale from a soft-phone to a PBX and even up to an enterprise-class softswitch.In the FreeSWITCH Cookbook, members of the FreeSWITCH development team share some of their hard-earned knowledge with you in the book's recipes. Use this knowledge to improve and expand your FreeSWITCH installations.The FreeSWITCH Cookbook is an essential addition to any VoIP administrator's library.The book starts with recipes on how to handle call routing and then discusses connecting your FreeSWITCH server to the outside world.It then teaches you more advanced topics like CDR handling, practical examples of controlling FreeSWITCH with the event socket, and configuring many features commonly associated with a PBX installation.
Table of Contents (12 chapters)
FreeSWITCH Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Using fs_ivrd to manage outbound connections


FreeSWITCH supplies a tool that offers a simplified means of creating interactive scripts. Unlike the socket application presented in Using the ESL connection object for call control in this chapter, using fs_ivrd relieves the programmer from having to maintain socket connections and handle child processes. The fs_ivrd tool provides a simple interface using the STDIN and STDOUT file handles. The example Perl script presented here uses the ESL::IVR Perl module supplied with ESL. As of this writing there had not been any other fs_ivrd modules written for any of the other scripting languages.

Getting ready

This example requires that the ESL Perl module be properly compiled. See Setting up the event socket library earlier in this chapter. Also, it is helpful to have at least two terminal windows open so that you can view the script as well as fs_cli. Note: fs_ivrd is not supported in Windows environments.

How to do it...

First, add a new extension to...