Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
FreeSWITCH 1.2
FreeSWITCH 1.2

FreeSWITCH 1.2: Whether you're an IT pro or an enthusiast, setting up your own fully-featured telephony system is an exciting challenge, made all the more realistic for beginners by this brilliant book on FreeSWITCH. A 100% practical tutorial. , Second Edition

eBook
£7.99 £28.99
Paperback
£37.99
Subscription
Free Trial
Renews at £16.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

FreeSWITCH 1.2

Chapter 2. Building and Installation

FreeSWITCH is open source software. Basically, this means that anyone can obtain, read, compile, mangle, fix, or do anything that comes to mind, the raw source code of the application. Many users, especially beginners, will find that dealing with source code is somewhat a daunting task, but rest assured, we are doing our best to make this experience as painless as possible. In the future, we will be adding binary packages into various popular Linux distributions, but for the time being, we will explain how to manually obtain and install FreeSWITCH for Unix and Windows. (For the purpose of this chapter, the terms Unix-like and Linux/Unix refer not only to Unix and Linux, but also to FreeBSD and Mac OS X.) Try not to fret if it seems overwhelming. With a little patience and luck, the whole process will go smoothly. It's not entirely unlike a root canal. It's been said that many root canals are pulled off without a hitch and when they go wrong, they go...

Setting up the FreeSWITCH environment


FreeSWITCH, like many other software applications, requires a suitable environment. Primarily that means choosing an appropriate operating system for your hardware and having the proper LAN/WAN connectivity and physical environment.

Operating system

The first question to consider here is: which operating system should be used? Generally speaking, it is good to use an operating system with which you are comfortable and familiar. One caveat to consider is 32-bit versus 64-bit. Some users have reported problems when running a 32-bit OS on a 64-bit hardware platform. We strongly recommend that you use a 64-bit OS if you have 64-bit hardware.

Those who prefer a Windows environment can use XP, Vista, Windows 7, Server 2003, Server 2008 R2, or Server 2012. Several users have reported good success with production systems running on modern hardware and using Windows Server 2008.

On the other hand, there is a wide variety of Unix-like operating systems available,...

Operating system prerequisites


Each operating system has its own set of prerequisites. Make sure that you have met the prerequisites for your platform. In the following sections we discuss Linux/Unix, Mac OS X, and Windows.

Linux/Unix

The following items are usually already installed on your system. Note that a Git client is not required:

  • Git: A Git client also gives you access to the current code repository (recommended especially for developers and those who want the latest code)

  • GNUMAKE: The GNU version of Make

  • AUTOCONF: Version 2.60 or higher

  • AUTOMAKE: Version 1.9 or higher

  • LIBTOOL: Version 1.5.14 or higher

  • GCC: Version 3.3 or higher

  • WGET: Any recent version

  • LIBNCURSES: Any recent version

  • BZIP2: Any recent version

Mac OS X

It is strongly recommended that Mac users have, at the very least, OS X Version 10.4. Compiling FreeSWITCH on OS X requires the installation of the Apple XCode Developer Tools. You may download them from http://connect.apple.com. Free registration is required.

Tip

Apple has been...

Text editors and XML


Working with FreeSWITCH requires you to have a text editor with which you are comfortable. Regardless of your editor choice, we strongly recommend that you use a text editor that supports XML syntax highlighting. You will find that editing XML configuration files is much easier on the eyes with highlighting turned on.

If you do not already have a preferred editor, we suggest trying one or two for your platform. Be aware that if you are in a Linux/Unix environment that does not have a Graphical User Interface (GUI), your choices will be fewer. However, there are several excellent text-only editors available:

  • Emacs: A text-only editor available for just about any Unix-like environment, including Mac OS X. It can highlight source code, XML, HTML, and more. This is the editor of choice for the FreeSWITCH development team. (A GUI version of Emacs is also available.)

  • Vi/Vim: A text-only editor available for just about any Unix-like environment. Like Emacs, it can highlight source...

Downloading the source


Most open source projects have their source code divided into two general categories: stable and latest. The FreeSWITCH project recently formed these two branches. Version 1.2.x is the stable branch and Version 1.3.x is the latest branch. Future releases will follow the even/odd numbering plan, where 1.4.x is stable and 1.5.x is the unstable or development branch. You can update to the latest branch at any time if you are using Git (see the Building from the latest code section in this chapter) One other point to keep in mind: binary distributions of FreeSWITCH might be available for your platform. While they are certainly convenient, in our experience it is easier to troubleshoot, update, and customize your FreeSWITCH installation when compiling from the source.

Be sure that your system has the Internet access because the build process will occasionally need to download additional files.

The source code can be obtained from the following FreeSWITCH download site:

http...

Building from the latest code


If you prefer to be on the latest version of FreeSWITCH, you will need a Git client. Use yum, apt, or whichever package manager your distribution has to install Git. In Windows, a popular (and free) client is TortoiseGit (code.google.com/p/tortoisegit).

In Linux/Unix environments a typical Git checkout and compile session would look like this:

