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
$9.99 $28.99
Paperback
$48.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing
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 : 9781782161004
Concepts :
Tools :

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

Product Details

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

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.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
$199.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
$279.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 $ 130.97
Linux Shell Scripting Cookbook, Second Edition
$48.99
FreeSWITCH 1.2
$48.99
FreeSWITCH Cookbook
$32.99
Total $ 130.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

What is included in a Packt subscription? Chevron down icon Chevron up icon

A subscription provides you with full access to view all Packt and licnesed content online, this includes exclusive access to Early Access titles. Depending on the tier chosen you can also earn credits and discounts to use for owning content

How can I cancel my subscription? Chevron down icon Chevron up icon

To cancel your subscription with us simply go to the account page - found in the top right of the page or at https://subscription.packtpub.com/my-account/subscription - From here you will see the ‘cancel subscription’ button in the grey box with your subscription information in.

What are credits? Chevron down icon Chevron up icon

Credits can be earned from reading 40 section of any title within the payment cycle - a month starting from the day of subscription payment. You also earn a Credit every month if you subscribe to our annual or 18 month plans. Credits can be used to buy books DRM free, the same way that you would pay for a book. Your credits can be found in the subscription homepage - subscription.packtpub.com - clicking on ‘the my’ library dropdown and selecting ‘credits’.

What happens if an Early Access Course is cancelled? Chevron down icon Chevron up icon

Projects are rarely cancelled, but sometimes it's unavoidable. If an Early Access course is cancelled or excessively delayed, you can exchange your purchase for another course. For further details, please contact us here.

Where can I send feedback about an Early Access title? Chevron down icon Chevron up icon

If you have any feedback about the product you're reading, or Early Access in general, then please fill out a contact form here and we'll make sure the feedback gets to the right team. 

Can I download the code files for Early Access titles? Chevron down icon Chevron up icon

We try to ensure that all books in Early Access have code available to use, download, and fork on GitHub. This helps us be more agile in the development of the book, and helps keep the often changing code base of new versions and new technologies as up to date as possible. Unfortunately, however, there will be rare cases when it is not possible for us to have downloadable code samples available until publication.

When we publish the book, the code files will also be available to download from the Packt website.

How accurate is the publication date? Chevron down icon Chevron up icon

The publication date is as accurate as we can be at any point in the project. Unfortunately, delays can happen. Often those delays are out of our control, such as changes to the technology code base or delays in the tech release. We do our best to give you an accurate estimate of the publication date at any given time, and as more chapters are delivered, the more accurate the delivery date will become.

How will I know when new chapters are ready? Chevron down icon Chevron up icon

We'll let you know every time there has been an update to a course that you've bought in Early Access. You'll get an email to let you know there has been a new chapter, or a change to a previous chapter. The new chapters are automatically added to your account, so you can also check back there any time you're ready and download or read them online.

I am a Packt subscriber, do I get Early Access? Chevron down icon Chevron up icon

Yes, all Early Access content is fully available through your subscription. You will need to have a paid for or active trial subscription in order to access all titles.

How is Early Access delivered? Chevron down icon Chevron up icon

Early Access is currently only available as a PDF or through our online reader. As we make changes or add new chapters, the files in your Packt account will be updated so you can download them again or view them online immediately.

How do I buy Early Access content? Chevron down icon Chevron up icon

Early Access is a way of us getting our content to you quicker, but the method of buying the Early Access course is still the same. Just find the course you want to buy, go through the check-out steps, and you’ll get a confirmation email from us with information and a link to the relevant Early Access courses.

What is Early Access? Chevron down icon Chevron up icon

Keeping up to date with the latest technology is difficult; new versions, new frameworks, new techniques. This feature gives you a head-start to our content, as it's being created. With Early Access you'll receive each chapter as it's written, and get regular updates throughout the product's development, as well as the final course as soon as it's ready.We created Early Access as a means of giving you the information you need, as soon as it's available. As we go through the process of developing a course, 99% of it can be ready but we can't publish until that last 1% falls in to place. Early Access helps to unlock the potential of our content early, to help you start your learning when you need it most. You not only get access to every chapter as it's delivered, edited, and updated, but you'll also get the finalized, DRM-free product to download in any format you want when it's published. As a member of Packt, you'll also be eligible for our exclusive offers, including a free course every day, and discounts on new and popular titles.