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/5Beginning ASP.NET Security Rating: 0 out of 5 stars0 ratingsTwilio Cookbook Rating: 0 out of 5 stars0 ratingsWindows Server 2012 Automation with PowerShell Cookbook Rating: 0 out of 5 stars0 ratingsCompTIA Network+ Review Guide: Exam N10-006 Rating: 0 out of 5 stars0 ratingsElastix Unified Communications Server Cookbook Rating: 0 out of 5 stars0 ratingsD Cookbook Rating: 0 out of 5 stars0 ratingsCentOS 8 Essentials: Learn to Install, Administer and Deploy CentOS 8 Systems Rating: 0 out of 5 stars0 ratingsNetwork Management A Complete Guide - 2021 Edition Rating: 0 out of 5 stars0 ratingsThe Algorithm Man: America's Cyber Sleuth Rating: 0 out of 5 stars0 ratingsBuilding Telephony Systems with OpenSER Rating: 0 out of 5 stars0 ratingsSELinux System Administration - Second Edition Rating: 0 out of 5 stars0 ratingsLearning Puppet for Windows Server Rating: 0 out of 5 stars0 ratingsBuilding Telephony Systems with OpenSIPS - Second Edition Rating: 0 out of 5 stars0 ratingsAsterisk 1.6 Rating: 0 out of 5 stars0 ratingsFreePBX 2.5 Powerful Telephony Solutions Rating: 0 out of 5 stars0 ratingsSELinux System Administration Rating: 0 out of 5 stars0 ratingsMastering FreeSWITCH Rating: 0 out of 5 stars0 ratingsIoT Security A Complete Guide - 2020 Edition Rating: 0 out of 5 stars0 ratingsThe Survival Guide to Maintaining Access and Evading Detection Post-Exploitation Rating: 0 out of 5 stars0 ratingsDocker Networking Cookbook Rating: 0 out of 5 stars0 ratingsTrojans, Worms, and Spyware: A Computer Security Professional's Guide to Malicious Code Rating: 4 out of 5 stars4/5Software Knowledge Rating: 0 out of 5 stars0 ratingsSimple Network Management Protocol A Complete Guide Rating: 0 out of 5 stars0 ratingsLearning Apache Thrift Rating: 0 out of 5 stars0 ratingsCacti 0.8 Network Monitoring Rating: 0 out of 5 stars0 ratings
Information Technology For You
Health 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 ratingsComputer Science: A Concise Introduction Rating: 4 out of 5 stars4/5How to Write Effective Emails at Work Rating: 4 out of 5 stars4/5Creating Online Courses with ChatGPT | A Step-by-Step Guide with Prompt Templates Rating: 4 out of 5 stars4/5AWS Certified Cloud Practitioner: Study Guide with Practice Questions and Labs Rating: 5 out of 5 stars5/5Inkscape Beginner’s Guide Rating: 5 out of 5 stars5/5The Basics of Hacking and Penetration Testing: Ethical Hacking and Penetration Testing Made Easy Rating: 4 out of 5 stars4/5Data Analytics for Beginners: Introduction to Data Analytics Rating: 4 out of 5 stars4/5An Ultimate Guide to Kali Linux for Beginners Rating: 3 out of 5 stars3/5WordPress Plugin Development: Beginner's Guide Rating: 0 out of 5 stars0 ratingsThe Ultimate Guide to Landing a Network Engineering Job Rating: 0 out of 5 stars0 ratingsHow To Use Chatgpt: Using Chatgpt To Make Money Online Has Never Been This Simple Rating: 0 out of 5 stars0 ratingsHacking Essentials - The Beginner's Guide To Ethical Hacking And Penetration Testing Rating: 3 out of 5 stars3/5Practical Ethical Hacking from Scratch Rating: 5 out of 5 stars5/5The Certified Fintech Professional Rating: 5 out of 5 stars5/5Supercommunicator: Explaining the Complicated So Anyone Can Understand Rating: 3 out of 5 stars3/5CompTIA Network+ CertMike: Prepare. Practice. Pass the Test! Get Certified!: Exam N10-008 Rating: 0 out of 5 stars0 ratingsWindows Registry Forensics: Advanced Digital Forensic Analysis of the Windows Registry Rating: 4 out of 5 stars4/5The Programmer's Brain: What every programmer needs to know about cognition Rating: 5 out of 5 stars5/5A Civic Technologist's Practice Guide Rating: 0 out of 5 stars0 ratingsLinux Command Line and Shell Scripting Bible Rating: 3 out of 5 stars3/5Summary of Super-Intelligence From Nick Bostrom Rating: 5 out of 5 stars5/5ChatGPT: The Future of Intelligent Conversation Rating: 4 out of 5 stars4/5DNS in Action Rating: 0 out of 5 stars0 ratingsQuantum Computing for Programmers and Investors: with full implementation of algorithms in C 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 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