#>cd /usr/src
#>git clone git://git.freeswitch.org/freeswitch.git
#>cd freeswitch
#>./bootstrap.sh
#>./configure -C
#>make install
#>make cd-sounds-install
#>make cd-moh-install

The preceding commands will take some time to complete. You can automate the process a bit by chaining the commands together with the && operator. These commands are discussed in more detail in the following sections.

Compiling FreeSWITCH for Linux/Unix/Mac OS X


The install procedure is essentially the same for Linux, Unix, or Mac OS X. However, make sure that your system has met the prerequisites listed in the previous section.

Compiling FreeSWITCH

Compiling FreeSWITCH requires just a few steps, although it will take some time depending upon the speed of your system. The basic procedure for compiling FreeSWITCH is as follows:

  1. Run the bootstrap.sh script.

  2. Edit the modules.conf file to customize which modules are compiled by default.

  3. Run the configure script.

  4. Run the make and make install utilities to compile and install.

  5. Edit modules.conf.xml to customize which modules are loaded by default.

  6. Install the sound and music files.

Following are detailed step-by-step instructions for compiling FreeSWITCH.

Step 1 – edit modules.conf

The modules.conf file contains a list of the various FreeSWITCH modules that will be configured and compiled. The default modules.conf file has a sensible set of modules pre-selected to be...

Compiling FreeSWITCH for Windows


As mentioned in the Operating system prerequisites section, FreeSWITCH is built with MSVC or MSVCEE. The steps presented here are specifically for MSVCEE 2010; however, the steps for the various editions of MSVC are essentially the same.

Important considerations for Windows users

Unless you are a developer, you may find that using the FreeSWITCH binary installer is more than adequate for your needs. Simply download the x86 or x64 freeswitch.msi from http://files.freeswitch.org/windows/installer/ and run the installer. It is extremely simple to do. More information about the binaries can be found online at http://wiki.freeswitch.org/wiki/Installation_for_Windows#Precompiled_Binaries.

With the new features present in Microsoft's Visual Studio 2010, it is now highly advisable that users should use this development environment instead of Visual Studio 2008. Please do note that the recommendation also applies to the Express Editions. Some of the exciting new modules...

Starting FreeSWITCH


Once you have compiled and installed FreeSWITCH, it is time to launch the application:

  • Linux/Unix/OS X: run /usr/local/freeswitch/bin/freeswitch

  • Windows: run freeswitchconsole.exe from the Release directory

The system will start loading, and numerous messages will display on the screen. Console messages are color-coded for readability. Do not worry about all of the messages right now, just make sure that your system starts up and you get to the FreeSWITCH console, which we call the command-line interface (CLI). The CLI prompt looks like the following:

freeswitch@localhost>

Let's issue a few commands to verify that the system is operational. First, issue the version command to verify the version of FreeSWITCH that we have installed. You'll see something similar to this:

FreeSWITCH Version 1.2.1

Next, issue the status command, which displays a few statistics about your system. You'll see output similar to this:

freeswitch@localhost> status
UP 0 years, 0 days, 0 hours...

Running FreeSWITCH in the background


In most cases, you will want FreeSWITCH to run in the background. In a Unix/Linux environment this is frequently called running as a daemon. In Windows this is called running as a service.

To launch FreeSWITCH as a daemon in Unix/Linux, execute the following command:

#>/usr/local/freeswitch/bin/freeswitch –nc

The various Linux and Unix distributions take different approaches to automatically running a daemon at system start up. Several initialization or init script examples are available on the FreeSWITCH wiki: wiki.freeswitch.org/wiki/Freeswitch_init. Consult the system administration documentation for your specific distribution for instructions on how to configure the init script to launch FreeSWITCH at system start up.

Windows requires just a few steps to have FreeSWITCH run as a service. They are as follows:

  1. Open a Windows command-line session (click on Start | Run, type cmd, and then click on the OK button).

  2. Change the directory into your FreeSWITCH...

Summary


In this chapter, we accomplished a number of objectives. They are as follows:

  • Downloaded and installed FreeSWITCH

  • Customized the installation by modifying the modules.conf file to compile the mod_flite TTS module (Linux/Unix/Mac OS X only)

  • Customized the FreeSWITCH configuration by modifying modules.conf.xml to automatically load mod_flite when FreeSWITCH is launched

  • Launched FreeSWITCH and issued several commands to confirm its operational status

  • Launched FreeSWITCH as a daemon (Linux/Unix) or as a service (Windows)

In the following chapter, we will put our new installation into action as we explore the demonstration configuration of FreeSWITCH.

Left arrow icon Right arrow icon

Key benefits

  • Learn how to install and configure a complete telephony system of your own, even if this is your first time using FreeSWITCHIn-depth discussions of important concepts like the dialplan, user directory, NAT handling, and the powerful FreeSWITCH event socketBest practices and expert tips from the FreeSWITCH experts, including the creator of FreeSWITCH, Anthony Minessale

Description

