Discover millions of ebooks, audiobooks, and so much more with a free trial

Only $11.99/month after trial. Cancel anytime.

Asterisk 1.6
Asterisk 1.6
Asterisk 1.6
Ebook506 pages3 hours

Asterisk 1.6

Rating: 0 out of 5 stars

()

Read preview

About this ebook

The book offers readers both a detailed description as well as step by step instructions on deploying software solutions as well as Asterisk configurations. Screenshots are provided in sections to give a visual perspective of the instructions. For Asterisk configurations actual sample code is listed in the book which can be directly inserted into your Asterisk solution. This book is aimed at anyone who is interested in building a powerful telephony system using the free and open source application, Asterisk, without spending many thousands of dollars buying a commercial and often less flexible system. This book is suitable for the novice and those new to Asterisk and telephony. Telephony or Linux experience will be helpful, but not required.
LanguageEnglish
Release dateSep 21, 2009
ISBN9781847198631
Asterisk 1.6
Author

David Gomillion

David Gomillion currently serves as Director of Information Technology for the Eye Center of North Florida. There, he orchestrates all of the technological undertakings of this four-location medical practice, including computers, software (off-the-shelf and custom development), server systems, telephony, networking, as well as specialized diagnostic and treatment systems. David received a Bachelor's of Science in Computer Science from Brigham Young University in August, 2005. There he learned the theory behind his computer experience, and became a much more efficient programmer. David has worked actively in the Information Technology sector since his freshman year at BYU. He has been a Networking Assistant, an Assistant Network Administrator, a Supervisor of a large Network and Server Operations unit, a Network Administrator, and finally a Director of Information Technology. Through his increasing responsibilities, he has learned to prioritize needs and wants, and applies this ability to his Asterisk installations.

Related to Asterisk 1.6

Related ebooks

Information Technology For You

View More

Related articles

Reviews for Asterisk 1.6

Rating: 0 out of 5 stars
0 ratings

0 ratings0 reviews

What did you think?

Tap to rate

