Configuration Guide
You've installed Asterisk and verified that it will start up. Now how do you go about configuring your PBX? The first thing you need to do is tell Asterisk what telephone connections (to handsets and exchanges, whether by physical wire or by IP) you have. These are called channels.當安裝完Asterisk,驗證啓動無誤,就需要開始配置PBX了,首先需要告訴Asterisk那些類型的電話連接(手持設備,交換設備等,不管是通過電路還是IP),這些被稱爲通道。
The next task is to configure the Dialplan. The dialplan routes every call in the system from its source through various applications to its final destination.
下一步任務是配置撥號方案,撥號方案控制進入系統的呼叫根據設定的各種應用的走向,直到完成目標。
You're up and running now. But what about some extra bells and whistles?
現在已經運行了Asterisk,但是否需要一些額外的鈴音或提示音?
- Music on Hold (音樂保持)
- Call Parking (呼叫停泊)
- Billing (計費)
- Management interfaces (管理接口)
Templates
Templates can assist to avoid repeating the same section(s) again and again in your Asterisk configuration files.模板可以幫助避免在配置文件中出現重複項目
Generating Configuration Files from Templates
The STS Template Engine can generate Asterisk configuration files from templates. It has its own macro language for conditional template expansion and is available in source code for embedding into your own applications. The library sources could also be used to build a standalone command line utilitySTS模板引擎可以從模板中生成Asterisk配置文件.
Alternative Methods of Configuration
- GUI or Web based setup tools, see Asterisk GUI
- MySQL etc databases
Configuration Reference
Master configuration file:- asterisk.conf: Tell Asterisk the directories where everything is, including the directory containing all
the other configuration files. By default, Asterisk looks for the asterisk.conf file in the /etc/asterisk directory, but you can
supply a command line parameter to use a different asterisk.conf file.
主配置文件,asterisk.conf,通知Asterisk環境目錄位置,包含其他所有配置文件所包含的目錄,缺省Asterisk會在/etc/asterisk/目錄下找asterisk.conf文件,也可以通過命令參數使用不同的asterisk.conf
Configuration of Asterisk channels: (配置Asterisk通道)
- adtranvofr.conf: Configure voice over frame relay (Adtran style) channels
配置幀中繼語音通道 - agents.conf: Configure
agent channels
配置代理通道 - h323.conf: Configure
H323 channels
配置H323通道 - iax.conf: Configure
IAX channels
配置IAX通道 - mgcp.conf: Configure
MGCP channels
配置MGCP(媒體網關控制協議,應用於多媒體網關單元之間) - modem.conf: Configure
Modem channels (for ISDN, not for modems!)
配置ISDN,不是modem - phone.conf: Configure
phone channels (Linux Telephony devices)
配置linux電話設備 - sip.conf: Configure
SIP channels
配置SIP通道 - sip_notify.conf: Configure SIP NOTIFY messages
配置SIP 消息通知 - skinny.conf: Configure
Skinny channels (Cisco SCCP)
配置Voicetronix卡通道(是澳大利亞的開放源碼的CTI專業製造廠商) zapata.conf: Configure Zap channels (Digium cards)
配置ZAP卡通道
Configuration of Analog Display Services Interface: 配置模擬顯示服務接口
Configuration of the Dialplan:
- extensions.conf: The Dialplan 撥號方案
- extensions.ael: The Asterisk Extensions Language 擴展撥號方案語言
- parking.conf:
Call Parking configuration. Note: This file has been renamed to
features.conf as of Asterisk 1.0rc1 (17 july 2004)
配置呼叫停泊,文件名字已被修改爲features.conf - extconfig.conf: Used by res_data to arrange external configuration (e.g. thru ODBC)
通過res_data方式部署擴展配置,例如通過ODBC
Configuration of specific Dialplan Commands: 配置撥號方案特殊命令
- alarmreceiver.conf: AlarmReceiver configuration (警報接收配置)
- enum.conf: EnumLookup configuration (電話號碼映射查找配置)
- dundi.conf:
DUNDiLookup configuration
分佈式全球號碼發現(DUNDi)是一個對等(P2P)協議,用於提供等價於那些由電子號碼(ENUM)提供的服務。DUNDi有一個超過 ENUM的優點就是它更有彈力,因爲也它缺乏一個故障中心點。DUNDi能夠被用於增加DNS和它與IP語音(VOIP)服務一起發展。
festival.conf: Festival configuration (文本語音轉換配置) - indications.conf: Playtones tone definitions (鈴音清晰度配置)
- meetme.conf: MeetMe conference configuration (會議配置)
- musiconhold.conf: MusicOnHold configuration (音樂保持配置)
- queues.conf: Queue configuration (隊列配置)
- voicemail.conf: VoiceMail configuration ( 語音郵件配置)
Uncategorized configuration files: 沒分目錄配置文件
- alarmreceiver.conf: 警報接收配置
- alsa.conf 致力於爲Linux 提供高質量的聲音子系統
- cdr_odbc.conf 通話詳單數據庫存儲配置
- cdr_pgsql.conf
- codecs.conf Asterisk編碼配置文件
- dnsmgr.conf: Background DNS update manager (new in Asterisk v1.2) DNS管理
- features.conf: Call Parking and other features 呼叫停泊等其他特性配置
- http.conf: Built-in mini HTTP server 內置http server配置
- logger.conf: Configuration of what to log and where to log it 配置系統日誌
- manager.conf: Configuration of the Asterisk manager API 配置管理接口
- modules.conf: Configuration of Asterisk module loading 配置可加載模塊
- odbc.conf: Configuration of UnixODBC drivers for Asterisk ODBC驅動配置
- oss.conf open source software配置
- privacy.conf 私密配置
- res_odbc.conf 實時數據庫加載配置,可以把配置文件放在數據庫中
- rpt.conf 循環應用配置Repeater Application Configuration
- rtp.conf: Configuration of RTP ports for media 配置RTP(實時)端口
- say.conf: Internationalised numbers and dates (new in Asterisk v1.4) (讀出標準的數字和日期)
- users.conf: Generate a "user" (phone, dioalplan, and just about everything)
用戶定義配置文件
Add on modules, not in standard source distribution
附加模塊,不在標準發佈代碼中
- capi.conf: Configuration of
CAPI channels and devices.
CAPI是計算機輔助面對面訪問(Computer Assisted Personal Interviewing)的簡稱,是使用基於計算機的問卷的一種調研技術,CAPI可以像CATI一樣控制複雜的邏輯,而且,它可以在各種各樣的場所使用,購物中心,論壇或者其它公共場所,只要是被訪者可以接觸到電腦的地方。例如,在定點街訪項目,藉助端對端網絡,它可以從容的管理問卷,控制配額,以及管理數據庫,且不需要數據庫服務器。 在 - 面對面訪問中,問卷可以由訪問人員直接採用電腦,被訪者同時可以查看的方式進行訪問,也可以是被訪者自己的電腦上看到電子問卷,自己操作訪問。
CATI:計算機輔助電話調查系統的簡稱 - sirrix.conf: Configuration of Sirrix ISDN channels 配置Sirrix ISDN通道
- cdr_mysql.conf: Configuration of MySQL CDR database for billing 配置通話詳單在mysql中存儲
- prepaid.conf: Configuration of Prepaid calling card system. 預付費卡配置
- ldap.conf: Configuration for LDAPget 訪問x.500目錄訪問的標準協議
- bonjour.conf: Configuration for
res_bonjour (aka Rendezvous, aka Zeroconf)
蘋果服務發現接口支持 - enumagi.conf: Configuration file for enumlookup.agi
電話號碼映射查找配置文件 - zeroconf.conf: Configuration file defining services and parameters to advertise via zeroconf是一個輕量級的服務發現協議,適用於註冊和尋找附近的可用協議、設備等等。 他是bonjour的開源名稱,bonjour是蘋果公司力推的一個service discovery協議
- /etc/zaptel.conf: Configuration of the kernel part of zaptel
- vxml.conf: Configuration of the VoiceXML interpreter vxml
General hints about configuration files
- In all Asterisk configuration files, you may include other files by using the
#include statement. This way, you may save your general SIP configuration in one file and have the SIP accounts in another file.
在所有的Astersik配置文件中,可以通過#include來包含加載其他配置文檔,也就是說,可以存儲通用SIP信息在一個文件中,用戶帳戶存儲在另外的文件中