FreeSWITCH is an open source telephony platform designed to facilitate the creation of voice and chat-driven products, scaling from a soft-phone to a PBX and even up to an enterprise-class soft-switch. It is always exciting to design and build your own telephony system to suit your needs, but the task is time-consuming and involves a lot of technical skill."FreeSWITCH 1.2" comes to your rescue to help you set up a telephony system quickly and securely using FreeSWITCH. It is rich with practical examples and will give you all of the information and skills needed to implement your own PBX system.You will start with a detailed description of the FreeSWITCH system architecture. Thereafter you will receive step-by-step instructions on how to set up basic and advanced features for your telephony platform.The book begins by introducing the architecture and workings of FreeSWITCH before detailing how to plan a telephone system and then moves on to the installation, configuration, and management of a feature-packed PBX. You will learn about maintaining a user directory, XML dial plan, and advanced dial plan concepts, call routing, and the extremely powerful Event Socket. You will finally learn about the online community and history of FreeSWITCH."FreeSWITCH 1.2" is an indispensable tool for novice and expert alike.

Who is this book for?

This book is written for IT professionals and enthusiasts who are interested in quickly getting a powerful telephony system up and running using the free and open source application, FreeSWITCH. Telephony experience will be helpful, but not required.

What you will learn

  • Set up a basic system to make and receive phone calls, make calls between extensions, and utilize basic PBX functionalityDeploy different features of this telephony system with best practices and expert tipsUnderstand the inner workings and architecture of FreeSWITCHUse advanced features to create powerful dialplansOvercome frustrating NAT issuesControl FreeSWITCH remotely with the powerful event socketCreate web-controlled telephony apps with the new HTTAPI systemSecure your VoIP communications

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : May 24, 2013
Length: 428 pages
Edition : 2nd
Language : English
ISBN-13 : 9781782161011
Concepts :
Tools :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : May 24, 2013
Length: 428 pages
Edition : 2nd
Language : English
ISBN-13 : 9781782161011
Concepts :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
£16.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
£169.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just £5 each
Feature tick icon Exclusive print discounts
£234.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just £5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total £ 100.97
Linux Shell Scripting Cookbook, Second Edition
£37.99
FreeSWITCH 1.2
£37.99
FreeSWITCH Cookbook
£24.99
Total £ 100.97 Stars icon
Banner background image

Table of Contents

14 Chapters
Architecture of FreeSWITCH Chevron down icon Chevron up icon
Building and Installation Chevron down icon Chevron up icon
Test Driving the Example Configuration Chevron down icon Chevron up icon
SIP and the User Directory Chevron down icon Chevron up icon
Understanding the XML Dialplan Chevron down icon Chevron up icon
Using XML IVRs and Phrase Macros Chevron down icon Chevron up icon
Dialplan Scripting with Lua Chevron down icon Chevron up icon
Advanced Dialplan Concepts Chevron down icon Chevron up icon
Moving Beyond the Static XML Configuration Chevron down icon Chevron up icon
Controlling FreeSWITCH Externally Chevron down icon Chevron up icon
Web-based Call Control with mod_httapi Chevron down icon Chevron up icon
Handling NAT Chevron down icon Chevron up icon
VoIP Security Chevron down icon Chevron up icon
Advanced Features and Further Reading Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.5
(6 Ratings)
5 star 66.7%
4 star 16.7%
3 star 16.7%
2 star 0%
1 star 0%
Filter icon Filter
Top Reviews

Filter reviews by




BHUPENDRA SINGH Jul 19, 2013
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This concise yet excellent book takes you step by step through most of the key areas from installation to configuration,and it does so in a manner that seems to strike the right balance between brevity and depth.A very good resource specially if you plan to move from Asterisk to FreeSwitch;it got full chapter on Asterisk migration.It also got separate chapters on understanding dialplan, mod_httapi for web based call control etc..
Amazon Verified review Amazon
CHARLES WALSH Sep 04, 2017
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Très bien
Amazon Verified review Amazon
Ali R. Jun 04, 2013
Full star icon Full star icon Full star icon Full star icon Full star icon 5
The authors of this FreeSWITCH book come through again. The layout and presentation are fantastic. After I bought this book, I saved it like a treat till I could sit down and enjoy it. I Would buy again the next edition and I highly recommend it to anyone interested in telephony platforms.
Amazon Verified review Amazon
FPYM Jun 17, 2013
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I recently finished FreeSWITCH 1.2 and also own the first two FreeSWITCH books. Bottom line: This is an excellent book.What is does well: - discuss how to do a variety of tasks - explain WHY things are done - discuss advanced tasks in a fantastic method (NAT, Encryption)Target Audience: - New to Advanced will use this bookWhat I would love more of: - Encryption (more of a cursory discussion). I feel this is going to be very hot in the years to come and more descriptive information would be appropriate.5 stars. Very well priced, excellent resource.
Amazon Verified review Amazon
Rafal Gwizdala Jun 20, 2013
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
This book covers very broad range of subjects and is really helpful when you want to learn FreeSWITCH and its capabilities or if you want to start developing FS-based applications. It contains tons of information and examples (in a reasonable proportion) so it gets you quickly on the right track. However, i think some subjects could be explained in more details, especially the API commands and events (but this probably would make the book twice as big). All in all, it's a great book and I recommend it to everyone who wants to learn how FS works.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.