- •Table of Contents
- •Introduction
- •What This Book Covers
- •Conventions
- •Reader Feedback
- •Customer Support
- •Errata
- •Questions
- •What is Asterisk?
- •Asterisk is a PBX
- •Station-To-Station Calls
- •Line Trunking
- •Telco Features
- •Advanced Call Distribution
- •Call Detail Records
- •Call Recording
- •Asterisk is an IVR System
- •Asterisk is a Voicemail System
- •Asterisk is a Voice over IP (VoIP) System
- •What Asterisk Isn't
- •Asterisk is Not an Off-the-Shelf Phone System
- •Asterisk is Not a SIP Proxy
- •Asterisk Does Not Run on Windows
- •Is Asterisk a Good Fit for Me?
- •Trade-Offs
- •Flexibility versus Ease of Use
- •Graphical versus Configuration File Management
- •Calculating Total Cost of Ownership
- •Return on Investment
- •Summary
- •The Public Switched Telephony Network (PSTN)
- •Connection Methods
- •Plain Old Telephone Service (POTS) Line
- •Integrated Services Digital Network (ISDN)
- •Voice over IP Connections
- •Determining Our Needs
- •Terminal Equipment
- •Types of Terminal Devices
- •Hard Phones
- •Soft Phones
- •Communications Devices
- •Another PBX
- •Choosing a Device
- •Features, Features, and More Features…
- •Determining True Cost
- •Compatibility with Asterisk
- •Sound Quality Analysis
- •Usability Issues
- •Recording Decisions
- •How Much Hardware do I Need?
- •Choosing the Extension Length
- •Summary
- •Preparing to Install Asterisk
- •Obtaining the Source Files
- •Installing Zaptel
- •Installing libpri
- •Installing Asterisk
- •Getting to Know Asterisk
- •Summary
- •Zaptel Interfaces
- •zaptel.conf
- •Lines
- •Terminals
- •zapata.conf
- •Lines
- •Terminals
- •SIP Interfaces
- •IAX Interfaces
- •Voicemail
- •Music On Hold
- •Queues
- •Conference Rooms
- •Summary
- •Creating a Context
- •Creating an Extension
- •Creating Outgoing Extensions
- •Advanced Call Distribution
- •Call Queues
- •Call Parking
- •Direct Inward Dialing (DID)
- •Automated Attendants
- •System Services
- •Summary
- •Call Detail Records
- •Flat-File CDR Logging
- •Database CDR Logging
- •Monitoring Calls
- •Recording Calls
- •Legal Concerns
- •Summary
- •CentOS
- •Preparation and Installation
- •The Asterisk Management Portal (AMP)
- •Maintenance
- •Setup
- •Flash Operator Panel (FOP)
- •Flash Operator Configuration Files
- •Web MeetMe
- •Flexibility When Needed
- •A Simple One-to-One PBX
- •Extensions
- •Trunks
- •Routes
- •Customer Relationship Management/SugarCRM
- •Adding Contacts
- •Call Scheduling
- •Administration of SugarCRM
- •Configure Settings
- •User Management
- •User Roles
- •Summary
- •Small Office/Home Office
- •The Scenario
- •The Discussion
- •The Configuration
- •zaptel.conf
- •zapata.conf
- •musiconhold.conf
- •voicemail.conf
- •modules.conf
- •extensions.conf
- •Conclusions
- •Small Business
- •The Scenario
- •The Discussion
- •The Configuration
- •zaptel.conf
- •zapata.conf
- •musiconhold.conf
- •agents.conf
- •queues.conf
- •sip.conf
- •meetme.conf
- •voicemail.conf
- •extensions.conf
- •Conclusions
- •Hosted PBX
- •The Scenario
- •The Discussion
- •The Configuration
- •zaptel.conf
- •zapata.conf
- •musiconhold.conf
- •sip.conf
- •voicemail.conf
- •extensions.conf
- •Conclusions
- •Summary
- •Backup and System Maintenance
- •Backing Up Configurations
- •Backing Up Log Files
- •Backup Scripts
- •Time Synchronization
- •Adding It All to cron
- •Rebuilding and Restoring the Asterisk Server
- •Disaster Recovery Plan (DRP)
- •Asterisk Server Security
- •Internal Access Control
- •Host Security Hardening for Asterisk
- •Integrity Checker
- •Root-Kit Detection
- •Automated Hardening
- •Role Based Access Control (RBAC)
- •Network Security for Asterisk
- •Firewalling the Asterisk Protocols
- •SIP (Session Initiation Protocol)
- •RTP—The Real-Time Transport Protocol
- •Controlling Administration of Asterisk
- •Asterisk Scalability
- •Load Balancing with DNS
- •Support Channels for Asterisk
- •Mailing Lists
- •Forums
- •IRC (Internet Relay Chat)
- •Digium
- •Summary
- •Index
Chapter 8
extensions.conf
[general]
static=yes
writeprotect=no
[globals]
TRUNK=Zap/g1
TRUNKMSD=1
[outgoing]
exten => _9.,1,Dial(${TRUNK}/${EXTEN:${TRUNKMSD}}) ;if we dial 9, ; send to trunk
include => default
[default]
exten => s,1,Dial(Zap/g2,30)
exten => s,2,Voicemail(u1) exten => s,3,Hangup
exten => s,102,Voicemail(b1) exten => s,103,Hangup
exten => 0,1,Dial(Zap/g2) exten => 1,1,Dial(Zap/1) exten => 2,1,Dial(Zap/2) exten => 3,1,Dial(Zap/3)
exten => 8,1,VoicemailMain(s1)
exten => i,1,Goto(s,1) exten => t,1,Goto(s,1)
;dial all extensions for 30
;seconds
;send to VM if we don't pick up
;send to VM if we are busy
;if we dial 0, ring all phones
;if we dial 1, ring the office
;if we dial 2, ring the bedroom
;if we dial 3, ring the kitchen
;press 8 to check messages
;without requiring password
;if we are in an invalid or timed-out
;state, go to s,1 in this context
This is our entire dialplan. We can see that it is very simple: each phone has an extension, and there is an extension for all phones. Only incoming calls are going to go to voicemail if a phone is busy or not answered.
We will notice that any number that is dialed with 9 as the first digit will automatically be sent out the trunk. This is a very simple example of how a single pattern can accomplish many tasks. Since we are not very concerned about securing the trunk from internal extensions, it is alright to use this simple method of trunk access.
Conclusions
As we can see, Asterisk configurations can be very simple. Creating a PBX for a few extensions is easy. Moreover, it illustrates some points that we will also see later in configuring some other PBX systems.
119