Cover image for Asterisk: The Definitive Guide, 4th Edition

Book description

Design a complete Voice over IP (VoIP) or traditional PBX system with Asterisk, even if you have only basic telecommunications knowledge. This bestselling guide makes it easy, with a detailed roadmap that shows you how to install and configure this open source software, whether you’re upgrading your existing phone system or starting from scratch.

Table of Contents

  1. Special Upgrade Offer
  2. Foreword
    1. Matt Jordan (Engineering Manager, Digium)
    2. Alex Balashov (Principal, Evariste Systems)
    3. Kevin McAllister (VP of Engineering, CoreDial, LLC)
    4. Brian Capouch (Computer Science Department, Saint Joseph’s College [Indiana])
  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
        1. Configuration backends
        2. Timing interfaces
        3. Calendar integration
        4. RTP implementations
        5. Format attribute handlers
        6. CLI extensions
        7. Other resource modules
      11. Add-on 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 Current Release Methodology
      3. Simplifying the Version Numbers
    6. Conclusion
  6. 3. Installing Asterisk
    1. Installation Cheat Sheet
    2. Distribution Installation
      1. RHEL 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. DAHDI
      2. LibPRI
      3. Asterisk
      4. Setting File Permissions
    6. Base Configuration
      1. Initial Configuration
        1. indications.conf and asterisk.conf
        2. modules.conf
        3. musiconhold.conf
      2. 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. RHEL
        2. Ubuntu
        3. Completing file conversion
      2. Default musiconhold.conf file
        1. The [general] section
        2. The music on hold classes sections
    5. Additional Configuration Files
    6. 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. Digium Phones with Asterisk
    5. Loading Your New Channel Configurations
      1. The Asterisk CLI
    6. Testing to Ensure Your Devices Have Registered
    7. Analog Phones
    8. A Basic Dialplan to Test Your Devices
    9. Under the Hood: Your First Call
    10. 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. Coping with Network Address Translation
        1. Devices behind NAT
        2. Asterisk behind NAT
        3. Media (RTP) handling
      2. PSTN Termination
      3. PSTN Origination
      4. VoIP to VoIP
      5. 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
      5. Standard Voicemail KeyMap
    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. Database Integration
    6. 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
      5. Creating a Hot-Desking Application with AstDB
    8. Handy Asterisk Features
      1. Zapateller()
      2. Call Parking
      3. Conferencing with MeetMe()
      4. Conferencing with ConfBridge()
    9. Conclusion
  14. 11. Parking, Paging, and Conferencing
    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 adapters
        5. Combination paging
        6. Bringing it all together
      2. Zone Paging
    3. Advanced Conferencing
      1. The [general] Section
      2. Options for User Profiles
      3. Options for Bridge Profiles
        1. Customizable conference bridge sounds
      4. ConfBridge Menu Options
      5. Enabling a PIN
      6. Waiting for the Marked User to Join
      7. Using ConfBridge() Menus
        1. Our first menu: volume control
        2. Advanced menus: using dialplan_exec
      8. Enabling Videoconferencing
    4. 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. Defining Queue Members in the queues.conf File
      3. Controlling Queue Members with Dialplan Logic
      4. Automatically Logging Into and Out of Multiple Queues
      5. 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 Corosync
        1. Installation
        2. Corosync 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. Alternate Key System Example with SIP Trunks
      6. Shared Extension Example
        1. sla.conf
        2. extensions.conf
      7. Additional Configuration
      8. Limitations
    7. Creating a Callback Service
    8. 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 RHEL
      2. Installing PostgreSQL for Ubuntu
      3. Installing MySQL for RHEL
      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. Compiling the ODBC Modules for Asterisk
      6. Configuring res_odbc to Allow Asterisk to Connect Through ODBC
    3. Managing Databases
      1. Troubleshooting Database Issues
      2. SQL Injection
    4. Powering Your Dialplan with func_odbc
    5. A Gentle Introduction to func_odbc
    6. Getting Funky with func_odbc: Hot-Desking
    7. Using Realtime
      1. Static Realtime
      2. Dynamic Realtime
    8. Storing Call Detail Records (CDR)
    9. ODBC Voicemail Message Storage
      1. Compiling the app_voicemail Module to Support ODBC Storage
      2. Creating the Large Object Type for PostgreSQL
      3. ODBC Voicemail Storage Table Layout
      4. Configuring voicemail.conf for ODBC Storage
      5. Testing ODBC Voice Message Storage
        1. Verifying binary data stored in PostgreSQL
        2. Verifying binary data stored in MySQL
    10. Database Integration of ACD Queues
      1. Storing queues.conf in a Database
        1. Storing queues.conf using Static Realtime
        2. Storing queues.conf using Dynamic Realtime
      2. Storing Dialplan Parameters for a Queue in a Database
      3. Writing queue_log to Database
    11. Conclusion
  20. 17. Interactive Voice Response
    1. What Is IVR?
    2. Components of an IVR
    3. IVR Design Considerations
    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. RHEL 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. Additional Features
    2. Voicemail IMAP Integration
      1. Compiling IMAP Voicemail Support into Asterisk
        1. RHEL dependencies
        2. Ubuntu dependencies
        3. Compiling the IMAP library
        4. Compiling Asterisk
        5. Configuring Asterisk
          1. Enabling IMAP on Gmail
          2. Configuring voicemail.conf for IMAP
    3. Using XMPP (Jabber) with Asterisk
      1. Compiling XMPP Support into Asterisk
        1. RHEL dependencies
        2. Ubuntu dependencies
        3. Installing res_xmpp
      2. Jabber Dialplan Commands
        1. Connecting to an XMPP server
        2. Sending messages with JabberSend()
        3. Receiving messages with JABBER_RECEIVE()
      3. chan_motif
        1. motif.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. Out-of-Band Messaging (Messaging Infrastructure)
      1. xmpp.conf Configuration
      2. sip.conf Configuration
      3. Dialplan Configuration
    5. LDAP Integration
      1. Configuring OpenLDAP
      2. Compiling LDAP Support into Asterisk
        1. Ubuntu dependencies
        2. RHEL 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 RHEL
        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
      4. Using T.38
    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
      2. T.38 Gateway
    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. Call Files
    5. Example Usage
      1. Originating a Call
      2. Redirecting a Call
      3. Originating a Call Using Python and StarPy
    6. Development Frameworks
      1. CSTA
    7. Interesting Applications
      1. Flash Operator Panel
    8. 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. Example: Account Database Access
    5. Development Frameworks
    6. Conclusion
  25. 22. Clustering
    1. Traditional PBXs
    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
      4. Log Rotation
    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. RHEL 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
      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. CLI Permissions
    10. Resources
    11. Conclusion—A Better Idiot
  30. 27. Asterisk: A Future for Telephony
    1. The Problems with Traditional Telephony
      1. Closed Thinking
      2. Limited Standards Compliance
      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 and text-to-speech
        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. WebRTC
      5. Wireless
        1. WiFi
        2. WiMAX
      6. Unified Messaging
      7. Peering
        1. E.164
        2. ENUM
        3. e164.org
        4. freenum.org
      8. 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
      9. Opportunities
        1. Tailor-made private telecommunications networks
        2. Low barrier to entry
        3. Creative possibilities
        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 Adapters
      4. Communications Terminals
    5. Linux Considerations
    6. Conclusion
  34. Index
  35. About the Authors
  36. Colophon
  37. Special Upgrade Offer
  38. Copyright