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

Company directory


Most companies have some form of dial-by-name directory. This recipe will show you how to add a company directory to your FreeSWITCH installation using mod_directory.

How to do it...

Enable and build mod_directory by following these steps:

  1. Open freeswitch_src/modules.conf in a text editor.

  2. Uncomment this line:

    #applications/mod_directory
  3. Save the file and exit.

  4. Linux/Unix users issue the proper make command:

    make mod_directory-install

Allow mod_directory to be loaded when FreeSWITCH starts:

  1. Open conf/autoload_configs/modules.conf.xml in a text editor.

  2. Uncomment this line:

    <!--<load module="mod_directory"/>-->
  3. Save the file and exit.

  4. Restart FreeSWITCH.

  5. Start fs_cli and issue the command show application.

You should see an application named directory in the list. Next we need to add a simple dialplan extension that will let us test:

  1. Open conf/dialplan/default/01_Custom.xml in a text editor.

  2. Add these lines:

    <extension name="dial by name">
      <condition field...