Asterisk: The Definitive Guide, 3rd Edition

Book description

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 Asterisk’s 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 Asterisk’s security, call routing, and faxing features

Publisher resources

View/Submit Errata

Table of contents

  1. Asterisk™: The Definitive Guide
  2. Foreword
  3. Preface
    1. Audience
    2. Organization
    3. Software
    4. Conventions Used in This Book
    5. Using Code Examples
    6. Safari Books Online
    7. How to Contact Us
    8. Acknowledgments
      1. Leif Madsen
      2. Jim Van Meggelen
      3. Russell Bryant
  4. 1. A Telephony Revolution
    1. Asterisk and VoIP: Bridging the Gap Between Traditional and Network Telephony
      1. The Zapata Telephony Project
    2. Massive Change Requires Flexible Technology
    3. Asterisk: The Hacker’s PBX
    4. Asterisk: The Professional’s PBX
    5. The Asterisk Community
      1. The Asterisk Mailing Lists
      2. Asterisk Wiki Sites
      3. The IRC Channels
      4. Asterisk User Groups
      5. The Asterisk Documentation Project
    6. The Business Case
    7. Conclusion
  5. 2. Asterisk Architecture
    1. Modules
      1. Applications
      2. Bridging Modules
      3. Call Detail Recording Modules
      4. Channel Event Logging Modules
      5. Channel Drivers
      6. Codec Translators
      7. Format Interpreters
      8. Dialplan Functions
      9. PBX Modules
      10. Resource Modules
      11. Addon Modules
      12. Test Modules
    2. File Structure
      1. Configuration Files
      2. Modules
      3. The Resource Library
      4. The Spool
      5. Logging
    3. The Dialplan
    4. Hardware
    5. Asterisk Versioning
      1. Previous Release Methodologies
      2. The New Release Methodology
    6. Conclusion
  6. 3. Installing Asterisk
    1. Installation Cheat Sheet
    2. Distribution Installation
      1. CentOS Server
        1. Base system installation
        2. Base system update
        3. Enabling NTP for accurate system time
        4. Adding a system user
      2. Ubuntu Server
        1. Base system installation
        2. Base system update
        3. Enable NTP for accurate system time
    3. Software Dependencies
    4. Downloading What You Need
      1. Getting the Source via Subversion
      2. Getting the Source via wget
    5. How to Install It
      1. LibPRI
      2. DAHDI
      3. Asterisk
      4. Setting File Permissions
    6. Base Configuration
      1. Disable SELinux
      2. Initial Configuration
        1. indications.conf and asterisk.conf
        2. modules.conf
        3. musiconhold.conf
      3. make menuselect
        1. Uses for menuselect
        2. menuselect interfaces
        3. Using menuselect
        4. Scripting menuselect
    7. Updating Asterisk
    8. Common Issues
      1. -bash: wget: command not found
      2. configure: error: no acceptable C compiler found in $PATH
      3. make: gcc: command not found
      4. configure: error: C++ preprocessor “/lib/cpp” fails sanity check
      5. configure: error: *** Please install GNU make. It is required to build Asterisk!
      6. configure: *** XML documentation will not be available because the ‘libxml2’ development package is missing.
      7. configure: error: *** termcap support not found
      8. You do not appear to have the sources for the 2.6.18-164.6.1.el5 kernel installed.
      9. E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
    9. Upgrading Asterisk
    10. Conclusion
  7. 4. Initial Configuration Tasks
    1. asterisk.conf
      1. The [directories] Section
      2. The [options] Section
      3. The [files] Section
      4. The [compat] Section
    2. modules.conf
      1. The [modules] Section
    3. indications.conf
    4. musiconhold.conf
      1. Converting Music to a Format That Works Best with Asterisk
        1. CentOS
        2. Ubuntu
        3. Completing file conversion
    5. Conclusion
  8. 5. User Device Configuration
    1. Telephone Naming Concepts
    2. Hardphones, Softphones, and ATAs
    3. Configuring Asterisk
      1. How Channel Configuration Files Work with the Dialplan
      2. sip.conf
      3. iax.conf
      4. Modifying Your Channel Configuration Files for Your Environment
    4. Loading Your New Channel Configurations
      1. The Asterisk CLI
    5. Testing to Ensure Your Devices Have Registered
    6. Analog Phones
    7. A Basic Dialplan to Test Your Devices
    8. Under the Hood: Your First Call
    9. Conclusion
  9. 6. Dialplan Basics
    1. Dialplan Syntax
      1. Contexts
      2. Extensions
      3. Priorities
        1. Unnumbered priorities
        2. The ’same =>' operator
        3. Priority labels
      4. Applications
      5. The Answer(), Playback(), and Hangup() Applications
    2. A Simple Dialplan
      1. Hello World
    3. Building an Interactive Dialplan
      1. The Goto(), Background(), and WaitExten() Applications
      2. Handling Invalid Entries and Timeouts
      3. Using the Dial() Application
        1. Argument 1: Destination
        2. Argument 2: Timeout
        3. Argument 3: Option
        4. Argument 4: URI
        5. Updating the dialplan
        6. Blank arguments
      4. Using Variables
        1. Global variables
        2. Channel variables
        3. Environment variables
        4. Adding variables to our dialplan
      5. Pattern Matching
        1. Pattern-matching syntax
        2. Pattern-matching examples
        3. Using the ${EXTEN} channel variable
      6. Includes
    4. Conclusion
  10. 7. Outside Connectivity
    1. The Basics of Trunking
    2. Fundamental Dialplan for Outside Connectivity
    3. PSTN Circuits
      1. Traditional PSTN Trunks
        1. Analog telephony
        2. Digital telephony
      2. Installing PSTN Trunks
        1. Downloading and installing DAHDI
        2. Configuring digital circuits
          1. PRI ISDN
          2. BRI ISDN
          3. MFC/R2
        3. Configuring analog circuits
          1. The s extension
    4. VoIP
      1. PSTN Termination
      2. PSTN Origination
      3. VoIP to VoIP
      4. Configuring VoIP Trunks
        1. Configuring SIP trunks between Asterisk systems
          1. Connecting two Asterisk systems together with SIP
          2. Connecting an Asterisk system to a SIP provider
          3. Encrypting SIP calls
        2. Configuring IAX trunks between Asterisk systems
          1. IAX trunking
          2. IAX encryption
    5. Emergency Dialing
    6. Conclusion
  11. 8. Voicemail
    1. Comedian Mail
      1. The [general] Section
      2. The [zonemessages] Section
      3. The Contexts Section
      4. An Initial voicemail.conf File
    2. Dialplan Integration
      1. The VoiceMail() Dialplan Application
      2. The VoiceMailMain() Dialplan Application
      3. Creating a Dial-by-Name Directory
      4. Using a Jitterbuffer
    3. Storage Backends
      1. Linux Filesystem
      2. ODBC
      3. IMAP
    4. Using Asterisk As a Standalone Voicemail Server
      1. Integrating Asterisk into a SIP Environment As a Standalone Voicemail Server
        1. Dialplan requirements
        2. sip.conf requirements
      2. SMDI (Simplified Message Desk Interface)
    5. Conclusion
  12. 9. Internationalization
    1. Devices External to the Asterisk Server
    2. PSTN Connectivity, DAHDI, Digium Cards, and Analog Phones
      1. DAHDI Drivers
    3. Asterisk
      1. Caller ID
      2. Language and/or Accent of Prompts
      3. Time/Date Stamps and Pronunciation
    4. Conclusion—Easy Reference Cheat Sheet
  13. 10. Deeper into the Dialplan
    1. Expressions and Variable Manipulation
      1. Basic Expressions
      2. Operators
    2. Dialplan Functions
      1. Syntax
      2. Examples of Dialplan Functions
    3. Conditional Branching
      1. The GotoIf() Application
      2. Time-Based Conditional Branching with GotoIfTime()
    4. Macros
      1. Defining Macros
      2. Calling Macros from the Dialplan
      3. Using Arguments in Macros
    5. GoSub()
      1. Defining Subroutines
      2. Calling Subroutines from the Dialplan
      3. Using Arguments in Subroutines
      4. Returning from a Subroutine
    6. Local Channels
    7. Using the Asterisk Database (AstDB)
      1. Storing Data in the AstDB
      2. Retrieving Data from the AstDB
      3. Deleting Data from the AstDB
      4. Using the AstDB in the Dialplan
    8. Handy Asterisk Features
      1. Zapateller()
      2. Call Parking
      3. Conferencing with MeetMe()
    9. Conclusion
  14. 11. Parking and Paging
    1. features.conf
      1. The [general] section
      2. The [featuremap] Section
      3. The [applicationmap] Section
      4. Application Map Grouping
      5. Parking Lots
    2. Overhead and “Underchin” Paging (a.k.a. Public Address)
      1. Places to Send Your Pages
        1. External paging
        2. Set paging
        3. Multicast paging via the MulticastRTP channel
        4. VoIP paging adaptors
        5. Combination paging
        6. Bringing it all together
      2. Zone Paging
    3. Conclusion
  15. 12. Internet Call Routing
    1. DNS and SIP URIs
      1. The SIP URI
      2. SRV Records
      3. Accepting Calls to Your System
        1. Modifying sip.conf
        2. Standard dialplan
        3. File parsing
        4. Database lookup
      4. Dialing SIP URIs from Asterisk
    2. ENUM and E.164
      1. E.164 and the ITU
      2. ENUM
      3. Asterisk and ENUM
    3. ISN, ITAD, and freenum.org
      1. Got ISN?
      2. ITAD Subscriber Numbers (ISNs)
      3. Management of Internet Numbering
      4. IP Telephony Administrative Domains (ITADs)
      5. Create a DNS Entry for Your ITAD
      6. Testing Your ITAD
      7. Using ISNs in Your Asterisk System
        1. Receiving calls to your ITAD
    4. Security and Identity
      1. Toll Fraud
      2. Spam over Internet Telephony (SPIT)
      3. Distributed Denial of Service Attacks
      4. Phishing
      5. Security Is an Ongoing Process
    5. Conclusion
  16. 13. Automatic Call Distribution (ACD) Queues
    1. Creating a Simple ACD Queue
    2. Queue Members
      1. Controlling Queue Members via the CLI
      2. Controlling Queue Members with Dialplan Logic
      3. Automatically Logging Into and Out of Multiple Queues
      4. An Introduction to Device State
    3. The queues.conf File
    4. The agents.conf File
    5. Advanced Queues
      1. Priority Queue (Queue Weighting)
      2. Queue Member Priority
      3. Changing Penalties Dynamically (queuerules.conf)
      4. Announcement Control
      5. Overflow
        1. Controlling timeouts
        2. Controlling when to join and leave a queue
      6. Using Local Channels
    6. Queue Statistics: The queue_log File
    7. Conclusion
  17. 14. Device States
    1. Device States
      1. Checking Device States
    2. Extension States
      1. Hints
      2. Checking Extension States
    3. SIP Presence
      1. Asterisk Configuration
    4. Using Custom Device States
      1. An Example
    5. Distributed Device States
      1. Using OpenAIS
        1. Installation
        2. OpenAIS configuration
        3. Asterisk configuration
        4. Testing device state changes
      2. Using XMPP
        1. Installation
        2. Creating XMPP accounts
        3. Asterisk configuration
        4. Testing
    6. Shared Line Appearances
      1. Installing the SLA Applications
      2. Configuration Overview
      3. Key System Example with Analog Trunks
        1. sla.conf
        2. extensions.conf
        3. Additional phone configuration tasks
      4. Key System Example with SIP Trunks
        1. sla.conf
        2. extensions.conf
      5. Shared Extension Example
        1. sla.conf
        2. extensions.conf
      6. Additional Configuration
      7. Limitations
    7. Conclusion
  18. 15. The Automated Attendant
    1. An Auto Attendant Is Not an IVR
    2. Designing Your Auto Attendant
      1. The Greeting
      2. The Main Menu
        1. Selection 1
        2. Selection 2
        3. Selection #
        4. Selection 3
        5. Selection 9
        6. Selection 0
      3. Timeout
      4. Invalid
      5. Dial by Extension
    3. Building Your Auto Attendant
      1. Recording Prompts
        1. Using the dialplan to create recordings
      2. The Dialplan
      3. Delivering Incoming Calls to the Auto Attendant
      4. IVR
    4. Conclusion
  19. 16. Relational Database Integration
    1. Installing and Configuring PostgreSQL and MySQL
      1. Installing PostgreSQL for CentOS
      2. Installing PostgreSQL for Ubuntu
      3. Installing MySQL for CentOS
      4. Installing MySQL for Ubuntu
      5. Configuring PostgreSQL
      6. Configuring MySQL
    2. Installing and Configuring ODBC
      1. Configuring ODBC for PostgreSQL
      2. Configuring ODBC for MySQL
      3. Configuring ODBC for Microsoft SQL
      4. Validating the ODBC Connector
      5. Configuring res_odbc to Allow Asterisk to Connect Through ODBC
    3. Managing Databases
      1. Troubleshooting Database Issues
    4. A Gentle Introduction to func_odbc
    5. Getting Funky with func_odbc: Hot-Desking
    6. Using Realtime
      1. Static Realtime
      2. Dynamic Realtime
    7. Storing Call Detail Records (CDRs)
    8. ODBC Voicemail
      1. Creating the Large Object Type for PostgreSQL
      2. ODBC Voicemail Storage Table Layout
      3. Configuring voicemail.conf for ODBC Storage
      4. Testing ODBC Voicemail
        1. Verifying binary data stored in PostgreSQL
        2. Verifying binary data stored in MySQL
    9. Conclusion
  20. 17. Interactive Voice Response
    1. What Is IVR?
    2. Components of an IVR
    3. IVR Design Considerations
      1. Do
      2. Don’t
    4. Asterisk Modules for Building IVRs
      1. CURL
      2. func_odbc
      3. AGI
      4. AMI
    5. A Simple IVR Using CURL
      1. Installing the cURL Module
      2. The Dialplan
    6. A Prompt-Recording Application
    7. Speech Recognition and Text-to-Speech
      1. Text-to-Speech
      2. Speech Recognition
    8. Conclusion
  21. 18. External Services
    1. Calendar Integration
      1. Compiling Calendaring Support into Asterisk
        1. CentOS dependencies
        2. Ubuntu dependencies
      2. Configuring Calendar Support for Asterisk
      3. Triggering Calendar Reminders to Your Phone
        1. Triggering a wakeup call
        2. Scheduling calls between two participants
        3. Calling meeting participants and placing them into a conference
      4. Controlling Calls Based on Calendar Information
      5. Writing Call Information to a Calendar
      6. Conclusion
    2. VoiceMail IMAP Integration
      1. Compiling IMAP VoiceMail Support into Asterisk
        1. CentOS dependencies
        2. Ubuntu dependencies
        3. Compiling the IMAP library
        4. Compiling Asterisk
        5. Configuring Asterisk
          1. Enabling IMAP on your Gmail account
          2. Configuring voicemail.conf for IMAP
    3. Using XMPP (Jabber) with Asterisk
      1. Compiling Jabber Support into Asterisk
        1. CentOS dependencies
        2. Ubuntu dependencies
      2. Jabber Dialplan Commands
        1. Connecting to an XMPP server
        2. Sending messages with JabberSend()
        3. Receiving messages with JABBER_RECEIVE()
      3. chan_gtalk
        1. Configuring gtalk.conf
        2. Accepting calls from Google Talk
        3. Accepting calls from Google Voice
        4. Outgoing calls via Google Talk
        5. Outgoing calls via Google Voice
    4. Skype Integration
      1. Installation of Skype for Asterisk
      2. Using Skype for Asterisk
        1. Configuring chan_skype.conf
        2. Placing and receiving calls via Skype
        3. Sending and receiving messages via Skype
        4. Calling your Skype buddies without assigning extension numbers
    5. LDAP Integration
      1. Configuring OpenLDAP
      2. Compiling LDAP Support into Asterisk
        1. Ubuntu dependencies
        2. CentOS dependencies
      3. Configuring Asterisk for LDAP Support
        1. Configuring res_ldap.conf
        2. Configuring extconfig.conf
        3. Configuring sip.conf for realtime
    6. Text-to-Speech Utilities
      1. Festival
        1. Installing Festival on CentOS
        2. Installing Festival on Ubuntu
        3. Using Festival with Asterisk
      2. Cepstral
    7. Conclusion
  22. 19. Fax
    1. What Is a Fax?
    2. Ways to Handle Faxes in Asterisk
    3. spandsp
      1. Obtaining spandsp
      2. Compiling and Installing spandsp
      3. Adding the spandsp Library to Your libpath
      4. Recompiling Asterisk with spandsp Support
      5. Disabling spandsp (Should You Want to Test Digium Fax)
    4. Digium Fax For Asterisk
      1. Obtaining Digium FFA
      2. Disabling Digium FFA (Should You Want to Test spandsp)
    5. Incoming Fax Handling
      1. Fax to TIFF
      2. Fax to Email
      3. Fax Detection
    6. Outgoing Fax Handling
      1. Transmitting a Fax from Asterisk
      2. File Format for Faxing
      3. An Experiment in Email to Fax
    7. Fax Pass-Through
      1. Using Fax Buffers in chan_dahdi.conf
    8. Conclusion
  23. 20. Asterisk Manager Interface (AMI)
    1. Quick Start
      1. AMI over TCP
      2. AMI over HTTP
    2. Configuration
      1. manager.conf
      2. http.conf
    3. Protocol Overview
      1. Message Encoding
        1. Events
        2. Actions
      2. AMI over HTTP
        1. Authentication and session handling
        2. /rawman encoding
        3. /manager encoding
        4. /mxml encoding
        5. Manager events
    4. Development Frameworks
      1. CSTA
    5. Interesting Applications
      1. AsteriskGUI
      2. Flash Operator Panel
    6. Conclusion
  24. 21. Asterisk Gateway Interface (AGI)
    1. Quick Start
    2. AGI Variants
      1. Process-Based AGI
        1. EAGI
      2. DeadAGI Is Dead
      3. FastAGI—AGI over TCP
      4. Async AGI—AMI-Controlled AGI
    3. AGI Communication Overview
      1. Setting Up an AGI Session
        1. Process-based AGI/FastAGI
        2. Async AGI
      2. Commands and Responses
        1. Process-based AGI/FastAGI
        2. Async AGI
      3. Ending an AGI Session
        1. Process-based AGI/FastAGI
        2. Async AGI
    4. Development Frameworks
    5. Conclusion
  25. 22. Clustering
    1. Traditional Call Centers
    2. Hybrid Systems
    3. Pure Asterisk, Nondistributed
    4. Asterisk and Database Integration
      1. Single Database
      2. Replicated Databases
    5. Asterisk and Distributed Device States
      1. Distributing Device States over a LAN
      2. Distributing Device States over a WAN
    6. Multiple Queues, Multiple Sites
    7. Conclusion
  26. 23. Distributed Universal Number Discovery (DUNDi)
    1. How Does DUNDi Work?
    2. The dundi.conf File
    3. Configuring Asterisk for Use with DUNDi
      1. General Configuration
      2. Initial DUNDi Peer Definition
      3. Creating Mapping Contexts
      4. Using Mapping Contexts with Peers
      5. Allowing Remote Connections
      6. Controlling Responses
        1. Manually adding responses
        2. Using pattern matches
        3. Dynamically adding extension numbers
        4. Using dialplan functions in mappings
      7. Performing Lookups from the Dialplan
    4. Conclusion
  27. 24. System Monitoring and Logging
    1. logger.conf
      1. Reviewing Asterisk Logs
      2. Logging to the Linux syslog Daemon
      3. Verifying Logging
    2. Call Detail Records
      1. CDR Contents
      2. Dialplan Applications
      3. cdr.conf
      4. Backends
        1. cdr_adaptive_odbc
        2. cdr_csv
        3. cdr_custom
        4. cdr_manager
        5. cdr_mysql
        6. cdr_odbc
        7. cdr_pgsql
        8. cdr_radius
        9. cdr_sqlite
        10. cdr_sqlite3_custom
        11. cdr_syslog
        12. cdr_tds
      5. Example Call Detail Records
        1. Single-party call
        2. Two-party call
      6. Caveats
    3. CEL (Channel Event Logging)
      1. Channel Event Types
      2. Channel Event Contents
      3. Dialplan Applications
      4. cel.conf
      5. Backends
        1. cel_odbc
        2. cel_custom
        3. cel_manager
        4. cel_pgsql
        5. cel_radius
        6. cel_sqlite3_custom
        7. cel_tds
      6. Example Channel Events
        1. Single-party call
        2. Two-party call
        3. Blind transfer
    4. SNMP
      1. Installing the SNMP Module for Asterisk
        1. CentOS dependency
        2. Ubuntu dependency
        3. Recompiling Asterisk with the res_snmp module
      2. Configuring SNMP for Asterisk Using OpenNMS
        1. Installing OpenNMS
        2. Editing /etc/asterisk/res_snmp.conf to work with your OpenNMS server
        3. Editing /etc/snmp/snmpd.conf to work with your OpenNMS server
        4. Enabling SNMPv3
      3. Monitoring Asterisk with OpenNMS
    5. Conclusion
  28. 25. Web Interfaces
    1. Flash Operator Panel
    2. Queue Status and Reporting
      1. Queue Status Display
      2. Queue Reporting
    3. Call Detail Records
    4. A2Billing
    5. Conclusion
  29. 26. Security
    1. Scanning for Valid Accounts
    2. Authentication Weaknesses
    3. Fail2ban
      1. Installation
        1. iptables
        2. Sending email
      2. Configuration
    4. Encrypted Media
    5. Dialplan Vulnerabilities
    6. Securing Asterisk Network APIs
    7. IAX2 Denial of Service
    8. Other Risk Mitigation
    9. Resources
    10. Conclusion—A Better Idiot
  30. 27. Asterisk: A Future for Telephony
    1. The Problems with Traditional Telephony
      1. Closed Thinking
      2. Limited Standards Compliancy
      3. Slow Release Cycles
      4. Refusing to Let Go of the Past and Embrace the Future
    2. Paradigm Shift
    3. The Promise of Open Source Telephony
      1. The Itch That Asterisk Scratches
      2. Open Architecture
      3. Standards Compliance
      4. Lightning-Fast Response to New Technologies
      5. Passionate Community
      6. Some Things That Are Now Possible
        1. Legacy PBX migration gateway
        2. Low-barrier IVR
        3. Conference rooms
        4. Home automation
    4. The Future of Asterisk
      1. Speech Processing
        1. Festival
        2. Speech recognition
      2. High-Fidelity Voice
      3. Video
        1. The challenge of videoconferencing
        2. Why we love videoconferencing
        3. Why videoconferencing may never totally replace voice
      4. Wireless
        1. WiFi
        2. WiMAX
      5. Unified Messaging
      6. Peering
        1. E.164
        2. ENUM
        3. e164.org
      7. Challenges
        1. Too much change, too few standards
        2. Toll fraud
        3. VoIP spam
        4. Fear, uncertainty, and doubt
        5. Bottleneck engineering
        6. Regulatory wars
        7. Quality of service
        8. Complexity
      8. Opportunities
        1. Tailor-made private telecommunications networks
        2. Low barrier to entry
        3. Hosted solutions of similar complexity to corporate websites
        4. Proper integration of communications technologies
  31. A. Understanding Telephony
    1. Analog Telephony
      1. Parts of an Analog Telephone
        1. Ringer
        2. Dialpad
        3. Hybrid (or network)
          1. Hook switch (or switch hook)
          2. Handset
      2. Tip and Ring
    2. Digital Telephony
      1. Pulse-Code Modulation
        1. Digitally encoding an analog waveform
        2. Increasing the sampling resolution and rate
        3. Nyquist’s Theorem
        4. Logarithmic companding
        5. Aliasing
    3. The Digital Circuit-Switched Telephone Network
      1. Circuit Types
        1. The humble DS-0―The foundation of it all
        2. T-carrier circuits
        3. SONET and OC circuits
      2. Digital Signaling Protocols
        1. Channel Associated Signaling (CAS)
        2. ISDN
          1. ISDN-BRI/BRA
          2. ISDN-PRI/PRA
        3. Signaling System 7
    4. Packet-Switched Networks
    5. Conclusion
  32. B. Protocols for VoIP
    1. The Need for VoIP Protocols
    2. VoIP Protocols
      1. IAX (The “Inter-Asterisk eXchange” Protocol)
        1. History
        2. Future
        3. Security considerations
        4. IAX and NAT
      2. SIP
        1. History
        2. Future
        3. Security considerations
        4. SIP and NAT
      3. H.323
        1. History
        2. Future
        3. Security considerations
        4. H.323 and NAT
      4. MGCP
      5. Proprietary Protocols
        1. Skinny/SCCP
        2. UNISTIM
    3. Codecs
      1. G.711
      2. G.726
      3. G.729A
      4. GSM
      5. iLBC
      6. Speex
      7. G.722
      8. MP3
    4. Quality of Service
      1. TCP, UDP, and SCTP
        1. Transmission Control Protocol
        2. User Datagram Protocol
        3. Stream Control Transmission Protocol
      2. Differentiated Service
      3. Guaranteed Service
        1. MPLS
        2. RSVP
      4. Best Effort
    5. Echo
      1. Why Echo Occurs
      2. Managing Echo on DAHDI Channels
      3. Hardware Echo Cancellation
    6. Asterisk and VoIP
      1. Users and Peers and Friends—Oh My!
        1. Users
        2. Peers
        3. Friends
      2. register Statements
    7. VoIP Security
      1. Spam over Internet Telephony (SPIT)
      2. Encrypting Audio with Secure RTP
      3. Spoofing
      4. What Can Be Done?
        1. Basic network security
          1. Segregating voice and data traffic
          2. DMZ
          3. Server hardening
        2. Encryption
        3. Physical security
    8. Conclusion
  33. C. Preparing a System for Asterisk
    1. Server Hardware Selection
      1. Performance Issues
      2. Choosing a Processor
        1. Small systems
        2. Medium systems
        3. Large systems
      3. Choosing a Motherboard
      4. Power Supply Requirements
        1. Computer power supplies
        2. Redundant power supplies
    2. Environment
      1. Power Conditioning and Uninterruptible Power Supplies
        1. Power-conditioned UPSs
      2. Grounding
      3. Electrical Circuits
      4. The Equipment Room
        1. Humidity
        2. Temperature
        3. Dust
        4. Security
    3. Telephony Hardware
      1. Connecting to the PSTN
        1. Analog interface cards
        2. Digital interface cards
        3. Channel banks
        4. Other types of PSTN interfaces
      2. Connecting Exclusively to a Packet-Based Telephone Network
      3. Echo Cancellation
    4. Types of Phones
      1. Physical Telephones
        1. Analog telephones
        2. Proprietary digital telephones
        3. ISDN telephones
        4. IP telephones
      2. Softphones
      3. Telephony Adaptors
      4. Communications Terminals
    5. Linux Considerations
    6. Conclusion
  34. Index
  35. About the Authors
  36. Colophon
  37. Copyright

Product information

  • Title: Asterisk: The Definitive Guide, 3rd Edition
  • Author(s): Leif Madsen, Jim Van Meggelen, Russell Bryant
  • Release date: April 2011
  • Publisher(s): O'Reilly Media, Inc.
  • ISBN: 9780596517342