Review must be at least 10 words

    Book preview

    Asterisk 1.6 - David Gomillion

    Table of Contents

    Asterisk 1.6

    Credits

    About the Authors

    About the Reviewer

    Preface

    What this book covers

    What you need for this book

    Who this book is for

    Conventions

    Reader feedback

    Customer support

    Downloading the example code for the book

    Errata

    Piracy

    Questions

    1. Introduction to Asterisk

    What is Asterisk?

    What's new in Asterisk 1.4?

    What's new in Asterisk 1.6?

    Asterisk is a PBX

    Extension-to-Extension calls

    Line trunking

    Telco features

    Advanced Call Distribution

    Call Detail Records

    Call recording

    Call parking

    Call barging

    Asterisk is an IVR system

    Asterisk is a call center system

    Asterisk is a voicemail system

    Asterisk is a Voice over IP (VoIP) system

    Asterisk 1-2-3

    Asterisk scalability

    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

    2. Making a Plan for Deployment

    The Public Switched Telephony Network (PSTN)

    Connection methods

    Plain Old Telephone Service (POTS) line

    Integrated Services Digital Network (ISDN)

    T1 or E1

    Voice over IP connections

    Determining our needs

    Terminal equipment

    Types of terminal devices

    Hard phones

    H.323

    SIP

    IAX

    Soft phones

    Analog adapters

    Another PBX

    Choosing a device

    Features, features, and more features...

    Requirement elicitation

    Requirement prioritization

    Requirement documentation

    Phone testing

    Determining true cost

    Compatibility with Asterisk

    Sound quality analysis

    Usability issues

    Recording decisions

    How much hardware do I need?

    Choosing the extension length

    Preparing a test environment

    Summary

    3. Installing Asterisk

    Preparing to install Asterisk

    Obtaining the source files

    Installing DAHDI

    Installing LibPRI (optional)

    Installing Asterisk

    Getting to know Asterisk

    Summary

    4. Configuring Asterisk

    DAHDI interfaces

    system.conf

    Lines

    Terminals

    chan_dahdi.conf

    Lines

    Terminals

    SIP interfaces

    IAX interfaces

    Voicemail

    Music on hold

    Queues

    Conference rooms

    Summary

    5. Creating a Dialplan

    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

    6. Quality Assurance

    Call Detail Records

    Flat-file CDR logging

    Database CDR logging

    Monitoring calls

    Recording calls

    Legal concerns

    Summary

    7. Making Asterisk Easy to Manage

    Trixbox

    CentOS

    Trixbox preparation and installation

    What is FreePBX?

    FreePBX preparation and installation

    FreePBX System Status Dashboard

    Tools

    Setup

    Trixbox maintenance section

    Reports

    Asterisk Recording Interface

    Flash Operator Panel (FOP)

    Flash operator configuration files

    Web MeetMe

    Setting up and accessing Web MeetMe through Trixbox

    Flexibility when needed

    A simple one-to-one PBX

    Extensions

    Trunks

    Routes

    Summary

    8. What is asterCRM?

    Installing asterCRM

    Automatic installation

    Manual installation

    Introducing asterCRM

    Import

    Statistic

    Extension

    Customer

    Dialer

    System

    Survey

    Summary

    9. Case Studies

    Small office/home office

    The scenario

    The discussion

    The configuration

    system.conf

    chan_dahdi.conf

    musiconhold.conf

    voicemail.conf

    modules.conf

    extensions.conf

    Conclusions

    Small business

    The scenario

    The discussion

    The configuration

    system.conf

    chan_dahdi.conf

    musiconhold.conf

    agents.conf

    queues.conf

    sip.conf

    meetme.conf

    voicemail.conf

    extensions.conf

    Conclusions

    Hosted PBX

    The scenario

    The discussion

    The configuration

    system.conf

    chan_dahdi.conf

    musiconhold.conf

    sip.conf

    voicemail.conf

    extensions.conf

    Conclusions

    Summary

    10. Maintenance and Security

    Backup and system maintenance

    Backing up configurations

    Backing up voice data

    Backing up log files

    Backup scripts

    Time synchronization

    Adding it all to cron

    Back up Asterisk with FreePBX

    Back up Asterisk with Trixbox

    Rebuilding and restoring the Asterisk server

    Disaster Recovery Plan (DRP)

    Asterisk server security

    Internal access control

    Host security hardening for Asterisk

    Integrity checker

    Rootkit detection

    Automated hardening

    Role Based Access Control (RBAC)

    Network security for Asterisk

    Firewalling the Asterisk protocols

    SIP (Session Initiation Protocol)

    H.323

    IAX

    The Real-Time Transport Protocol (RTP)

    Controlling administration of Asterisk

    Asterisk scalability

    Load balancing with DNS

    Support channels for Asterisk

    Mailing lists

    Forums

    Internet Relay Chat (IRC)

    Web sites

    Digium

    Summary

    Index

    Asterisk 1.6

    David Gomillion

    Barrie Dempster

    David Merel


    Asterisk 1.6

    Copyright © 2009 Packt Publishing

    All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.

    Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors, Packt Publishing, nor its dealers or distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.

    Packt Publishing has endeavored to provide trademark information about all the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.

    First published: September 2009

    Production Reference: 1160909

    Published by Packt Publishing Ltd.

    32 Lincoln Road

    Olton

    Birmingham, B27 6PA, UK.

    ISBN 978-1-847198-62-4

    www.packtpub.com

    Cover Image by Raghuram Ashok (<raghuram.ashok@gmail.com>)

    Credits

    Authors

    David Merel

    Barrie Dempster

    David Gomillion

    Reviewer

    Justin Thomas Zimmer

    Acquisition Editor

    Louay Fatoohi

    Development Editor

    Swapna V. Verlekar

    Technical Editors

    Conrad Sardinha

    Neha Patwari

    Copy Editor

    Sanchari Mukherjee

    Indexer

    Rekha Nair

    Hemangini Bari

    Editorial Team Leader

    Gagandeep Singh

    Project Team Leader

    Priya Mukherji

    Project Coordinator

    Ashwin Shetty

    Proofreader

    Chris Smith

    Graphics

    Nilesh Mohite

    Production Coordinator

    Shantanu Zagade

    Cover Work

    Shantanu Zagade

    About the Authors

    David Merel is the founder and CEO of Thinkbright LLC a local/long distance telephone company as well as a cutting-edge Voice over IP carrier, providing businesses of all sizes with sophisticated and low cost VoIP solutions.

    David started Thinkbright (www.thinkbright.net) in 2005 and continues to manage the company and its employees, all of whom are dedicated IT professionals. David acts as the company's chief architect, continually designing new technologies that have added significant revenues to the company's operations. During his many years at Thinkbright, David has worked with the latest Voice over IP technology, including all VoIP equipment from major manufacturers such as Cisco, Polycom, Grandstream, and Aastra. He also works with customers ranging from small businesses to Fortune 500 companies, and interacts with system integrators and IT consultants who call Thinkbright on a daily basis for assistance with all the VoIP solutions that Thinkbright offers. Thinkbright manages its own PBX system, providing customers with PBX features such as Auto Attendants, Waiting Rooms, and Ring Groups, or assists customers in managing their own PBX network while providing these customers with the service for incoming and outgoing calls.

    David has many years of experience with Trixbox and Asterisk, and has installed countless custom configurations and deployments using those solutions. He also reviewed Trixbox 2.6, which is an excellent complimentary book to Asterisk 1.6.

    David earned a Bachelor of Arts triple majoring in Philosophy, Politics, and Law from SUNY Binghamton. David holds a CCNA (a Cisco Certified Network Associate) certificate and is proficient in over 10 programming languages and databases, various operating systems, VoIP and related protocols, and other business applications.

    I would like to thank Samantha Brinn and Tony Shi who have helped in producing this book. Samantha Brinn, who assisted in much of the grammatical and style editing, and Tony Shi who conducted research on many of the Asterisk installation steps discussed in the book.

    Barrie Dempster is currently employed as a Senior Security Consultant for NGS Software Ltd, a world-renowned security consultancy well known for its focus in enterprise-level application vulnerability research and database security. He has a background in Infrastructure and Information Security in a number of specialized environments such as financial services institutions, telecommunication companies, call centers, and other organizations across multiple continents. Barrie has experience in the integration of network infrastructure and telecommunication systems requiring high-caliber secure design, testing, and management. He has been involved in a variety of projects from the design and implementation of Internet banking systems to large-scale conferencing and telephony infrastructure, as well as penetration testing and other security assessments of business-critical infrastructure.

    David Gomillion currently serves as Director of Information Technology for the Eye Center of North Florida. There he orchestrates all of the technological undertakings of this four-location medical practice, including computers, software (off-the-shelf and custom development), server systems, telephony, networking, as well as specialized diagnostic and treatment systems. David received a Bachelor's of Science in Computer Science from Brigham Young University in August, 2005. There he learned the theory behind his computer experience, and became a much more efficient programmer. David has worked actively in the Information Technology sector since his freshman year at BYU. He has been a Networking Assistant, an Assistant Network Administrator, a Supervisor of a large Network and Server Operations unit, a Network Administrator, and finally a Director of Information Technology. Through his increasing responsibilities, he has learned to prioritize needs and wants, and applies this ability to his Asterisk installations.

    About the Reviewer

    Justin Thomas Zimmer has worked in the contact center technology field for over 10 years. During this time, he has performed extensive software and computer telephony integrations using both PSTN and IP telephony. His current projects include system designs utilizing open source soft switches over more traditional proprietary hardware-based telephony, and the integration of these technologies into market-specific CRM products.

    As the Technical Partner of Unicore Technologies out of Phoenix, AZ, Justin is developing hosted contact center solutions for the low-end market. Unicore's solutions present contact centers with low startup costs in a turbulent economy, and allow those centers to scale their business while maintaining a consistent and familiar user interface.

    He has worked on countless software user manuals and instructional guides for both internal and customer usage. He has reviewed the book, FreePBX published by Packt Publishing.

    He has also worked on The Hopewell Blogs—a science fiction adventure novel that will be released chapter by chapter online and available in print once the final chapter has been released.

    I'd like to thank the countless community contributors who have provided enough online documentation to make this book as accurate and helpful as possible. And I'd like to thank my wife Nicole for putting up with the extra hours spent reviewing this book, as well as my boys Micah, Caden, and daughter Keira for giving up some of their daddy-time for this project.

    Preface

    Asterisk is a powerful and flexible open source framework for building feature-rich telephony systems. As a Private Branch Exchange (PBX), which connects one or more telephones, and usually connects to one or more telephone lines, Asterisk offers very advanced features, including extension-to-extension calls, queues, line trunking, call distribution, call detail rerecords, and call recording. This book will show you how to build a telephony system for your home or business using this open source application. Asterisk 1.6 takes you step-by-step through the process of installing and configuring Asterisk. It covers everything from establishing your deployment plan to creating a fully functional PBX solution. Through this book you will learn how to connect employees from all over the world as well as streamline your callers through Auto Attendants (IVR) and Ring Groups.

    This book is all you need to understand and use Asterisk to build the telephony system that meets your need. You will learn how to use the many features that Asterisk provides you with. It presents example configurations for using Asterisk in three different scenarios—for small and home offices, small businesses, and hosted PBX.

    Over the course of ten chapters, this book introduces you to topics as diverse as the Public Switched Telephony Network (PSTN), Voice over IP Connections (SIP / IAX), DAHDI, LibPRI, through to advanced call distribution, automated attendants, FreePBX, and asterCRM.

    With an engaging style and excellent way of presenting information, this book makes a complicated subject very easy to understand.

    What this book covers

    Chapter 1:Introduction to Asterisk introduces you to Asterisk and goes over certain basics such as its capabilities and features, requirements, scalability, and cost of deployment. In addition, it covers the trade-offs of Asterisk, its benefits, and how to determine whether it can fit your needs.

    Chapter 2: Making a Plan for Deployment goes over the planning of equipment needed such as phones and adapters, the phone service you will use to power your Asterisk server such as PSTN lines or a SIP service from a VSP. Other planning such as hardware requirements and conducting a sound quality analysis are covered as well.

    Chapter 3: Installing Asterisk shows you how to install Asterisk using the source files. A step-by-step tutorial will take you through the entire process.

    Chapter 4: Configuring Asterisk shows you how to connect your Asterisk server with either your phone service (through PSTN or SIP, among others) as well as how to deploy some basic PBX features such as queues, voicemail, and music on hold. Other advanced features such as faxing, video conferencing, and using conference rooms are also covered in this chapter.

    Chapter 5: Creating a Dialplan focuses on creating your dialplan that determines how your calls are routed through the Asterisk server. You will learn how to create extensions, distribute calls in an orderly manner using queues, and present callers with a greeting using automated attendants (IVR).

    Chapter 6: Quality Assurance tells us everything regarding monitoring calls, recording calls, and capturing detailed call logs. Here you learn how to install and use these features.

    Chapter 7: Making Asterisk Easy to Manage shows you how to integrate third-party applications that make Asterisk easily manageable all through a web-based interface. The chapter will show you how to install FreePBX as well as give you an overview of its capabilities.

    Chapter 8: What is asterCRM? tells us about a useful business application a customer relationship management system (CRM) called asterCRM. Given its open source nature, Asterisk is compatible with many other business open-source applications. This chapter goes over installing and using this application, which can help streamline your business operations.

    Chapter 9: Case Studies discusses several case studies to give you real-world examples of how one would deploy Asterisk. The examples will give a summary of the deployment as well as the asterisk configuration code used to carry it out.

    Chapter 10: Maintenance and Security is an important chapter as it focuses on keeping your Asterisk system running smoothly as well as keeping it secure. The chapter covers security precautions, network deployment recommendations, as well as maintenance tips such as backups and preparing disaster recovery plans.

    What you need for this book

    Even though this book will provide you with step-by-step instructions, it is best if the reader has a basic understanding of Linux and its commands. For implementing Asterisk, you will need a PC with a P4 CPU or higher, 1 or 2 GB of RAM, and a hard drive of no less than 60 GB, 7200 RPM. Please note that it is possible to run Asterisk on lesser requirements; the configuration mentioned is simply a recommendation.

    Who this book is for

    This book is aimed at anyone who is interested in building a powerful telephony system using the free and open source application, Asterisk, without spending thousands of dollars buying a commercial and often less flexible system.

    This book is suitable for the novice and those who are new to Asterisk and telephony. Telephony or Linux experience will be helpful, but not required.

    Conventions

    In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

    Code words in text are shown as follows: Asterisk provides a number of defaults and we can configure additional ones in the /etc/asterisk/indications.conf file.

    A block of code is set as follows:

    [default]

    mode=files

    directory=/var/lib/asterisk/music-on-hold

    random=yes

    Any command-line input or output is written as follows:

    #!/bin/bash

    $ tar xjvf asterisk_backup.tar.bz2

    $ cp -R etc/asterisk /etc/asterisk

    New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: Once installed you will find the Backup & Restore module located under the Tools section of the GUI .

    Note

    Warnings or important notes appear in a box like this.

    Tip

    Tips and tricks appear like this.

    Reader feedback

    Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.

    To send us general feedback, simply send an email to <feedback@packtpub.com>, and mention the book title via the subject of your message.

    If there is a book that you need and would like to see us publish, please send us a note in the SUGGEST A TITLE form on www.packtpub.com or email .

    If there is a topic that you have expertise in and you are interested in either writing or contributing to a book on, see our author guide on www.packtpub.com/authors.

    Customer support

    Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

    Downloading the example code for the book

    Visit http://www.packtpub.com/files/code/8624_Code.zip to directly download the example code.

    The downloadable files contain instructions on how to use them.

    Errata

    Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you would report this to us. By doing so, you can save other readers from frustration, and help us to improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/support, selecting your book, clicking on the let us know link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata added to any list of existing errata. Any existing errata can be viewed by selecting your title from http://www.packtpub.com/support.

    Piracy

    Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or web site name immediately so that we can pursue a remedy.

    Please contact us at <copyright@packtpub.com> with a link to the suspected pirated material.

    We appreciate your help in protecting our authors, and our ability to bring you valuable content.

    Questions

    You can contact us at <questions@packtpub.com> if you are having a problem with any aspect of the book, and we will do our best to address it.

    Chapter 1. Introduction to Asterisk

    In this chapter, we will look at what Asterisk is and what it can do for us. As we explore features, we can make note of what features will help us to accomplish our goals.

    What is Asterisk?

    This is a fascinating question—what exactly is Asterisk? There are a number of answers, all of which are accurate.

    First, Asterisk is a symbol which is denoted as *. The symbol represents a wildcard in many computer languages. This gives us an insight into the developers' hopes for Asterisk. It is designed to be flexible enough to meet any need in the telephony realm.

    Second, Asterisk is an open source software package. Hundreds, if not thousands, of developers are working every day on Asterisk, extensions of Asterisk, software for Asterisk, and customized installations of Asterisk. A big portion of the product's flexibility comes from the availability of the source code. This means, we can modify the behavior of Asterisk to meet our needs.

    Finally, and most importantly, Asterisk is a framework that allows selection and removal of particular modules, allowing us to create a custom phone system. Asterisk's well-thought-out architecture gives

    Enjoying the preview?
    Page 1 of 1