Home Page Icon
Home Page
Table of Contents for
Cover
Close
Cover
by Leif Madsen, Russell Bryant, Jim Van Meggelen
Asterisk: The Definitive Guide, 5th Edition
Foreword
Joshua Colp (Senior Software Developer, Sangoma/Digium)
Dan Jenkins (Founder, Nimble Ape Ltd)
Joyce Wilmot (Senior Web Developer)
Matt Florell (Founder, VICIdial)
Matt Fredrickson (Director of Asterisk Engineering, Sangoma/Digium)
Preface
Audience
Software
Conventions Used in This Book
O’Reilly Online Learning
How to Contact Us
Acknowledgments from Jim Van Meggelen
1. A Telephony Revolution
Asterisk and VoIP: Bridging the Gap Between Traditional and Network Telephony
The Zapata Telephony Project
Massive Change Requires Flexible Technology
Asterisk: The Hacker’s PBX
Asterisk: The Professional’s PBX
The Asterisk Community
Asterisk’s Discourse-Based Community Site
The Asterisk Mailing Lists
Asterisk Wiki Sites
The IRC Channels
Conclusion
2. Asterisk Architecture
Modules
Applications
Bridging Modules
Call Detail Recording Modules
Channel Event Logging Modules
Channel Drivers
Codec Translators
Format Interpreters
Dialplan Functions
PBX Modules
Resource Modules
Add-on Modules
Test Modules
File Structure
Configuration Files
Modules
The Resource Library
The Spool
Logging
The Dialplan
Hardware
Asterisk Versioning
Conclusion
3. Installing Asterisk
Linux Installation
Choosing Your Platform
VirtualBox Steps
Linux (OpenStack) Host
Dependencies
Asterisk Installation
Download and Prerequisites
Compiling and Installing
Initial Configuration
SELinux Tweaks
Firewall Tweaks
Final Tweaks
Validating Your New Asterisk System
Common Installation Errors
Some Final Configuration Notes
Sample Configuration Files for Future Reference
The Asterisk Shell Command
safe_asterisk
Conclusion
4. Certificates for Endpoint Security
The Inconvenience of Security
Securing SIP
Subscriber Names
Secure SIP Signaling
Securing Media
Encrypted RTP
Conclusion
5. User Device Configuration
Telephone Naming Concepts
Hardphones, Softphones, and ATAs
Configuring Asterisk
How Channel Configuration Works with the Dialplan
chan_pjsip
Testing to Ensure Your Devices Have Registered
A Basic Dialplan to Test Your Devices
Under the Hood: Your First Call
Conclusion
6. Dialplan Basics
Dialplan Syntax
Contexts
Extensions
Priorities
Applications
The Answer(), Playback(), and Hangup() Applications
A Basic Dialplan Prototype
A Simple Dialplan
Hello World
Building an Interactive Dialplan
The Goto(), Background(), and WaitExten() Applications
Handling Invalid Entries and Timeouts
Using the Dial() Application
Using Variables
Pattern Matching
Includes
Conclusion
7. Outside Connectivity
The Basics of Trunking
Fundamental Dialplan for Outside Connectivity
The PSTN
Traditional PSTN Trunks
VoIP
Network Address Translation
PSTN Termination and Origination
Configuring SIP Trunks
Emergency Dialing
Conclusion
8. Voicemail
The voicemail.conf File
An Initial voicemail.conf File
The [general] Section
The [zonemessages] Section
Mailboxes
Voicemail Dialplan Integration
The VoiceMail() Dialplan Application
The VoiceMailMain() Dialplan Application
Standard Voicemail Keymap
Creating a Dial-by-Name Directory
Voicemail to Email
Voicemail Storage Backends
Linux Filesystem
IMAP
Message Storage in a Database
Conclusion
9. Internationalization
Devices External to the Asterisk Server
PSTN Connectivity, DAHDI, Digium Cards, and Analog Phones
DAHDI Drivers
Internationalization Within Asterisk
Caller ID
Language and/or Accent of Prompts
Time/Date Stamps and Pronunciation
Conclusion—Easy Reference Cheat Sheet
10. Deeper into the Dialplan
Expressions and Variable Manipulation
Basic Expressions
Operators
Dialplan Functions
Syntax
Examples of Dialplan Functions
Conditional Branching
The GotoIf() Application
Time-Based Conditional Branching with GotoIfTime()
GoSub
Defining Subroutines
Returning from a Subroutine
Local Channels
Using the Asterisk Database
Storing Data in the AstDB
Retrieving Data from the AstDB
Deleting Data from the AstDB
Using the AstDB in the Dialplan
Handy Asterisk Features
Conferencing with ConfBridge()
Handy Dialplan Functions
CALLERID()
CHANNEL()
CURL()
CUT()
IF() and STRFTIME()
LEN()
REGEX()
STRFTIME()
Conclusion
11. PBX Features, Including Parking, Paging, and Conferencing
features.conf
The [general] Section
The [featuremap] Section
The [applicationmap] Section
Application Map Grouping
Parking and Paging
Call Parking
Paging (aka Public Address)
Places to Send Your Pages
Zone Paging
Advanced Conferencing
Video Conferencing
Conclusion
12. Automatic Call Distribution Queues
Creating a Simple ACD Queue
Queue Members
Controlling Queue Members via the CLI
Defining Queue Members in the queue_members Table
Controlling Queue Members with Dialplan Logic
Automatically Logging Into and Out of Multiple Queues
Advanced Queues
Priority Queue (Queue Weighting)
Queue Member Priority
Changing Penalties Dynamically (queuerules)
Announcement Control
Overflow
Using Local Channels
Queue Statistics: The queue_log File
Conclusion
13. Device States
Device States
Checking Device States
Extension States Using the hint Directive
Hints
Checking Extension States
SIP Presence
Using Custom Device States
Conclusion
14. The Automated Attendant
An AA Is Not an IVR
Designing Your AA
The Greeting
The Main Menu
Timeout
Invalid
Dial by Extension
Building Your AA
Recording Prompts
The Dialplan
Delivering Incoming Calls to the AA
IVR
Conclusion
15. Relational Database Integration
Your Choice of Database
Managing Databases
Troubleshooting Database Issues
SQL Injection
Powering Your Dialplan with func_odbc
A Gentle Introduction to func_odbc
Getting Funky with func_odbc: Hot-Desking
Using Realtime
Static Realtime
Dynamic Realtime
Storing Call Detail Records
Database Integration of ACD Queues
Storing Dialplan Parameters for a Queue in a Database
Writing queue_log to Database
Conclusion
16. Introduction to Interactive Voice Response
Components of an IVR
IVR Design Considerations
Asterisk Modules for Building IVRs
CURL()
func_odbc
AGI
AMI
ARI
A Simple IVR Using CURL()
The Dialplan
A Prompt-Recording IVR Function
Speech Recognition and Text-to-Speech
Text-to-Speech
Speech Recognition
Conclusion
17. Asterisk Manager Interface and Call Files
Call Files
Your First Call File
Notes About Call Files
AMI Quick Start
AMI over TCP
AMI over HTTP
Configuration
manager.conf
http.conf
Protocol Overview
Message Encoding
AMI over HTTP
Example Usage
Originating a Call
Redirecting a Call
Development Frameworks
Conclusion
18. Asterisk Gateway Interface
Quick Start
AGI Variants
Process-Based AGI
FastAGI—AGI over TCP
Async AGI—AMI-Controlled AGI
AGI Communication Overview
Setting Up an AGI Session
Commands and Responses
Ending an AGI Session
Example: Account Database Access
Development Frameworks
Conclusion
19. Asterisk REST Interface
ARI Quick Start
Basic Asterisk Configuration
Testing Your Basic ARI Environment
Working with Your ARI Environment Using Swagger
The Building Blocks of ARI
REST
WebSocket
Stasis
Frameworks
ari-py (and aioari) for Python
node-ari-client
AsterNET.ARI
ari4java
phpari
aricpp
asterisk-ari-client
Conclusion
20. WebRTC
The Browser as a Telephone
Preliminary Knowledge
Configuring Asterisk for WebRTC
Cyber Mega Phone
More About WebRTC
Conclusion
21. System Monitoring and Logging
logger.conf
Reviewing Asterisk Logs
Logging to the Linux syslog Daemon
Verifying Logging
Log Rotation
Call Detail Records
CDR Contents
Dialplan Applications
cdr.conf
Backends
Example Call Detail Records
Caveats
Channel Event Logging
Conclusion
22. Security
Scanning for Valid Accounts
Authentication Weaknesses
Fail2ban
Installation
Configuration
Encrypted Media
Dialplan Vulnerabilities
Securing Asterisk Network APIs
Other Risk Mitigation
Resources
Conclusion—A Better Idiot
23. Asterisk: A Future for Telephony
The Telephone Is Dead (Except When It’s Not)
Communications Overload
The Problems with Open Source Development
The Future of Asterisk
WebRTC
The Future of Telephony
Index
Search in book...
Toggle Font Controls
Playlists
Add To
Create new playlist
Name your new playlist
Playlist description (optional)
Cancel
Create playlist
Sign In
Email address
Password
Forgot Password?
Create account
Login
or
Continue with Facebook
Continue with Google
Sign Up
Full Name
Email address
Confirm Email Address
Password
Login
Create account
or
Continue with Facebook
Continue with Google
Next
Next Chapter
Asterisk: The Definitive Guide
Add Highlight
No Comment
..................Content has been hidden....................
You can't read the all page of ebook, please click
here
login for view all page.
Day Mode
Cloud Mode
Night Mode
Reset