text
stringlengths
0
152
Fifth Edition
Revision History for the Fifth Edition
2019-06-21: First Release
See https://www.oreilly.com/catalog/errata.csp?isbn=0636920140610 for release details.
The O’Reilly logo is a registered trademark of O’Reilly Media, Inc. Asterisk: The Definitive Guide, the
cover image, and related trade dress are trademarks of O’Reilly Media, Inc.
While the publisher and the authors have used good faith efforts to ensure that the information and
instructions contained in this work are accurate, the publisher and the authors disclaim all responsibility
for errors or omissions, including without limitation responsibility for damages resulting from the use of
or reliance on this work. Use of the information and instructions contained in this work is at your own
risk. If any code samples or other technology this work contains or describes is subject to open source
licenses or the intellectual property rights of others, it is your responsibility to ensure that your use
thereof complies with such licenses and/or rights.
Asterisk: The Definitive Guide is available under the Creative Commons Attribution-NonCommercial-
NoDerivatives 4.0 International License.
978-1-492-03160-4
[LSI]
Table of Contents
Foreword. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii
Preface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii
1. A Telephony Revolution. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Asterisk and VoIP: Bridging the Gap Between Traditional and Network
Telephony 2
The Zapata Telephony Project 3
Massive Change Requires Flexible Technology 4
Asterisk: The Hacker’s PBX 4
Asterisk: The Professional’s PBX 5
The Asterisk Community 5
Asterisk’s Discourse-Based Community Site 5
The Asterisk Mailing Lists 6
Asterisk Wiki Sites 6
The IRC Channels 7
Conclusion 7
2. Asterisk Architecture. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Modules 10
Applications 11
Bridging Modules 12
Call Detail Recording Modules 13
Channel Event Logging Modules 13
Channel Drivers 13
Codec Translators 14
Format Interpreters 15
Dialplan Functions 16
iii
PBX Modules 17
Resource Modules 17
Add-on Modules 19
Test Modules 19
File Structure 20
Configuration Files 20
Modules 20
The Resource Library 20
The Spool 20
Logging 21
The Dialplan 21
Hardware 21
Asterisk Versioning 22
Conclusion 22
3.
Installing Asterisk. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Linux Installation 26
Choosing Your Platform 27
VirtualBox Steps 27
Linux (OpenStack) Host 29
Dependencies 29
Asterisk Installation 35
Download and Prerequisites 35
Compiling and Installing 36
Initial Configuration 38
SELinux Tweaks 41
Firewall Tweaks 42
Final Tweaks 42
Validating Your New Asterisk System 44
Common Installation Errors 45
Some Final Configuration Notes 45
Sample Configuration Files for Future Reference 45
The Asterisk Shell Command 46
safe_asterisk 47
Conclusion 48
4. Certificates for Endpoint Security. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
The Inconvenience of Security 49