Asterisk Handbook-Draft.pdf

(3450 KB) Pobierz
The Asterisk
Handbook
Version 2
Mark Spencer
Mack Allison
Christopher Rhodes
The Asterisk Documentation Team
Last Edit Date: 3/30/03
1002958354.008.png
The Asterisk Handbook
The Asterisk Handbook
Version 2
About this book
Authors:
Mark Spencer
Mack Allison
Christopher Rhodes
The Asterisk Documentation Team
Special thanks to all the users, contributers, and developers who have
made Asterisk a reality.
Copyright © 2003 Digium, Inc. All rights reserved. This document
may not be duplicated, copied, or redistributed in any form,
electronic or physical, without the prior written consent of Digium,
Inc.
The latest version of this document may be downloaded for free from
http://www.digium.com .
This book was created using OpenOffice, available at
http://www.openoffice.org .
Page 2
1002958354.009.png
 
The Asterisk Handbook
1. Chapter 1: Introduction......................................................................5
1.1 What is Asterisk?.........................................................................5
1.2 Obtaining Asterisk.......................................................................6
1.3 Licensing......................................................................................6
1.4 Supported Technologies..............................................................7
1.4.1 Zaptel Pseudo TDM interfaces............................................7
1.4.2 Non-Zaptel hardware interfaces..........................................8
1.4.3 Packet voice protocols.........................................................8
1.5 Contributing.................................................................................8
1.5.1 Code Contributions..............................................................9
1.5.2 Documentation Contributions.............................................9
1.5.3 Asterisk IRC Channel and Mailing List...........................10
1.5.4 Supporting Asterisk Sponsors...........................................10
1.5.5 Core Developer Wishlists..................................................10
2. Chapter 2: Asterisk's Architecture...................................................11
2.1 Asterisk Architecture Overview................................................11
2.2 Detailed Asterisk Architecture..................................................11
2.3 Network Examples.....................................................................12
2.3.1 The Mythical 1x1 PBX......................................................12
2.3.2 An 8x16 Small Office PBX...............................................13
2.3.3 SME with Remote Offices.................................................14
2.3.4 High Density IVR and Conferencing................................14
2.4 Filesystem Organization............................................................15
2.5 Naming Channels.......................................................................17
2.5.1 Zap: Zaptel TDM Channels...............................................18
2.5.2 SIP: Session Initiation Protocol Channels........................19
2.5.3 IAX: Inter-Asterisk eXchange Channels..........................19
3. Chapter 3: Running Asterisk...........................................................21
3.1 Asterisk Command Line Arguments........................................21
3.2 Asterisk Command Line Interface............................................23
4. Chapter 4: The Asterisk Dialplan....................................................25
4.1 Introduction to Extension Contexts..........................................25
Page 3
1002958354.010.png
 
The Asterisk Handbook
4.1.1 Extension Contexts Uses...................................................25
4.1.2 Basic Extension Context....................................................26
4.1.3 Sample Voice Menu...........................................................26
4.1.4 Pattern Matching................................................................27
4.1.5 Context Inclusion...............................................................28
4.2 Complete Set of Contexts..........................................................29
4.3 Defining Extensions...................................................................30
4.3.1 Basic Extension Example..................................................30
4.3.2 Dialing a Phone..................................................................31
4.3.3 Routing by Caller ID.........................................................31
4.3.4 Ringing Phones in Sequence.............................................32
4.3.5 Basic Voice Menu..............................................................33
4.3.6 Using Variables..................................................................33
4.3.7 Including Contexts.............................................................34
4.3.8 Daytime/Nighttime Modes................................................35
4.3.9 Outbound Dialing...............................................................36
4.3.10 Failover Trunking and LCR............................................37
4.3.11 Using Macros...................................................................38
5. Chapter 5: Configuration Files........................................................40
5.1 Introduction to Config Files......................................................40
5.2 Configuration File Grammars...................................................40
5.2.1 Simple Groups....................................................................41
5.2.2 Inherited Option Object (e.g. zapata.conf).......................42
5.2.3 Complex Entity Object (iax.conf).....................................43
5.3 Channel Interfaces.....................................................................43
5.3.1 zapata.conf..........................................................................43
5.3.2 sip.conf...............................................................................56
5.3.3 iax.conf...............................................................................60
5.4 Application Configurations.......................................................68
5.4.1 voicemail.conf....................................................................68
Page 4
1002958354.001.png
 
The Asterisk Handbook Chapter 1: Introduction
O
fficially, Asterisk is an Open Source hybrid TDM and
packet voice PBX and IVR platform with ACD
functionality. Unofficially, Asterisk is quite possibly the
most powerful, flexible, and extensible piece of integrated
telecommunications software available. Its name comes from the
asterisk symbol, *, which in UNIX (including Linux) and DOS
environments represents a wildcard, matching any filename.
Similarly, Asterisk the PBX is designed to interface any piece of
telephony hardware or software with any telephony application,
seamlessly and consistently.
Traditionally, telephony products are designed to meet a specific
technical need in a network. However, many applications of using
telephony share a great deal of technology. Asterisk takes advantage
of this synergy to create a single environment that can be molded to
fit any particular application, or collection of applications, as the user
sees fit.
Asterisk can, among other things, be used in any of these
applications:
Heterogeneous Voice over IP gateway (MGCP, SIP, IAX, H.323)
Private Branch eXchange (PBX)
Custom Interactive Voice Response (IVR) server
Softswitch
Conferencing server
Number translation
Calling card application
Predictive dialer
Call queuing with remote agents
Remote offices for existing PBX
Page 5
1002958354.002.png 1002958354.003.png 1002958354.004.png 1002958354.005.png 1002958354.006.png 1002958354.007.png
 
Zgłoś jeśli naruszono regulamin