Getting Started With Asterisk.pdf

(404 KB) Pobierz
The Asterisk Documentation Project
Volume One: An Introduction to Asterisk
Leif Madsen
Jared Smith
Jim Van Meggelen
Chris Tooley
The Asterisk Documentation Project: Volume One: An Introduction to Asterisk
by Leif Madsen, Jared Smith, Jim Van Meggelen, and Chris Tooley
Copyright © 2004 The Asterisk Documentation Project
A guide to the installation and basic use of Asterisk.
This document may be distributed subject to the terms and conditions set forth in the Open Publication License, v1.0 or
later (the latest version is presently available at http://www.opencontent.org/openpub/
1
)
Revision History
Revision 0.1 $Date: 2004/09/19 16:59:59 $
Table of Contents
Preface ..................................................................................................................................... i
1. Introduction .......................................................................................................................1
General Concept of Asterisk.......................................................................................1
Asterisk: The Future Of Telephony ..................................................................1
The goals of this document ...............................................................................1
Prerequisite Knowledge and Skills ..................................................................2
What to expect.....................................................................................................2
2. Preparing Your System for Asterisk..............................................................................5
Hardware.......................................................................................................................5
Platform and Digium Hardware ......................................................................5
Hardware Minimums ........................................................................................5
Assembling Your System...................................................................................5
Installing Cards...................................................................................................7
Choosing an Operating System / Distribution........................................................7
Linux Requirements ...........................................................................................7
Fedora Linux vs. Other Distributions / OSes.................................................8
Obtaining FC1 .....................................................................................................8
Overview of FC1 for Asterisk ...........................................................................8
Conclusion...................................................................................................................12
3. Obtaining and Compiling Asterisk ............................................................................13
Getting Asterisk from CVS .......................................................................................13
What is CVS? .....................................................................................................13
Telephony Card Drivers ............................................................................................13
Obtain .................................................................................................................13
Compile..............................................................................................................13
Modprobe ..........................................................................................................15
ztcfg ....................................................................................................................18
zttool ...................................................................................................................19
Asterisk ........................................................................................................................19
Obtain .................................................................................................................19
Compile..............................................................................................................20
Test ......................................................................................................................20
4. Configuring Channels....................................................................................................23
Introduction to Channels ..........................................................................................23
FXO and FXS...............................................................................................................23
FXS ......................................................................................................................23
FXO .....................................................................................................................24
IAX................................................................................................................................25
General Settings ................................................................................................25
Defining IAX Channels....................................................................................26
SIP.................................................................................................................................27
General Settings ................................................................................................27
Defining SIP Channels .....................................................................................27
Other Channel Protocols ...........................................................................................28
H.323...................................................................................................................28
ISDN ...................................................................................................................28
MGCP .................................................................................................................28
SCCP (Skinny)...................................................................................................28
VoFR....................................................................................................................28
Bluetooth............................................................................................................28
iii
5. Brief Introduction to Dialplans....................................................................................29
Introduction to Creating Dialplans..........................................................................29
Contexts .............................................................................................................29
Extensions ..........................................................................................................30
Priorities .............................................................................................................31
Applications ......................................................................................................31
A Simple Example......................................................................................................31
The special ’s’ extension ..................................................................................31
The
Answer()
,
Playback()
, and
Hangup()
applications ..................31
Our first dialplan ..............................................................................................32
A more useful example ....................................................................................32
Calling channels with the
Dial()
application ...........................................34
Adding Additional Functionality ............................................................................34
Handling Calls Between Internal Users ........................................................34
Variables ......................................................................................................................35
Global Variables ................................................................................................35
Channel Variables .............................................................................................35
Environment Variables.....................................................................................36
Adding Variables ..............................................................................................36
Call Flow......................................................................................................................37
Pattern Matching ..............................................................................................37
Making use of the ${EXTEN} channel variable ............................................37
Linking Contexts with Includes .....................................................................39
Some Other Special Extensions ......................................................................40
Creating Prompts .......................................................................................................41
Use of the
Record()
Application.................................................................41
Use of the
Authenticate()
Application ....................................................41
Conclusion...................................................................................................................42
Colophon ..............................................................................................................................43
iv
Preface
i
Zgłoś jeśli naruszono regulamin