FreeSWITCH Cookbook
()
About this ebook
Anthony Minessale
Anthony Minessale has been working with computers for nearly 30 years. He is the primary author of FreeSWITCH and Director of Engineering for CudaTEL at Barracuda Networks.He created and continues to run the ClueCon Telephony Developers Conference,held every August in Chicago.He has extensive experience in the Internet industry and VoIP. Before creating FreeSWITCH, he contributed heavily to the Asterisk open source project, producing many features that are still in use today. At Barracuda Networks, Anthony oversees the production and development of the CudaTEL PBX appliance that uses FreeSWITCH as its core telephony engine.
Read more from Anthony Minessale
FreeSWITCH 1.2 Rating: 0 out of 5 stars0 ratingsFreeSWITCH 1.0.6 Rating: 0 out of 5 stars0 ratings
Related to FreeSWITCH Cookbook
Related ebooks
FreeSWITCH 1.6 Cookbook Rating: 0 out of 5 stars0 ratingsTroubleshooting CentOS Rating: 0 out of 5 stars0 ratingsPuppet Cookbook - Third Edition Rating: 5 out of 5 stars5/5Elastix Unified Communications Server Cookbook Rating: 0 out of 5 stars0 ratingsWiX Cookbook Rating: 0 out of 5 stars0 ratingsWindows Server 2012 Automation with PowerShell Cookbook Rating: 0 out of 5 stars0 ratingsMicrosoft Exchange 2013 Cookbook Rating: 0 out of 5 stars0 ratingsCompTIA Network+ Review Guide: Exam N10-006 Rating: 0 out of 5 stars0 ratingsVagrant Virtual Development Environment Cookbook Rating: 5 out of 5 stars5/5Hacker's Diary: Duty Free Rating: 0 out of 5 stars0 ratingsThe Algorithm Man: America's Cyber Sleuth Rating: 0 out of 5 stars0 ratingsLinux+ Study Guide: Exam: XK0-001 Rating: 5 out of 5 stars5/5CentOS 8 Essentials: Learn to Install, Administer and Deploy CentOS 8 Systems Rating: 0 out of 5 stars0 ratingsFreePBX 2.5 Powerful Telephony Solutions Rating: 0 out of 5 stars0 ratingsHack Attacks Revealed: A Complete Reference with Custom Security Hacking Toolkit Rating: 3 out of 5 stars3/5Building Telephony Systems with OpenSER Rating: 0 out of 5 stars0 ratingsTroubleshooting Ubuntu Server Rating: 0 out of 5 stars0 ratingsCybersecurity Experts Rating: 0 out of 5 stars0 ratingsHow to Cheat at Configuring Open Source Security Tools Rating: 0 out of 5 stars0 ratingsKismet Hacking Rating: 0 out of 5 stars0 ratingsIP multicast Third Edition Rating: 0 out of 5 stars0 ratingsBurp Suite A Complete Guide - 2019 Edition Rating: 0 out of 5 stars0 ratingsLearning Puppet for Windows Server Rating: 0 out of 5 stars0 ratingsHacking a Terror Network: The Silent Threat of Covert Channels Rating: 5 out of 5 stars5/5Red Hat Ansible A Complete Guide - 2020 Edition Rating: 0 out of 5 stars0 ratingsDigital Forensics Rating: 0 out of 5 stars0 ratingsHidden Realms - A Pathway To Hacking Rating: 5 out of 5 stars5/5Sphinx Search Beginner's Guide Rating: 4 out of 5 stars4/5
Information Technology For You
Creating Online Courses with ChatGPT | A Step-by-Step Guide with Prompt Templates Rating: 4 out of 5 stars4/5Computer Science: A Concise Introduction Rating: 4 out of 5 stars4/5Health Informatics: Practical Guide Rating: 0 out of 5 stars0 ratingsCompTIA ITF+ CertMike: Prepare. Practice. Pass the Test! Get Certified!: Exam FC0-U61 Rating: 0 out of 5 stars0 ratingsAWS Certified Cloud Practitioner: Study Guide with Practice Questions and Labs Rating: 5 out of 5 stars5/5CODING INTERVIEW: Advanced Methods to Learn and Excel in Coding Interview Rating: 0 out of 5 stars0 ratingsData Analytics for Beginners: Introduction to Data Analytics Rating: 4 out of 5 stars4/5Linux Command Line and Shell Scripting Bible Rating: 3 out of 5 stars3/5How To Use Chatgpt: Using Chatgpt To Make Money Online Has Never Been This Simple Rating: 0 out of 5 stars0 ratingsThe iPadOS 17: The Complete User Manual to Quick Set Up and Mastering the iPadOS 17 with New Features, Pictures, Tips, and Tricks Rating: 0 out of 5 stars0 ratingsHow to Write Effective Emails at Work Rating: 4 out of 5 stars4/5How to Find a Wolf in Siberia (or, How to Troubleshoot Almost Anything) Rating: 0 out of 5 stars0 ratingsHacking Essentials - The Beginner's Guide To Ethical Hacking And Penetration Testing Rating: 3 out of 5 stars3/5Information Security Best Practices: 205 Basic Rules Rating: 0 out of 5 stars0 ratingsAn Ultimate Guide to Kali Linux for Beginners Rating: 3 out of 5 stars3/5Windows Registry Forensics: Advanced Digital Forensic Analysis of the Windows Registry Rating: 4 out of 5 stars4/5Investigating Child Exploitation and Pornography: The Internet, Law and Forensic Science Rating: 5 out of 5 stars5/5Cybersecurity for Beginners : Learn the Fundamentals of Cybersecurity in an Easy, Step-by-Step Guide: 1 Rating: 0 out of 5 stars0 ratingsThe Programmer's Brain: What every programmer needs to know about cognition Rating: 5 out of 5 stars5/5Computer Organization and Design: The Hardware / Software Interface Rating: 4 out of 5 stars4/5Visual Studio Code for Python Programmers Rating: 0 out of 5 stars0 ratingsChatGPT: The Future of Intelligent Conversation Rating: 4 out of 5 stars4/5Panda3d 1.7 Game Developer's Cookbook Rating: 0 out of 5 stars0 ratingsRaspberry Pi :Raspberry Pi Guide On Python & Projects Programming In Easy Steps Rating: 3 out of 5 stars3/5Data Governance For Dummies Rating: 0 out of 5 stars0 ratingsHandbook of Digital Forensics and Investigation Rating: 4 out of 5 stars4/5Beginner's Guide to Information Security Rating: 0 out of 5 stars0 ratings
Reviews for FreeSWITCH Cookbook
0 ratings0 reviews
Book preview
FreeSWITCH Cookbook - Anthony Minessale
Table of Contents
FreeSWITCH 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
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
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 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
Ringback
See also
Time of day routing
Getting ready
How to do it...
How it works...
There's more...
See also
Manipulating 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 a SIP phone to register with FreeSWITCH
Getting ready
How to do it...
How it works...
There's more...
Caller ID
Customizing context
See also
Connecting audio devices with PortAudio
Getting ready
How to do it...
How it works...
There's more...
See also
Using FreeSWITCH as a softphone
Getting ready
How to do it...
How it works...
There's more...
See also
Configuring a SIP gateway
Getting ready
How to do it...
How it works...
There's more...
Adding prefixes to dial strings
Monitoring gateways
Configuring Google Voice
Getting ready
How to do it...
How it works...
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
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
Red Hat
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...
Controlling PortAudio
The XML RPC
In mod_xml_rpc
See also
5. PBX Functionality
Introduction
Creating users
Getting ready
How to do it...
How it works...
There's more...
Regular expressions with Regexp::Assemble
See also
Accessing voicemail
Getting ready
How to do it...
How it works...
See also
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...
How it works...
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...
Detecting a fax machine and responding
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
Listening to live calls with telecast
Getting ready
How to do it...
How it works...
See also
Recording calls
Getting ready
How to do it...
How it works...
There's more...
See also
Index
FreeSWITCH Cookbook
FreeSWITCH Cookbook
Copyright © 2012 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
Production Reference: 1160212
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-84951-540-5
www.packtpub.com
Cover Image by Asher Wishkerman (<a.wishkerman@mpic.de>)
Credits
Authors
Anthony Minessale
Michael S Collins
Darren Schreiber
Raymond Chandler
Reviewers
Jonathan Augenstine
Eric Z. Beard
Hugh Irvine
Acquisition Editor
Usha Iyer
Lead Technical Editor
Hithesh Uchil
Technical Editors
Vanjeet D'souza
Prasad Dalvi
Copy Editor
Leonard D'Silva
Project Coordinator
Joel Goveya
Proofreader
Matthew Humphries
Indexer
Monica Ajmera Mehta
Production Coordinator
Arvindkumar Gupta
Cover Work
Arvindkumar Gupta
About the Authors
Anthony Minessale has been working with computers for nearly 30 years. He is the primary author of FreeSWITCH and Director of Engineering at Barracuda Networks. Anthony created and continues to run the ClueCon Telephony Developers Conference held every August in Chicago.
Anthony has extensive experience in the Internet industry and VoIP. He has contributed heavily to the Asterisk open source project producing many features that are still in use today. At Barracuda Networks, Anthony oversees the production and development of the CudaTEL PBX appliance that uses FreeSWITCH as its core telephony engine. This is Anthony's second book; he has also co-authored the FreeSWITCH 1.0.6 book published by Packt Publishing.
I would like to thank my awesome family: my wife Jill, son Eric, and daughter Abbi, for putting up with the long hours and supporting me on my cause to revolutionize the telephony industry. I would also like to thank the open source community at large especially those involved in the FreeSWITCH project and I hope to see you all every summer at ClueCon!
Michael S. Collins is a telephony and open source software enthusiast. He is a PBX veteran, having worked as a PBX technician for five years and as the head of IT for a call center for more than nine years. Michael is an active member of the FreeSWITCH community and has co-authored Packt Publishing's FreeSWITCH 1.0.6. He resides in Central California with his wife and two children and currently works for Barracuda Networks, Inc.
I would like to thank first and foremost my wife, Lisa, my daughter Katherine and my son, Sean, who keep me going each day. I would also like to thank the many FreeSWITCH experts around the world who are so willing to answer technical questions: Michael Jerris, Moises Silva, Raymond Chandler, Mathieu René, Ken Rice, and many more. I would especially like to thank Brian K. West for patiently educating me in the ways of VoIP.
Finally, I give my continued thanks to Anthony Minessale. In addition to authoring an amazing piece of software he has graciously let me work closely with the very talented core FreeSWITCH development team.
Darren Schreiber is the CEO and Co-Founder of 2600hz. He began working heavily in open source voice with the FreeSWITCH project, where he engaged with Brian, Mike, and Anthony. His projects have since evolved into two enterprise VoIP platforms that allow a multitude of development of voice, SMS, and video applications to be delivered to customers. Darren's 15 years of voice and IT experience include developing multiple enterprise SaaS infrastructures for hosting and remotely managing IT, voice, and e-commerce services. Darren is a guest lecturer at major universities on VoIP technology and leads paid international VoIP trainings. As a serious telephony enthusiast since a young age, he has worked extensively with VoIP technologies. Darren graduated from Rensselaer Polytechnic Institute with a degree in Computer Science and Business Management.
Darren is also a co-author on the original FreeSWITCH Telephony Book.
I'd like to thank, first and foremost, the FreeSWITCH team. Without them, I wouldn't have been challenged with some of the most intriguing technology and people I've ever worked with. It has been a gift working with them.
I'd also like to thank my family and friends who have put up with my crazy work schedule and constant tardiness, and have helped provide funds and morale support for our work. Specifically my parents who demand a check-in on how things are going at least once a week. Thanks for everything.
Finally, I'd like to thank the open source community. Their tireless patience and countless selfless contributions are a constant reminder that the world is not an evil place, and that people are generally out for the greater good of society.
Raymond Chandler (@intralanman) has been working with, and contributing to, open source projects for over a decade. Raymond's VoIP experience started with a small CLEC/ITSP using SER for call routing, and Asterisk for voicemail and advanced services. After encountering limits in Asterisk and looking for features not easily found in SER, he moved to using OpenSER and CallWeaver (then known as OpenPBX.org). While that combination was better, Raymond still had not found his perfect solution.
In 2006, Raymond was introduced to FreeSWITCH. Since then, he's been using FreeSWITCH and regularly contributing to the community. Raymond is the author of mod_lcr and several utility PHP/perl scripts. Raymond now works with Anthony Minessale as a CudaTel Software Engineer at Barracuda Networks (@CudaTel and @BarracudaLabs).
In the spring of 2011, Raymond was among the founding members of the Open Source Telephony Advancement Group (@OSTAG), whose mission is to advance open source telephony to new heights by funding open source projects through funds received by generous contributions and grants from those who share the OSTAG vision.
I'd like to thank my loving wife, Samantha, and our children