FreeSWITCH Cookbook - Anthony Minessale - E-Book

FreeSWITCH Cookbook E-Book

Anthony Minessale

0,0
23,99 €

oder
-100%
Sammeln Sie Punkte in unserem Gutscheinprogramm und kaufen Sie E-Books und Hörbücher mit bis zu 100% Rabatt.

Mehr erfahren.
Beschreibung

FreeSWITCH is an open source telephony platform designed to facilitate the creation of voice, chat, and video applications. It can scale from a soft-phone to a PBX and even up to an enterprise-class softswitch.In the FreeSWITCH Cookbook, members of the FreeSWITCH development team share some of their hard-earned knowledge with you in the book's recipes. Use this knowledge to improve and expand your FreeSWITCH installations.The FreeSWITCH Cookbook is an essential addition to any VoIP administrator's library.The book starts with recipes on how to handle call routing and then discusses connecting your FreeSWITCH server to the outside world.It then teaches you more advanced topics like CDR handling, practical examples of controlling FreeSWITCH with the event socket, and configuring many features commonly associated with a PBX installation.

Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:

EPUB

Veröffentlichungsjahr: 2012

Bewertungen
0,0
0
0
0
0
0
Mehr Informationen
Mehr Informationen
Legimi prüft nicht, ob Rezensionen von Nutzern stammen, die den betreffenden Titel tatsächlich gekauft oder gelesen/gehört haben. Wir entfernen aber gefälschte Rezensionen.



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 (<[email protected]>)

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 for their support while they get less time with me than any of us would like.

I'd also like to thank the countless volunteers that step up to help out in the FreeSWITCH and other open source project communities. It would be impossible to keep any project running without them.

About the Reviewers

Jonathan Augenstine, Telephony Systems Development and Operations.

After graduating from college in 1982, Jonathan spent 12 years working in the analytical instrumentation field developing and deploying equipment into electronics and disk drive analysis applications. He worked in applications, engineering, and software development, and as product manager on the team that developed custom wafer monitoring equipment that was incorporated into wafer fabs for Intel, DEC, and IBM.

The next 18 years saw Jonathan take a new career path. After leaving the analytical equipment business, he moved into software development in the telecommunications market developing firmware for computer based telephony hardware at Dialogic, a telephony hardware manufacturer. He led the software development team tasked with migrating the system software and firmware from Unix on to the Windows NT platform.

Through various employment and consulting positions following his experience at Dialogic, including positions such as VP of Engineering and Network Operations, Jonathan has been instrumental in developing and managing operations of services that have integrated the POTS network with next generation Internet enabled applications. These projects included developing and deploying an international conferencing application with local access on four continents that integrated with radio stations streaming on the Internet. Participated in integrating SS7 capability with database locating services to enable E911 services on the mobile phone network. Other projects included development and operations of fax, conferencing, and IVR services that were deployed by companies such as WorldCom, Qwest, and J2 Global Communications in domestic and international markets that scaled into high volume usage.

The most recent project that Jonathan has pursued is the design and development of new technology that facilitates connecting directly to the voice-mail platform.

Eric Z. Beard is the Chief Technical Officer at AutoLoop, a company that provides communications and marketing software to the automotive industry. He has more than ten years experience as a software consultant and development team leader, working at companies such as Brainbench, British Telecom, AT&T, and America Online. He uses FreeSWITCH as a part of an outbound IVR system in combination with Microsoft Speech Server to make customer service calls for auto dealerships.

Hugh Irvine lives in Australia and is the founder and past President of the Internet Society of Australia as well as the founding Co-Director of APNIC in Australia.

He has over 30 years experience in computing and network engineering. His principle area of expertise is in Internet engineering and operation. He has worked for many companies throughout Canada, France, and Australia. He is currently an independent consultant.

www.PacktPub.com

Support files, eBooks, discount offers and more

You might want to visit www.PacktPub.com for support files and downloads related to your book.

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 <[email protected]> for more details.

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.

http://PacktLib.PacktPub.com

Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can access, read and search across Packt's entire library of books. 

Why Subscribe?

Fully searchable across every book published by PacktCopy and paste, print and bookmark contentOn demand and accessible via 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 nine entirely free books. Simply use your login credentials for immediate access.

Preface

"Now what?"

That was the question that Anthony Minessale, Darren Schreiber, and Michael Collins asked themselves after the successful release of Packt Publishing's first FreeSWITCH book: FreeSWITCH 1.0.6. They were all tired from writing a book while still maintaining their day jobs and attempting to have a life outside of work. However, all felt a sense of pride and accomplishment at having released the first published book about FreeSWITCH. None wanted to lose the momentum.

It was decided that another book would be a good goal; but what kind of book? After kicking around a few ideas amongst themselves and members of the FreeSWITCH community, it was decided that a cookbook style publication would be a welcome addition. Packt Publishing agreed. Eventually it was decided that the most economical approach would be to focus on five basic subjects that are common to most FreeSWITCH installations.

What this book covers

Chapter 1, Routing Calls; getting calls from one endpoint to another is the primary function of FreeSWITCH. This chapter discusses techniques for efficiently routing calls between phones and service providers.

Chapter 2, Connecting Telephones and Service Providers; telephones and service providers have specific requirements for connecting to FreeSWITCH. This chapter will assist in quickly getting your FreeSWITCH server connected to other VoIP devices.

Chapter 3, Processing Call Detail Records; Call Detail Records, or CDRs, are very important for businesses. This chapter discusses a number of ways to extract CDR data from your FreeSWITCH server.

Chapter 4, External Control; FreeSWITCH can be controlled externally by the powerful and versatile event socket interface. This chapter presents a number of real-world examples of controlling FreeSWITCH from an external process.

Chapter 5, PBX Functionality; most telephone systems have common features like voicemail, conference calls, faxing, IVRs, and more. The final and largest chapter in the book, shows how to employ all of these features in a FreeSWITCH server.

Who this book is for

FreeSWITCH Cookbook is written for anyone who wants to learn more about using FreeSWITCH in production. By necessity some of the information contained herein overlaps with what is presented in FreeSWITCH 1.0.6. However, 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 focuses instead 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.