Synopses & Reviews
This bestselling book is now the standard guide to building phone systems with Asterisk, the open source IP PBX that has traditional telephony providers running scared! Revised for the 1.4 release of the software, the new edition of Asterisk: The Future of Telephony reveals how you can save money on equipment and support, and finally be in control of your telephone system.
If you've worked with telephony in the past, you're familiar with the problem: expensive and inflexible systems that are tuned to the vendor's needs, not yours. Asterisk isn't just a candle in the darkness, it's a whole fireworks show. Because Asterisk is so powerful, configuring it can seem tricky and difficult. This book steps you through the process of installing, configuring, and integrating Asterisk with your existing phone system.
You'll learn how to write dialplans, set up applications including speech synthesis and voice recognition, how to script Asterisk, and much more -- everything you need to design a simple but complete system with little or no Asterisk experience, and no more than rudimentary telecommunications knowledge. The book includes:
- A new chapter on managing/administering your Asterisk system
- A new chapter on using Asterisk with databases
- Coverage of features in Asterisk 1.4
- A new appendix on dialplan functions
- A simplified installation chapter
- New simplified SIP configuration, including examples for several popular SIP clients (soft phones and IP telephones)
- Revised chapters and appendicies reviewed and updated for the latest in features, applications, trends and best-practices
Asterisk is revolutionizing the telecom industry, due in large part to the way it gets along with other network applications. While other PBXs are fighting their inevitable absorption into the network, Asterisk embraces it. If you need to take control of your telephony systems, move to Asterisk and see what the future of telecommunications looks like.
Revised for the upcoming 1.8 release of the Asterisk open source PBX, this bestselling guide provides a complete roadmap for installing, configuring, and integrating this powerful software with existing phone systems. Asterisk: The Definitive Guide has everything you need to know to design a complete VoIP or analog system with little or no Asterisk experience, and no more than rudimentary telecommunications knowledge.
Written for experienced Linux power users and administrators, this book shows you how to write a basic dialplan step-by-step, and quickly gets you up to speed on several features new to Asterisk, including:
- Skype for Asterisk
- Fax capabilities (T.38)
- Clustering with Open AIS
- Jabber integration and XMPP
- Heartbeat cluster infrastructure (LinuxHA, failover)
- ISN and ENUM -- methods of circumventing the PSTN by dialing SIP URIs with numbers
- Security profile for Real-time Transport Protocol (RTP)
- Internet Protocol version 6 (IPv6)
This new edition of a bestselling standard brings the book up to date with the upcoming Asterisk 1.2 release, covering new features like templates that make Asterisk configuration much simpler.
"Asterisk Cookbook" contains recipes for getting more out of Asterisk--an open source PBX telephony system than runs on Linux. This Cookbook covers installing, configuring, and integrating Asterisk with existing phone systems, without the need for additional hardware.
Design a complete VoIP or analog PBX with Asterisk, even if you have no previous Asterisk experience and only basic telecommunications knowledge. This bestselling guide makes it easy, with a detailed roadmap to installing, configuring, and integrating this open source software into your existing phone system.
Ideal for Linux administrators, developers, and power users, this book shows you how to write a basic dialplan step by step, and quickly brings you up to speed on the latest Asterisk features in version 1.8.
- Integrate Asterisk with analog, VoIP, and digital telephony systems
- Build a simple interactive dialplan, and dive into advanced concepts
- Use Asterisks voicemail options—including a standalone voicemail server
- Build a menuing system and add applications that act on caller input
- Incorporate a relational database with MySQL and Postgre SQL
- Connect to external services such as LDAP, calendars, XMPP, and Skype
- Use Automatic Call Distribution to build a call queuing system
- Learn how to use Asterisks security, call routing, and faxing features
About the Author
Jim Van Meggelen is President and CTO of Core Telecom Innovations, a Canadian-based provider of open-source telephony solutions. He has over fifteen years of enterprise telecom experience, for such companies as Nortel, Williams and Telus, and has has extensive knowledge of both legacy and VoIP equipment from manufacturers such as Nortel, Cisco and Avaya.
Jim was the architect of two of the world's largest managed enterprise voice networks; each solution serving roughly twenty-thousand users in more than one-thousand communities across Canada, providing telecommunications in five different languages, through six time zones, administered completely from a central location. These networks pioneered the use of extensive automation and database control in a branch voice network - functionalities not generally available in proprietary telecommunications systems. Jim has now moved on from the world of proprietary telecom, and is commited to open-source telephony.
Jim is one of the principal contributors to the Asterisk Documentation Project, and is co-author of the bestselling O'Reilly book, Asterisk: The Future of Telephony. He enjoys teaching, public speaking, improvisational acting, and writing.
Russell Bryant is the Engineering Manager for the Open Source Software team at Digium, Inc. He has been a core member of the Asterisk development team since the Fall of 2004. At the first AstriCon in 2004, he was named the release maintainer for Asterisk's first major release series, Asterisk 1.0. He has since contributed to almost all areas of Asterisk development, from project management to core architectural design and development.
Table of Contents
Foreword; Preface; Audience; Organization; Software; Conventions Used in This Book; Using Code Examples; Safari Books Online; How to Contact Us; Acknowledgments; Chapter 1: A Telephony Revolution; 1.1 Asterisk and VoIP: Bridging the Gap Between Traditional and Network Telephony; 1.2 Massive Change Requires Flexible Technology; 1.3 Asterisk: The Hacker's PBX; 1.4 Asterisk: The Professional's PBX; 1.5 The Asterisk Community; 1.6 The Business Case; 1.7 Conclusion; Chapter 2: Asterisk Architecture; 2.1 Modules; 2.2 File Structure; 2.3 The Dialplan; 2.4 Hardware; 2.5 Asterisk Versioning; 2.6 Conclusion; Chapter 3: Installing Asterisk; 3.1 Installation Cheat Sheet; 3.2 Distribution Installation; 3.3 Software Dependencies; 3.4 Downloading What You Need; 3.5 How to Install It; 3.6 Base Configuration; 3.7 Updating Asterisk; 3.8 Common Issues; 3.9 Upgrading Asterisk; 3.10 Conclusion; Chapter 4: Initial Configuration Tasks; 4.1 asterisk.conf; 4.2 modules.conf; 4.3 indications.conf; 4.4 musiconhold.conf; 4.5 Conclusion; Chapter 5: User Device Configuration; 5.1 Telephone Naming Concepts; 5.2 Hardphones, Softphones, and ATAs; 5.3 Configuring Asterisk; 5.4 Loading Your New Channel Configurations; 5.5 Testing to Ensure Your Devices Have Registered; 5.6 Analog Phones; 5.7 A Basic Dialplan to Test Your Devices; 5.8 Under the Hood: Your First Call; 5.9 Conclusion; Chapter 6: Dialplan Basics; 6.1 Dialplan Syntax; 6.2 A Simple Dialplan; 6.3 Building an Interactive Dialplan; 6.4 Conclusion; Chapter 7: Outside Connectivity; 7.1 The Basics of Trunking; 7.2 Fundamental Dialplan for Outside Connectivity; 7.3 PSTN Circuits; 7.4 VoIP; 7.5 Emergency Dialing; 7.6 Conclusion; Chapter 8: Voicemail; 8.1 Comedian Mail; 8.2 Dialplan Integration; 8.3 Storage Backends; 8.4 Using Asterisk As a Standalone Voicemail Server; 8.5 Conclusion; Chapter 9: Internationalization; 9.1 Devices External to the Asterisk Server; 9.2 PSTN Connectivity, DAHDI, Digium Cards, and Analog Phones; 9.3 Asterisk; 9.4 Conclusion--Easy Reference Cheat Sheet; Chapter 10: Deeper into the Dialplan; 10.1 Expressions and Variable Manipulation; 10.2 Dialplan Functions; 10.3 Conditional Branching; 10.4 Macros; 10.5 GoSub(); 10.6 Local Channels; 10.7 Using the Asterisk Database (AstDB); 10.8 Handy Asterisk Features; 10.9 Conclusion; Chapter 11: Parking and Paging; 11.1 features.conf; 11.2 Overhead and "Underchin" Paging (a.k.a. Public Address); 11.3 Conclusion; Chapter 12: Internet Call Routing; 12.1 DNS and SIP URIs; 12.2 ENUM and E.164; 12.3 ISN, ITAD, and freenum.org; 12.4 Security and Identity; 12.5 Conclusion; Chapter 13: Automatic Call Distribution (ACD) Queues; 13.1 Creating a Simple ACD Queue; 13.2 Queue Members; 13.3 The queues.conf File; 13.4 The agents.conf File; 13.5 Advanced Queues; 13.6 Queue Statistics: The queue_log File; 13.7 Conclusion; Chapter 14: Device States; 14.1 Device States; 14.2 Extension States; 14.3 SIP Presence; 14.4 Using Custom Device States; 14.5 Distributed Device States; 14.6 Shared Line Appearances; 14.7 Conclusion; Chapter 15: The Automated Attendant; 15.1 An Auto Attendant Is Not an IVR; 15.2 Designing Your Auto Attendant; 15.3 Building Your Auto Attendant; 15.4 Conclusion; Chapter 16: Relational Database Integration; 16.1 Installing and Configuring PostgreSQL and MySQL; 16.2 Installing and Configuring ODBC; 16.3 Managing Databases; 16.4 A Gentle Introduction to func_odbc; 16.5 Getting Funky with func_odbc: Hot-Desking; 16.6 Using Realtime; 16.7 Storing Call Detail Records (CDRs); 16.8 ODBC Voicemail; 16.9 Conclusion; Chapter 17: Interactive Voice Response; 17.1 What Is IVR?; 17.2 Components of an IVR; 17.3 IVR Design Considerations; 17.4 Asterisk Modules for Building IVRs; 17.5 A Simple IVR Using CURL; 17.6 A Prompt-Recording Application; 17.7 Speech Recognition and Text-to-Speech; 17.8 Conclusion; Chapter 18: External Services; 18.1 Calendar Integration; 18.2 VoiceMail IMAP Integration; 18.3 Using XMPP (Jabber) with Asterisk; 18.4 Skype Integration; 18.5 LDAP Integration; 18.6 Text-to-Speech Utilities; 18.7 Conclusion; Chapter 19: Fax; 19.1 What Is a Fax?; 19.2 Ways to Handle Faxes in Asterisk; 19.3 spandsp; 19.4 Digium Fax For Asterisk; 19.5 Incoming Fax Handling; 19.6 Outgoing Fax Handling; 19.7 Fax Pass-Through; 19.8 Conclusion; Chapter 20: Asterisk Manager Interface (AMI); 20.1 Quick Start; 20.2 Configuration; 20.3 Protocol Overview; 20.4 Development Frameworks; 20.5 Interesting Applications; 20.6 Conclusion; Chapter 21: Asterisk Gateway Interface (AGI); 21.1 Quick Start; 21.2 AGI Variants; 21.3 AGI Communication Overview; 21.4 Development Frameworks; 21.5 Conclusion; Chapter 22: Clustering; 22.1 Traditional Call Centers; 22.2 Hybrid Systems; 22.3 Pure Asterisk, Nondistributed; 22.4 Asterisk and Database Integration; 22.5 Asterisk and Distributed Device States; 22.6 Multiple Queues, Multiple Sites; 22.7 Conclusion; Chapter 23: Distributed Universal Number Discovery (DUNDi); 23.1 How Does DUNDi Work?; 23.2 The dundi.conf File; 23.3 Configuring Asterisk for Use with DUNDi; 23.4 Conclusion; Chapter 24: System Monitoring and Logging; 24.1 logger.conf; 24.2 Call Detail Records; 24.3 CEL (Channel Event Logging); 24.4 SNMP; 24.5 Conclusion; Chapter 25: Web Interfaces; 25.1 Flash Operator Panel; 25.2 Queue Status and Reporting; 25.3 Call Detail Records; 25.4 A2Billing; 25.5 Conclusion; Chapter 26: Security; 26.1 Scanning for Valid Accounts; 26.2 Authentication Weaknesses; 26.3 Fail2ban; 26.4 Encrypted Media; 26.5 Dialplan Vulnerabilities; 26.6 Securing Asterisk Network APIs; 26.7 IAX2 Denial of Service; 26.8 Other Risk Mitigation; 26.9 Resources; 26.10 Conclusion--A Better Idiot; Chapter 27: Asterisk: A Future for Telephony; 27.1 The Problems with Traditional Telephony; 27.2 Paradigm Shift; 27.3 The Promise of Open Source Telephony; 27.4 The Future of Asterisk; Understanding Telephony; Analog Telephony; Digital Telephony; The Digital Circuit-Switched Telephone Network; Packet-Switched Networks; Conclusion; Protocols for VoIP; The Need for VoIP Protocols; VoIP Protocols; Codecs; Quality of Service; Echo; Asterisk and VoIP; VoIP Security; Conclusion; Preparing a System for Asterisk; Server Hardware Selection; Environment; Telephony Hardware; Types of Phones; Linux Considerations; Conclusion; Colophon;