FreeSWITCH 1.6 Cookbook
()
About this ebook
- Learn how to create a fast and secure messaging and telephony system with FreeSWITCH
- Trap all the common functionalities of the telephony platform using popular communication protocols
- Move recipe by recipe to get the gist of the platform
FreeSWITCH 1.6 Cookbook is written for anyone who wants to learn more about using FreeSWITCH in production. The information is presented in such a way that you can get up and running quickly. The cookbook approach eschews much of the foundational concepts, and instead focuses on discrete examples that illustrate specific features. If you need to implement a particular feature as quickly as possible, then this book is for you.
Related to FreeSWITCH 1.6 Cookbook
Related ebooks
FreeSWITCH Cookbook Rating: 0 out of 5 stars0 ratingsTroubleshooting CentOS Rating: 0 out of 5 stars0 ratingsWindows Server 2012 Automation with PowerShell Cookbook Rating: 0 out of 5 stars0 ratingsMastering FreeSWITCH Rating: 0 out of 5 stars0 ratingsFreePBX 2.5 Powerful Telephony Solutions Rating: 0 out of 5 stars0 ratingsBuilding Telephony Systems with OpenSIPS - Second Edition Rating: 0 out of 5 stars0 ratingsIP multicast Third Edition Rating: 0 out of 5 stars0 ratingsBuilding Telephony Systems with OpenSER Rating: 0 out of 5 stars0 ratingsAsterisk 1.6 Rating: 0 out of 5 stars0 ratingsSecuring VoIP: Keeping Your VoIP Network Safe Rating: 5 out of 5 stars5/5Troubleshooting Ubuntu Server Rating: 0 out of 5 stars0 ratingsInstant Citrix Security How-to Rating: 0 out of 5 stars0 ratingsLearning Puppet for Windows Server Rating: 0 out of 5 stars0 ratingsSELinux System Administration - Second Edition Rating: 0 out of 5 stars0 ratingsMastering Microsoft Exchange Server 2016 Rating: 0 out of 5 stars0 ratingsSession Initiation Protocol SIP A Clear and Concise Reference Rating: 0 out of 5 stars0 ratingsLINUX CLEARLY EXPLAINED Rating: 2 out of 5 stars2/5CentOS 8 Essentials: Learn to Install, Administer and Deploy CentOS 8 Systems Rating: 0 out of 5 stars0 ratingsWindows Server 2012 Hyper-V Installation and Configuration Guide Rating: 0 out of 5 stars0 ratingsDeploying QoS for Cisco IP and Next Generation Networks: The Definitive Guide Rating: 5 out of 5 stars5/5How to Cheat at Configuring VmWare ESX Server Rating: 0 out of 5 stars0 ratingsHyper-V 2016 Best Practices Rating: 0 out of 5 stars0 ratingsMySQL Management and Administration with Navicat Rating: 0 out of 5 stars0 ratingsMySQL Complete Self-Assessment Guide Rating: 0 out of 5 stars0 ratingsMicrosoft BizTalk 2010: Line of Business Systems Integration Rating: 0 out of 5 stars0 ratingsLearning Apache Thrift Rating: 0 out of 5 stars0 ratingsCisco AVVID and IP Telephony Design and Implementation Rating: 0 out of 5 stars0 ratings
Computers For You
Standard Deviations: Flawed Assumptions, Tortured Data, and Other Ways to Lie with Statistics Rating: 4 out of 5 stars4/5The Hacker Crackdown: Law and Disorder on the Electronic Frontier Rating: 4 out of 5 stars4/5101 Awesome Builds: Minecraft® Secrets from the World's Greatest Crafters Rating: 4 out of 5 stars4/5Slenderman: Online Obsession, Mental Illness, and the Violent Crime of Two Midwestern Girls Rating: 4 out of 5 stars4/5Master Builder Roblox: The Essential Guide Rating: 4 out of 5 stars4/5The ChatGPT Millionaire Handbook: Make Money Online With the Power of AI Technology Rating: 0 out of 5 stars0 ratingsElon Musk Rating: 4 out of 5 stars4/5CompTIA IT Fundamentals (ITF+) Study Guide: Exam FC0-U61 Rating: 0 out of 5 stars0 ratingsSQL QuickStart Guide: The Simplified Beginner's Guide to Managing, Analyzing, and Manipulating Data With SQL Rating: 4 out of 5 stars4/5Ultimate Guide to Mastering Command Blocks!: Minecraft Keys to Unlocking Secret Commands Rating: 5 out of 5 stars5/5The Invisible Rainbow: A History of Electricity and Life Rating: 4 out of 5 stars4/5Procreate for Beginners: Introduction to Procreate for Drawing and Illustrating on the iPad Rating: 0 out of 5 stars0 ratingsMastering ChatGPT: 21 Prompts Templates for Effortless Writing Rating: 5 out of 5 stars5/5Learning the Chess Openings Rating: 5 out of 5 stars5/5Everybody Lies: Big Data, New Data, and What the Internet Can Tell Us About Who We Really Are Rating: 4 out of 5 stars4/5Alan Turing: The Enigma: The Book That Inspired the Film The Imitation Game - Updated Edition Rating: 4 out of 5 stars4/5User Friendly: How the Hidden Rules of Design Are Changing the Way We Live, Work, and Play Rating: 4 out of 5 stars4/5Storytelling with Data: Let's Practice! Rating: 4 out of 5 stars4/5CompTIA Security+ Practice Questions Rating: 2 out of 5 stars2/5Deep Search: How to Explore the Internet More Effectively Rating: 5 out of 5 stars5/5AP® Computer Science Principles Crash Course Rating: 0 out of 5 stars0 ratingsGarageBand Basics: The Complete Guide to GarageBand: Music Rating: 0 out of 5 stars0 ratingsDark Aeon: Transhumanism and the War Against Humanity Rating: 5 out of 5 stars5/5The Professional Voiceover Handbook: Voiceover training, #1 Rating: 5 out of 5 stars5/5
Reviews for FreeSWITCH 1.6 Cookbook
0 ratings0 reviews
Book preview
FreeSWITCH 1.6 Cookbook - Anthony Minessale II
Table of Contents
FreeSWITCH 1.6 Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why Subscribe?
Free Access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Sections
Getting ready
How to do it…
How it works…
There's more…
See also
Conventions
Reader feedback
Customer support
Downloading the example code
Downloading the color images of this book
Errata
Piracy
Questions
1. Routing Calls
Introduction
Regular expressions
Important dialplan contexts in the default configuration
The default context
The public context
The features context
Internal calls
Getting ready
How to do it...
How it works...
See also
Incoming DID (also known as DDI) calls
Getting ready
How to do it...
How it works...
There's more...
See also
Outgoing calls
Getting ready
How to do it...
How it works...
There's more...
See also
Ringing multiple endpoints simultaneously
Getting ready
How to do it...
How it works...
There's more...
See also
Ringing multiple endpoints sequentially (simple failover)
Getting ready
How to do it...
How it works...
There's more...
Handling busy and other failure conditions
Handling no-answer conditions
Using individual bridge calls
See also
Advanced multiple endpoint calling with enterprise originate
Getting ready
How to do it...
How it works...
There's more...
Setting variables in enterprise originate
Ringback
See also
Time-of-day routing
Getting ready
How to do it...
How it works...
There's more...
See also
Manipulating SIP To: headers on registered endpoints to reflect DID numbers
Getting ready
How to do it...
How it works...
2. Connecting Telephones and Service Providers
Introduction
Configuring an SIP phone to register with FreeSWITCH
Getting ready
How to do it...
How it works...
There's more...
Context
Customizing caller ID
See also
Connecting to Skype
Getting ready
How to do it...
How it works...
There's more...
Incoming Skype calls connected to an SIP softphone
Incoming SIP calls connected to Skype destinations
Configuring an SIP gateway
Getting ready
How to do it...
How it works...
There's more...
Adding prefixes to dial strings
Monitoring gateways
Codec configuration
Getting ready
How to do it...
How it works...
There's more...
Avoiding codec negotiation altogether
3. Processing Call Detail Records
Introduction
Using CSV CDRs
Getting ready
How to do it...
How it works...
There's more...
File names and locations
Other options
CDR CSV templates
See also
Using XML CDRs
Getting ready
How to do it...
How it works...
There's more...
File names and locations
Logging the B leg
See also
Inserting CDRs into a backend database
Getting ready
How to do it...
How it works...
There's more...
See also
Using a web server to handle XML CDRs
Getting ready
How to do it...
How it works...
There's more...
See also
Using the event socket to handle CDRs
Getting ready
How to do it...
How it works...
There's more...
ESL considerations
Receiving XML CDRs
See also
Directly inputting CDRs into various databases in real time
How to do it...
There's more...
4. External Control
Introduction
Getting familiar with the fs_cli interface
Getting ready
How to do it...
How it works...
There's more...
Important commands for listing information
Useful command-line options
Viewing events
See also
Setting up the event socket library
Getting ready
Debian/Ubuntu
Red Hat/CentOS
How to do it...
How it works...
Establishing an inbound event socket connection
Getting ready
How to do it...
How it works...
There's more...
See also
Establishing an outbound event socket connection
Getting ready
How to do it...
How it works...
There's more...
See also
Using fs_ivrd to manage outbound connections
Getting ready
How to do it...
How it works...
See also
Filtering events
Getting ready
How to do it...
How it works...
See also
Launching a call with an inbound event socket connection
Getting ready
How to do it...
How it works...
There's more...
See also
Using the ESL connection object for call control
Getting ready
How to do it...
How it works...
See also
Using the built-in web interface
Getting ready
How to do it...
How it works...
There's more...
See also
5. PBX Functionality
Introduction
Creating users
Getting ready
How to do it...
How it works...
There's more...
See also
Accessing voicemail
Getting ready
How to do it...
How it works...
See also
The company directory
How to do it...
How it works...
There's more...
See also
Using phrase macros to build sound prompts
Getting ready
How to do it...
How it works...
There's more...
See also
Creating XML IVR menus
Getting ready
How to do it...
There's more...
See also
Music on hold
Getting ready
How to do it...
How it works...
There's more...
Creating conferences
Getting ready
How to do it...
How it works...
There's more...
Caller controls
Conference moderator and PIN
Sending faxes
Getting ready
How to do it...
How it works...
There's more...
Diagnosing fax issues
Helpful software
See also
Receiving faxes
Getting ready
How to do it...
How it works...
There's more...
Detecting inbound faxes
Processing a received fax
See also
Basic text-to-speech with mod_flite
Getting ready
How to do it...
How it works...
See also
Advanced text-to-speech with mod_tts_commandline
Getting ready
How to do it...
How it works...
There's more...
Modifying the audio stream
Other TTS engines
Configuration file examples
See also
Recording calls
Getting ready
How to do it...
How it works...
There's more...
See also
6. WebRTC and Mod_Verto
Introduction
Configuring FreeSWITCH for WebRTC
Getting ready
How to do it...
How it works...
There's more...
SIP signaling in JavaScript with SIP.js (WebRTC client)
Getting ready
How to do it...
Minimal click-to-call caller client
Minimal callee
How it works...
See also
Verto installation and setup
How to do it...
How it works...
Verto signaling in JavaScript using Verto.js (Verto client)
How to do it...
How it works...
See also
7. Dialplan Scripting with Lua
Introduction
Creating a basic Lua script
Getting ready
How to do it...
How it works...
There's more...
See also
User interaction and DTMF gathering
Getting ready
How to do it...
How it works...
There's more...
Using conditionals, loops, web calls, and regular expressions
Getting ready
How to do it...
How it works...
There's more...
See also
Connecting to an external database
Getting ready
How to do it...
How it works...
There's more...
Index
FreeSWITCH 1.6 Cookbook
FreeSWITCH 1.6 Cookbook
Copyright © 2015 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: February 2012
Second Edition: July 2015
Production reference: 1170715
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78528-091-7
www.packtpub.com
Credits
Authors
Anthony Minessale II
Michael S Collins
Giovanni Maruzzelli
Reviewers
Ayobami Adewole
Josh Richesin
Gabe Shepard
Brian Wiese
Commissioning Editor
Amarabha Banerjee
Acquisition Editors
Usha Iyer
Kevin Colaco
Content Development Editor
Arshiya Ayaz Umer
Technical Editor
Ryan Kochery
Copy Editors
Miss Yesha G
Vikrant Phadke
Project Coordinator
Sanjeet Rao
Proofreader
Safis Editing
Indexer
Rekha Nair
Production Coordinator
Manu Joseph
Cover Work
Manu Joseph
About the Authors
Anthony Minessale II is the primary author and founding member of the FreeSWITCH open source softswitch. He has spent almost 20 years working with open source software. In 2001, he spent a great deal of time as an Asterisk developer and authored numerous features and fixes to that project. Anthony started coding a new idea for an open source voice application in 2005. The FreeSWITCH project was officially opened to the public on January 1, 2006. In the years that followed, Anthony has actively maintained and led software development for this project.
Michael S Collins is a telephony and open source software enthusiast. Having worked as a PBX technician for 5 years and the head of IT for a call center for more than 9 years, he is a PBX veteran. He is an active member of the FreeSWITCH community and has coauthored FreeSWITCH Cookbook, by Packt Publishing in 2012. Michael lives in Central California with his wife and two children.
Giovanni Maruzzelli (available at OpenTelecom.IT) is heavily engaged with FreeSWITCH. In it, he wrote interfacing with Skype and cellular phones. He's a consultant in the telecommunication sector, developing software and conducting training courses for FreeSWITCH, SIP, WebRTC, Kamailio, and OpenSIPS.
An Internet technology pioneer, he was the cofounder of Italia Online in 1996. It is the most popular Italian portal and consumer ISP. Also, he was the architect of its Internet technologies (www.italiaonline.it). Then, Giovanni was the supervisor of Internet operations and the architect of the first engine for paid access to ilsole24ore.com, the most read financial newspaper in Italy, and its databases (migrated from the mainframe).
After that, he was the CEO of the venture-capital-funded company Matrice, developing telemail unified messaging and multiple-language phone access to e-mail (text to speech). He was also the CTO of the incubator-funded company Open4, an open source managed applications provider.
For 2 years, Giovanni worked in Serbia as an Internet and telecommunication investment expert for IFC, an arm of The World Bank.
Since 2005, he has been based in Italy and serves ICT and telecommunication companies worldwide.
For my first book, first and foremost I want to thank my late guru, Marco Amante, who taught me to work, to write, computerism,
the most important things in life, as well as their order. Thanks, master!
Also, I want to thank Gisella Genna for her continued, incredible, and precious support and love. Thanks, my beloved!
About the Reviewers
Ayobami Adewole is a software engineer who has spent the last 4 years working on various cutting-edge VoIP solutions using FreeSwitch IP-PBX. He graduated with a degree in computer science from the Ladoke Akintola University of Technology, Ogbomoso, Nigeria. He has developed applications and authored solutions for different projects, such as land administration and geographical information systems, enterprise-level application integrations, and unified communication and software applications for the education and business sectors. In his spare time, he enjoys experimenting with new technologies.
I would like to acknowledge my parents for instilling in me the culture of discipline and hard work. Also, my gratitude goes to my partner for always encouraging me. Lastly, I want to thank everyone who had assisted me and given me the opportunity to pursue my passion for technology.
Josh Richesin is a cofounder of Sureline Broadband, a broadband and telephony company based in Madras, Oregon, USA. He also has his own private consulting practice, primarily for service providers. He has been in the telecommunication industry for his entire career and has always had a focus on large, mission-critical networks in the service providers' realm. You can contact Josh and read his blog at www.joshrichesin.com.
Gabe Shepard is a master developer at Star2Star Communications and has been dabbling in the VoIP world for nearly a decade. Prior to that, he focused on Linux systems administration and web development. He currently lives in Sarasota, Florida, USA, with his wife, Kelli, and their two daughters, Charlotte and Lucille. You can contact him at extrema.net.
Brian Wiese has always been passionate about technology and enjoys sharing his knowledge with others. Employed by an educational software and consulting company serving the requirements of schools throughout the United States, he continues to fulfill his personal commitment in finding sustainable and cost-effective solutions for educators. Brian's more than 10 years of experience in telephony helps him identify winning strategies for VoIP integration.
First, I wish to thank the authors of this cookbook for giving me the opportunity to review it after reviewing FreeSWITCH 1.2. Again, I'd like to recognize the accomplishments of Anthony and the rest of the community in making FreeSWITCH an amazing telephony platform. Finally, I send a most sincere thank you to my parents and friends for all of their encouragement, support, and inspiration.
www.PacktPub.com
Support files, eBooks, discount offers, and more
For support files and downloads related to your book, please visit www.PacktPub.com.
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at
At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.
https://www2.packtpub.com/books/subscription/packtlib
Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can search, access, and read Packt's entire library of books.
Why Subscribe?
Fully searchable across every book published by Packt
Copy and paste, print, and bookmark content
On demand and accessible via a web browser
Free Access for Packt account holders
If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib today and view 9 entirely free books. Simply use your login credentials for immediate access.
Preface
FreeSWITCH is increasingly becoming the serious choice
for companies to base their products and offerings on. Its usage is widespread, scaling from Raspberry Pis to Big Irons
in the data center.
There is a growing need for books and training, and with Packt Publishing, we decided to begin serving this burgeoning demand. This cookbook is a