Zapata配置

Zap Channel Module Configuration

The Zap channel module permits Asterisk to communicate with the Zaptel device driver, used to access Zaptel telephony interface cards. You configure Asterisk's Zap channel module in the zapata.conf file.
Zap channel模塊允許Asterisk與zaptel驅動程序之間通訊。通過配置zapata.conf文件實現

You will need the Zaptel kernel module device driver installed. See:


Although TDMoE is not directly related to Zapata hardware, it uses a pseudo-TDM engine, and gets configured here.

Using MySQL For Zap Channel Configuration

It is possible to store configuration settings for the Zap channel driver in a MySQL table, rather than editing the zapata.conf text file. You will have to compile a version of Asterisk with this support built in. See:
可以把zap channel而配置存儲在mysql表中,而不是zapatap.conf中,這需要版本支持


The rest of this page assumes you are editing the zapata.conf file by hand.

Creating Channels

The format of the zapata.conf file is unfortunately not as simple as it could be. Most keywords do not do anything by themselves; they merely set up the parameters of any channel definitions that follow. The channel keyword actually creates the channel, using the settings specified before it. For example, you might create two channels like this:
zapata.conf文件,沒有看上去那麼複雜,大多數關鍵詞自己不做什麼,僅僅是定義通道參數,channel關鍵詞纔是真正的創建通道。

   signalling=fxo_ks
   language=en
   context=reception
   channel => 1

   signalling=fxo_ks
   language=fr
   context=sales
   channel => 2

This creates channel 1 with a default language code "en" and a context "reception". Channel 2 has a default language code "fr" and context "sales".

This is important, if you put something like echocancel=no before the channel definition, it will effect all channels unless you turn it on later with echocancel=yes. It progresses downward, but the definition must be above the channel=> statement.
非常重要的是,如果例如在通道前定義echocancel=no,會使影響所有通道,直到定義echocancel=yes,他會往下執行,因此,定義必須在channel=>前面進行定義

Available Settings

 

Signalling Type

The signalling type to use with your interface is the only mandatory setting. You must set a signalling type before allocating a channel. If you are connecting analog telephone equipment, note that analog phone signalling can be a source of some confusion. FXS channels are signalled with FXO signalling, and vice versa. Asterisk 'talks' to internal devices as the opposite side. An FXO interface card is signalled with FXS signalling by Asterisk, and should be configured as such.
信令類型是唯一強制設置,在分配一個通道之前,必須定義信令類型。如果連接的模擬電話設備,注意模擬信令是導致混亂的來源。FXS通道採用FXO信令,反之,Asterisk通知內部設備採用相反方式。FXO接口卡採用FXS信令,同樣須定義。

signalling: Sets the channel signaling type. These parameters should match the Zaptel driver configuration. The setting to use depends partly on which interface card you have. Asterisk will fail to start if a channel signaling definition is incorrect or unworkable, if the statements do not match the Zaptel driver configuration, or if the device is not present or properly configured. The correct setting to use is almost certainly one of the following four: fxs_ks, fxo_ks, pri_cpe or pri_net. This setting has no default value; you must set a value before allocating a channel. Asterisk supports the following signalling types:
signalling:設置通道信令類型,這些參數須與zaptel驅動配置匹配。設置基於採用什麼樣的板卡,如果通道信令設置錯誤,如果配置描述與zaptel驅動配置不匹配,或者如果卡不存在而配置正確,Asterisk不會工作。正確的設置通常包含下面4中信令中一種,fxs_ks, fxo_ks, pri_cpe or pri_net。該設置沒有缺省值,必須在分配通道前設置信令值,下面是Asterisk支持的信令類型。
  • em: E & M Immediate Start
  • em_w: E & M Wink Start
  • em_e1: E & M CAS signalling for E1 lines
  • featd: Feature Group D (The fake, Adtran style, DTMF)
  • featdmf_ta: Feature Group D (The real thing, MF (domestic, US)) through a Tandem Access point
  • fgccama Feature Group C-CAMA (DP DNIS, MF ANI)
  • fgccamamf Feature Group C-CAMA MF (MF DNIS, MF ANI)
  • featdmf: Feature Group D (The real thing, MF (domestic, US))
  • featb: Feature Group B (MF (domestic, US))
  • fxs_ls: FXS (Loop Start)
  • fxs_gs: FXS (Ground Start)
  • fxs_ks: FXS (Kewl Start)
  • fxo_ls: FXO (Loop Start)
  • fxo_gs: FXO (Ground Start)
  • fxo_ks: FXO (Kewl Start)
  • pri_cpe: PRI signalling, CPE side
  • pri_net: PRI signalling, Network side (for instance, side that provides the dialtone)
  • sf: SF (Inband Tone) Signalling
  • sf_w: SF Wink
  • sf_featd: SF Feature Group D (The fake, Adtran style, DTMF)
  • sf_featdmf: SF Feature Group D (The real thing, MF (domestic, US))
  • sf_featb: SF Feature Group B (MF (domestic, US))
  • e911: E911 (MF) style signalling. Originating switch goes off-hook, far-end winks, originating sends KP-911-ST, far-end gives answer supervision, Originating-end sends KP-0-ANI-ST
  • The following are used for Radio interfaces:
  • fxs_rx: Receive audio/COR on an FXS kewlstart interface (FXO at the channel bank)
  • fxs_tx: Transmit audio/PTT on an FXS loopstart interface (FXO at the channel bank)
  • fxo_rx: Receive audio/COR on an FXO loopstart interface (FXS at the channel bank)
  • fxo_tx: Transmit audio/PTT on an FXO groundstart interface (FXS at the channel bank)
  • em_rx: Receive audio/COR on an E&M interface (1-way)
  • em_tx: Transmit audio/PTT on an E&M interface (1-way)
  • em_txrx: Receive audio/COR AND Transmit audio/PTT on an E&M interface (2-way)
  • em_rxtx: same as em_txrx (for our dyslexic friends)
  • sf_rx: Receive audio/COR on an SF interface (1-way)
  • sf_tx: Transmit audio/PTT on an SF interface (1-way)
  • sf_txrx: Receive audio/COR AND Transmit audio/PTT on an SF interface (2-way)
  • sf_rxtx: same as sf_txrx (for our dyslexic friends)
 

Zap Channel Module Configuration

The Zap channel module permits Asterisk to communicate with the Zaptel device driver, used to access Zaptel telephony interface cards. You configure Asterisk's Zap channel module in the zapata.conf file.
Zap channel模塊允許Asterisk與zaptel驅動程序之間通訊。通過配置zapata.conf文件實現

You will need the Zaptel kernel module device driver installed. See:


Although TDMoE is not directly related to Zapata hardware, it uses a pseudo-TDM engine, and gets configured here.

Using MySQL For Zap Channel Configuration

It is possible to store configuration settings for the Zap channel driver in a MySQL table, rather than editing the zapata.conf text file. You will have to compile a version of Asterisk with this support built in. See:
可以把zap channel而配置存儲在mysql表中,而不是zapatap.conf中,這需要版本支持


The rest of this page assumes you are editing the zapata.conf file by hand.

Creating Channels

The format of the zapata.conf file is unfortunately not as simple as it could be. Most keywords do not do anything by themselves; they merely set up the parameters of any channel definitions that follow. The channel keyword actually creates the channel, using the settings specified before it. For example, you might create two channels like this:
zapata.conf文件,沒有看上去那麼複雜,大多數關鍵詞自己不做什麼,僅僅是定義通道參數,channel關鍵詞纔是真正的創建通道。

   signalling=fxo_ks
   language=en
   context=reception
   channel => 1

   signalling=fxo_ks
   language=fr
   context=sales
   channel => 2

This creates channel 1 with a default language code "en" and a context "reception". Channel 2 has a default language code "fr" and context "sales".

This is important, if you put something like echocancel=no before the channel definition, it will effect all channels unless you turn it on later with echocancel=yes. It progresses downward, but the definition must be above the channel=> statement.
非常重要的是,如果例如在通道前定義echocancel=no,會使影響所有通道,直到定義echocancel=yes,他會往下執行,因此,定義必須在channel=>前面進行定義

Available Settings

 

Signalling Type

The signalling type to use with your interface is the only mandatory setting. You must set a signalling type before allocating a channel. If you are connecting analog telephone equipment, note that analog phone signalling can be a source of some confusion. FXS channels are signalled with FXO signalling, and vice versa. Asterisk 'talks' to internal devices as the opposite side. An FXO interface card is signalled with FXS signalling by Asterisk, and should be configured as such.
信令類型是唯一強制設置,在分配一個通道之前,必須定義信令類型。如果連接的模擬電話設備,注意模擬信令是導致混亂的來源。FXS通道採用FXO信令,反之,Asterisk通知內部設備採用相反方式。FXO接口卡採用FXS信令,同樣須定義。

signalling: Sets the channel signaling type. These parameters should match the Zaptel driver configuration. The setting to use depends partly on which interface card you have. Asterisk will fail to start if a channel signaling definition is incorrect or unworkable, if the statements do not match the Zaptel driver configuration, or if the device is not present or properly configured. The correct setting to use is almost certainly one of the following four: fxs_ks, fxo_ks, pri_cpe or pri_net. This setting has no default value; you must set a value before allocating a channel. Asterisk supports the following signalling types:
signalling:設置通道信令類型,這些參數須與zaptel驅動配置匹配。設置基於採用什麼樣的板卡,如果通道信令設置錯誤,如果配置描述與zaptel驅動配置不匹配,或者如果卡不存在而配置正確,Asterisk不會工作。正確的設置通常包含下面4中信令中一種,fxs_ks, fxo_ks, pri_cpe or pri_net。該設置沒有缺省值,必須在分配通道前設置信令值,下面是Asterisk支持的信令類型。
  • em: E & M Immediate Start
  • em_w: E & M Wink Start
  • em_e1: E & M CAS signalling for E1 lines
  • featd: Feature Group D (The fake, Adtran style, DTMF)
  • featdmf_ta: Feature Group D (The real thing, MF (domestic, US)) through a Tandem Access point
  • fgccama Feature Group C-CAMA (DP DNIS, MF ANI)
  • fgccamamf Feature Group C-CAMA MF (MF DNIS, MF ANI)
  • featdmf: Feature Group D (The real thing, MF (domestic, US))
  • featb: Feature Group B (MF (domestic, US))
  • fxs_ls: FXS (Loop Start)
  • fxs_gs: FXS (Ground Start)
  • fxs_ks: FXS (Kewl Start)
  • fxo_ls: FXO (Loop Start)
  • fxo_gs: FXO (Ground Start)
  • fxo_ks: FXO (Kewl Start)
  • pri_cpe: PRI signalling, CPE side
  • pri_net: PRI signalling, Network side (for instance, side that provides the dialtone)
  • sf: SF (Inband Tone) Signalling
  • sf_w: SF Wink
  • sf_featd: SF Feature Group D (The fake, Adtran style, DTMF)
  • sf_featdmf: SF Feature Group D (The real thing, MF (domestic, US))
  • sf_featb: SF Feature Group B (MF (domestic, US))
  • e911: E911 (MF) style signalling. Originating switch goes off-hook, far-end winks, originating sends KP-911-ST, far-end gives answer supervision, Originating-end sends KP-0-ANI-ST
  • The following are used for Radio interfaces:
  • fxs_rx: Receive audio/COR on an FXS kewlstart interface (FXO at the channel bank)
  • fxs_tx: Transmit audio/PTT on an FXS loopstart interface (FXO at the channel bank)
  • fxo_rx: Receive audio/COR on an FXO loopstart interface (FXS at the channel bank)
  • fxo_tx: Transmit audio/PTT on an FXO groundstart interface (FXS at the channel bank)
  • em_rx: Receive audio/COR on an E&M interface (1-way)
  • em_tx: Transmit audio/PTT on an E&M interface (1-way)
  • em_txrx: Receive audio/COR AND Transmit audio/PTT on an E&M interface (2-way)
  • em_rxtx: same as em_txrx (for our dyslexic friends)
  • sf_rx: Receive audio/COR on an SF interface (1-way)
  • sf_tx: Transmit audio/PTT on an SF interface (1-way)
  • sf_txrx: Receive audio/COR AND Transmit audio/PTT on an SF interface (2-way)
  • sf_rxtx: same as sf_txrx (for our dyslexic friends)

PRI通道存在一個空閒Extension和一個微小閒置數字,只要閒置通道是空閒的,ZAP通道模塊就會嘗試在該通道上進行空閒撥號,然後Asterisk就會執行定義爲idelext的Context和Extension中的命令。當通道需要進行語音呼叫時,'空閒'呼叫會斷開並讓多數通道有效。(當然儘管有微小閒置呼叫正在運行)。主要的用途是創建動態的服務,當閒置通道綁定了multilnk ppp協議後,將比傳統的多重映射提供更有效率的提供綜合的語音/數據服務。

minunused: The minimum number of unused channels available. If there are fewer channels available, Asterisk will not attempt to bundle any channels and give them to the data connection. Takes an integer.
minunused:最小可用閒置通道的數量。如果有很少的通道可用,Asterisk不會嘗試捆綁任何通道進行數據連接。該參數需要一個整數。
minidle: The minimum number of idle channels to bundle for the data link. Asterisk will keep this number of channels open for data, rather than taking them back for voice channels when needed. Takes an integer.
minidle:最小綁定進行數據連接的通道數量,Asterisk會爲數據開啓這個通道數量,而不是在需要的時候返回到語音通道的使用上。該參數需要一個整數。

idledial: The number to dial as the idle number. This is typically the number to dial a Remote Access Server (RAS). Channels being idled for data will be sent to this extension. Takes an integer that does not conflict with any other extension in the Dialplan, and has been defined as an idleext.
idledial: 空閒撥號的數量,這是用於撥叫遠程訪問服務器最基本的一個數字,爲數據預留的閒置通道被這個分機。該參數需要一個整數,與在撥號方案中定義了idleext的分機不會產生衝突。

idleext: The extension to use as the idle extension. Takes a value in the form of exten@context. Typically, the extension would be an extension to run the ZapRAS command.
idleext:用於空閒分機的extension,以exten@context的用法使用,典型的用法是被作爲分機運行ZapRAS命令。
  minunused=2
  minidle=1
  idledial=6999
  idleext=6999@idle


 

Analog Trunk Features (模擬中繼特徵)

usedistinctiveringdetection: Whether or not to attempt to recognize distinctive ring styles on incoming calls. This does not require audio analyisis because rings are simple transitions of the analog line. It's merely a matter of matching the transition pattern.
usedistinctiveringdetection:是否嘗試識別來電特殊鈴音,這不需要音頻分析,因爲鈴音在模擬線路上是非常簡單轉換,只需要匹配轉換樣本。缺省值:no
Default: no.
   usedistinctiveringdetection=yes

dring1, dring2, dring3: If you set usedistinctiveringdetection=yes, then you may define up to three different distinctive ring styles for Asterisk to attempt to recognize. Each style is defined as a comma separated list of up to three integers. Nobody has yet documented what these numbers mean, so you're on your own when it comes to trying to figure out what numbers to use for the distinctive ring syles used by your phone company in your country. But the tip is to use the Asterisk console in verbose mode, and apparently it reports numbers describing the ring patterns it sees. These patterns may be a starting point:
dring1, dring2, dring3:如果設置了usedistinctiveringdetection=yes,就需要定義三種不同特點的鈴音風格,以便於Asterisk能夠嘗試識別。每種風格使用逗號分割三個整數來定義。沒有文檔說明三個數字的含義,因此需要自己測試鑑別在不同國家不同公司中,不同數字代表的風格。Asterisk控制檯上也會顯示識別的風格數字,具體風格可能會是以下一些情況。
   dring1=96,0,0
   dring2=325,95,0
   dring3=367,0,0

dring1context, dring2context, dring3context: Along with setting up to three distinctive ring patterns with dring1, dring2 and dring3, you also set corresponding contexts for incoming calls matching those distinctive ring patterns to jump into. If an incoming call does not match any of the distinctive ring patterns defined, then of course it will enter Asterisk with the default context defined for this channel. 
dring1context, dring2context, dring3context:根據三種不同的鈴音風格設置不同的context進行來電跳轉,如果來電沒有定義的風格匹配,就會進入該通道缺省的congtext。
   dring1context=line2incoming
   dring2context=business
   dring3context=chocolate

busydetect: If enabled, Asterisk will analyze the audio coming in on the line during a call or a dial attempt to attempt to recognize busy signals. This is useful on analog trunk interfaces both to detect a busy signal when dialing out, and for detecting when the person has hung up. See also Disconnect Supervision. Be sure that you don't use this on digital interfaces like QuadBri cards and so on. Otherwise you will run in "broken calls" problems. default=no
busydetect:忙音檢測,如果開啓,Asterisk會撥號嘗試或通話中分析在線的音頻,從而嘗試識別忙音信號。這非常在模擬中繼接口上外呼時檢測忙音信號非常有用,可以檢測何時掛機。確認不能在例如QuadBri等卡上使用該參數,否則出現中斷通話的問題,缺省值:no

  busydetect=yes

busycount: This option requires busydetect=yes. You can specify how many busy tones to wait before hanging up. The default is 3, but better results can be achieved if set to 6 or even 8. The higher the number, the more time is needed to detect a disconnected channel, but the lower the probability mistaking some other sound as being a busy tone.
  busycount=5
busycount:這個選項需要busydetect=yes,可以定義等待掛機的忙音信號數量,缺省值是3,但能達到的最好效果可能是設置6或者8,數字越高,檢測掛機通道所需要的時間就越長,但小的數字可能會導致把其他聲音錯誤的識別爲忙音信號。


callprogress: Asterisk can attempt to monitor the state of the call to listen for a ringing tone, busy tone, congestion tone, and sounds indicating that the line has been answered. It appears that this feature is independent of the busydetect feature; it seems that both can run in parallel, and both will independently attempt to recognize a busy tone. The callprogress feature is highly experimental and can easily detect false answers, so don't count on it being very accurate. Also, it is currently configured only for standard U.S. phone tones. Default: no. 
callprogress:Asterisk可以通過嘗試監控呼叫狀態來偵聽振鈴音,忙音,擁塞音以及線路已經應答聲音特徵。這個特徵不受busydetect特徵影響,兩者可以並行處理,獨自嘗試識別忙音信號。callprogress的特徵是高實驗證明更容易檢測錯誤應答,所以不要指望它非常準確。因此,目前僅僅在標準美國電話鈴音中配置,缺省值:no
  callprogress = yes

pulse: The standard installation of Asterisk does not permit you to specify that a Zaptel device use pulse dialing, even though the Zaptel driver supports pulse dialing. But you can apply a patch file to enable you to specify pulse dialing with the pulse keyword. See Pulse Dialing on Zap Channels for the patch.
pulse:Asterisk標準安裝中,沒有允許定義Zaptel卡使用脈衝撥號,儘管Zaptel驅動支持脈衝撥號,但可以更新補丁文件,使用pulse關鍵字去開啓脈衝撥號。
   pulse=yes

Analog Handset Features 模擬電話特徵

adsi: If your handset has ADSI (Analog Display Services Interface) capability, set set adsi=yes. The ADSI specification is system similar to Caller ID to pass encoded information to an analog handset. It allows the creation of interactive visual menus on a multiline display, offering access to services such as voicemail through a text interface.
adsi:如果手持設備支持ADSI(模擬顯示服務接口),設置set adsi=yes,ADSI類似來電顯示功能,傳遞編碼信息到手持設備。它可以在多行顯示的手持設備上創建交互式可視化菜單,通過文本接口提供類似語音郵件的訪問服務。

immediate: Normally (i.e. with immediate set to 'no', the default), when you lift an FXS handset, the Zaptel driver provides you a dialtone and listens for digits that you dial, passing them on to Asterisk. Asterisk waits until the number you've dialed matches an extension, and then begins executing the first command on the matching extension. If you set immediate=yes, then Asterisk will instruct the Zaptel driver to not generate a dialtone when you lift a handset, instead passing control immediately to Asterisk. Asterisk will start executing the commands for this channel's "s" extension. This is sometimes referred to as "batphone mode". Default: no.
immediate:通常(immediate設置爲no,缺省值),當FXS話機掛機時,Zaptel驅動會馬上提供撥號音,等待撥號並傳遞給Asterisk。Asterisk等到接收到extension匹配號碼時,就會開始執行相應的命令,如果設置 immediate=yes,Asterisk會命令Zaptel驅動不要在FXS掛機時產生撥號音,而是把控制權交還給Asterisk,Asterisk會開始執行這個通道的s extension。這通常應用於batphone 模式(蝙蝠電話?),缺省No
   immediate=yes

callwaiting: If enabled, Asterisk will generate "call waiting pips" when you are already in a conversation on your FXS handset when someone tries to call you. If the channel has call waiting by default, you can temporarily disable it by lifting the handset and dialing *70, whereupon you will get a dialrecall tone and may then dial the intended number. There is no corresponding way to temporarily enable call waiting for channels that have it off by default. Default: no.
callwaiting:如果開啓,在通話過程中如果有來電時,Asterisk就會產生呼叫等待提示音。如果通道缺省有呼叫等待,可以臨時摘機按鍵*70取消,這種情況下,會收到重播提示音去撥打希望撥打的號碼。沒有合適的方法臨時開啓缺省設置爲關閉的通道的呼叫等待。缺省爲no
   callwaiting=yes

callwaitingcallerid: Sets whether Asterisk will send Caller ID data to the handset during call waiting indication. Requires also setting callwaiting=yes. Default: no.
callwaitingcallerid:設置在呼叫等待過程中是否傳送主叫號碼等數據,需要設置callwaiting=yes,缺省值:no
   callwaitingcallerid=yes

threewaycalling: If enabled, you can place a call on hold by pressing a hook flash, whereupon you get a dialrecall tone and can make another call. Default: no.
threewaycalling:(三方通話)如果設置開啓,可以在按保持鍵切換話路,讓原通話處於保持狀態,這時會收到重撥提示音,並開啓另外一方通話。缺省值:no
   threewaycalling=yes

transfer: This option has effect only when threewaycalling=yes. If threewaycalling=yes and transfer=yes, then once you've placed a call on hold with a hook flash, you can transfer that call to another extension by dialing the extension and hanging up. Default: no.

transfer:(呼叫轉接)這個選項僅當三方通話=yes時有效,當設置了三方通話和呼叫轉接,一旦通過或呼叫保持按鍵把當前話路置於保持狀態,就可以撥號呼叫另外分機,把2個話路橋接起來,然後掛機。缺省值:no
   transfer=yes

cancallforward: If enabled, you may activate "call forwarding immediate" by dialing *72 (whereupon you get a dialrecall tone) followed by the extension number you wish to forward your calls to. If someone dials your extension, the call will be redirected to the forwarding number. You may disable the call forwarding by dialing *73. Default: no.
cancallforward:如果呼叫前轉啓用,可以通過撥號*72+想要轉向的Extension,立刻激活呼叫前轉(同時會有重撥提示音),這時如果有來話,那麼呼叫會被重定向到設置的轉移號碼上,可以通過撥打*73取消呼叫前轉。缺省值:no
   cancallforward=yes

callreturn: If enabled, you may dial *69 to have Asterisk read to you the caller ID of the last person to call. You will hear the dialrecall tone if there is no record of a last caller. Default: no.
callreturn:如果開啓此設置,可以通過撥打*69讓Asterisk讀出最後呼入的主叫號碼,如果沒有記錄最後呼叫主叫號碼,將聽到重撥提示音,缺省值:no
   callreturn=yes

callgroup: A channel may belong to zero or more callgroups. Callgroups specify who may answer this phone when it is ringing. If this channel is ringing, then any other channel whose pickupgroups include one of this channel's callgroups may answer the call by dialing *8#. This feature is supported by Zap, SIP, Skinny and MGCP channels. Group numbers can range from 0 to 31. The default value is an empty string, i.e. no groups. 
callgroup:通道可以不屬於或者屬於多個呼叫羣組。呼叫羣組定義了當電話振鈴時,誰可以接聽。當一個通道振鈴時,其它那些pickupgroups中包含該通道callgroups其中之一的通道可以通過按*8#來接聽電話。這個特性支持在ZAP,SIP。skinny和MGCP通道類型上使用,羣組數字範圍爲0-31,,缺省值是空字符串,即沒有組。
  group=1
  callgroup=1,2,3

pickupgroup: A channel may belong to zero or more pickupgroups. Pickupgroups specify whose phones you may answer. If another channel is ringing, and this channel's pickupgroups include one of the ringing channel's callgroups, then this channel may answer the call by dialing *8#. Group numbers can range from 0 to 31. The default value is an empty string, i.e. no groups.
pickupgroup:通道可以不屬於或者屬於多個摘機羣組,摘機羣組定義了可以應答那些電話。如果其他通道振鈴,而本通道pickupgroup是振鈴通道callgroups羣組其中之一,那麼本通道可以通過按*8#來接聽振鈴通道。羣組範圍爲0-31,缺省值爲空字符串,即沒有羣組。
  group=1

See more about Channels and Groups

If you dial *8# when there is more than one channel whose calls you are eligible to answer, then it just answers the "first ringing channel", i.e. you have no control which one you pick up. 
如果同時不止一路通道振鈴符合條件可以通過按鍵*8#接聽,只能接聽第一條振鈴通道,即不能控制選擇接聽哪一條。
  pickupgroup=3,4

useincomingcalleridonzaptransfer: If you set this option (Use Incoming Caller ID On Zap Transfer) to 'yes', then when you transfer a call to another phone, the original caller's Caller ID will get forwarded on too. Default: no.
useincomingcalleridonzaptransfer:如果設置了這個選項(在ZAP通道上啓用來電轉接),可以轉接來電到另外一個電話,外部呼叫的主叫號碼同時跟隨。
   useincomingcalleridonzaptransfer=yes

Caller ID Options

callerid: Sets the Caller ID string to forward to the recipient when calls come in from this channel. You normally use this to set the Caller ID for handsets. Specify the Caller ID name in double quotation marks, followed by the Caller ID number in <> symbols. For trunk lines, set to "asreceived" to pass the received Caller ID forward.
callerid:當來電時設置主叫ID字符串,傳送給接收者,通常爲手持設備設置callerID。定義callerid:雙引號名字後緊跟角括號數字,對中繼線路,設置asreceived來傳送主叫ID。
  callerid="Mark Spencer" <256 428-6000>
  callerid=
  callerid=asreceived

Important Note: Caller ID can only be transmitted to the public phone network with supported hardware, such as a PRI. It is not possible to set external caller ID on analog lines.
重要事項:CallerID只能在硬件支持的公共電話交換網上被傳輸,例如PRI。在模擬線路上設置外部CallerID是不可能的。
usecallerid: For handsets, this option will cause Asterisk to send Caller ID data to the handset when ringing it. For trunk lines, this option causes Asterisk to look for Caller ID on incoming calls. Default: yes.
usecallerid:對於手持設備,這個選項可以在振鈴時讓Asterisk發送CallerID數據到到手持設備,對於中繼線路,該選項致使Asterisk查找來電主叫ID,缺省值:yes
   usecallerid=no

hidecallerid: (Not for FXO trunk lines) For PRI channels, this will stop the sending of Caller ID on outgoing calls. For FXS handsets, this will stop Asterisk from sending this channel's Caller ID information to the called party when you make a call using this handset. FXS handset users may enable or disable sending of their Caller ID for the current call only by lifting the handset and dialing *82 (enable) or *67 (disable); you will then get a "dialrecall" tone whereupon you can dial the number of the extension you wish to contact. Default: no.
hidecallerid:主叫ID隱藏(不能應用於FXO中繼線路),對於PRI通道,在外呼時停止傳送主叫ID。對於FXS端外呼時,會停止發送主叫ID信息到被叫方。FXS端可以在話機上按*82(啓用)*67(關閉)可以控制是否傳送主叫ID傳送。
   hidecallerid=yes

restrictcid: (PRI channels only) This option has effect only when hidecallerid=no. If hidecallerid=no and restrictcid=yes, Asterisk will prevent the sending of the Caller ID data as a presentation number when making outgoing calls (ANI data is still sent). Default: no.
restrictcid:(僅用於PRI通道),該選項在hidecallerid=no時可以有效設置,如果hidecallerd=no並且restrictcid=yes,外呼時,asterisk會阻止以顯示號碼方式發送主叫id,但ANI消息數據仍然發送),缺省爲no
   restrictcid=yes

usecallingpres: (PRI channels only) Whether or not to use the Caller ID presentation for the outgoing call that the calling switch is sending. See also the CallingPres command. Read more in this discussion from 2003.
usecallingpres:(僅PRI通道有效)不管是否把callerid作爲外呼的顯示號碼,交換機都會傳送。
   usecallingpres=no

Audio Quality Tuning Options (音頻質量調整選項)

These options adjust certain parameters of Asterisk that affect the audio quality of Zapata channels. See also:

relaxdtmf: If you are having trouble with DTMF detection, you can relax the DTMF detection parameters. Relaxing them may make the DTMF detector more likely to have "talkoff" where DTMF is detected when it shouldn't be. Default: no.
relaxdtmf:如果DTMF檢測有問題,可以放寬DTMF檢測的參數。
   relaxdtmf=yes

echocancel: Disable or enable echo cancellation (default is 'yes'). It is recommended that you do not turn this off. You may specify echocancel as 'yes' (128 taps), 'no' (0 taps, disabled), or a preset number of taps which are one of 16, 32, 64, 128, or 256. Each tap is one sample from the data stream, so on a T1 this will be 1/8000 of a second. Accordingly the number of taps equate to a 2ms, 4ms, 8ms, 16ms or 32ms tail length. Beware that if you set echocancel to a different value, Asterisk will fall back to the default of 128 taps without warning.
echocancel:開啓或關閉迴音消除(缺省值:是),建議不要關閉該設置,可以定義迴音消除yes(128濾波參數)或者no(0濾波),或者定義參數爲16,32,64,128,256中一個,每種濾波參數都是一種數據流樣本,在T1線路上會是每秒1/8000,因此濾波參數值等於2ms,4ms,8ms,16ms,32ms尾長,如果設置的迴音消除爲不同的值,Asterisk將直接使用128而不會警告。
   echocancel=no

echocancelwhenbridged: Enables or disables echo cancellation during a bridged TDM call. In principle, TDM bridged calls should not require echo cancellation, but often times audio performance is improved with this option enabled. Default: no.
echocancelwhenbridged:開啓或關閉在橋接的TDM呼叫中的迴音消除,原則:TDM橋接呼叫不需要回音消除,但開啓這個選項通常可以提高語音效果。
   echocancelwhenbridged=yes

echotraining: In some cases, the echo canceller doesn't train quickly enough and there is echo at the beginning of the call which then quickly fades out. Enabling echo training will cause Asterisk to briefly mute the channel, send an impulse, and use the impulse response to pre-train the echo canceller so it can start out with a much closer idea of the actual echo. However, the characteristics of some trunks may change as the endpoints become connected and, if there is a considerable delay between the circuit being 'up' and the endpoints being finalised, the training impulse may measure the characteristics of the open trunk rather than the completed circuit. Accordingly you may either specify a value between 10ms and 4000ms to delay before starting the impulse response process or 'yes', which equates to 400ms. Default: undefined.
echotraining:有時迴音消除不能夠很快的自學習,通話開始時會有迴音,然後很快消除。開啓迴音訓練可以讓Asterisk使通道暫時無聲而發送一個刺激信號,並根據響應效果預訓練迴音消除,從而能夠更接近真實的迴音。然而如果在電路up和終端響應定位之間有相當的延時,某些典型中繼被會作爲終端進行連接,訓練刺激信號會檢測open中繼的特性而不是實際電路。因此,在開始響應刺激信號處理之前,可以在10ms和4000ms延時之間定義一個值,或者定義yes,缺省就是400ms。默認值沒有定義。
   echotraining=no

rxgain: Adjusts receive gain. This is the audio recieved by Asterisk from the device. E.g: in a phone connected to a FXS channel, this would control the audio that is sent from the phone to Asterisk. This can be used to raise or lower the incoming volume to compensate for hardware differences. You specify gain as a decimal number from -100 to 100 representing dB. 10 is significantly high. Change these options by only a few dB at a time. Default value: 0.0
rxgain:調整接收穫取強度值,這是指Asterisk從例如連接到FXS通道上的電話設備上接收到的音頻,該選項能控制由電話發送給Asterisk的音頻,可以用於提高或降低進入的聲音音量,從而補償硬件損耗。可以定義獲得值從-100db到100db,10db就意味着很高了。修改時應進行微調。
   rxgain=4.2

txgain: Adjusts transmit gain. This is the audio transmitted by Asterisk to the device. E.g: in a phone connected to a FXS device this would control the audio that is heard in the handset. This can be used to raise or lower the outgoing volume to compensate for hardware differences. Takes the same type of argument as rxgain. Default: 0.0
txgain:調整傳出強度值,這是指由Asterisk發送給連接到FXS上的電話等設備的音頻,Asterisk可以控制音頻音量傳送給手持設備端收聽。這用於提高或降低外呼音量從而降低設備損耗。使用方法參數雷同fxgain,缺省值爲0.0
   txgain=-10.2

See: Asterisk zapata gain adjustment

Call Logging Options

Asterisk normally generates Call Detail Records (CDR), being a log or database of the calls made through Asterisk. This data can be used for Automated Machine Accounting (AMA). See Asterisk Billing.
Asterisk通常會產生詳單記錄,記錄是由Asterisk呼叫產生的,以日誌或數據庫存儲。通話詳單記錄可以用作自動記賬AMA。

accountcode: Sets the data for the "account code" field in the CDR for calls placed from this channel. The account code may be any alphanumeric string. It may be overridden at call time with the Asterisk cmd SetAccount|SetAccount command.
accountcode:設置通話詳單中account code字段的數據,用於通道呼叫處理。計費代碼可以是數字和文字字符串,可能在呼叫時被Asterisk命令setaccount重置。
  accountcode=spencer145

amaflags: Sets the AMA flags, affecting the categorization of entries in the call detail records. Possible values are:
amaflags:設置AMA自動記賬標記,影響通話詳單中的分類條目。
  • default: Let the CDR system use its default value.  (CDR採用缺省值)
  • omit: Do not record calls.  (不記錄)
  • billing: Mark the entry for billing (產生記賬條目)
  • documentation: Mark the entry for documentation. (標記條目文檔)
  amaflags=billing

Timing Parameters (定時參數)


These keywords are used only with (non-PRI) T1 lines. All values are in milliseconds. These do not need to be set in most configurations, as the defaults work with most hardware. It has been noted that the common Adtran Atlas uses long winks of about 300 milliseconds, and channels from them should be configured accordingly.
這個關鍵字僅用於T1線路,不包含pri。
prewink: Sets the pre-wink timing.
preflash: Sets the pre-flash timing.
wink: Sets the wink timing.
rxwink: Sets the receive wink timing.
rxflash: Sets the receive flash timing.
flash: Sets the flash timing.
start: Sets the start timing.
debounce: Sets the debounce timing. "The debounce settings in the Asterisk configuration affects how Asterisk
handles hookswitch transitions on its FXO/FXS interfaces." — Derek Bruce

  rxwink=300
  prewink=20~~

Other Features

mailbox: If this option is defined for a channel, then when the handset is lifted, Asterisk will check the voicemail mailbox(es) specified here for new (unheard) messages. If there are any unheard messages in any of the mailboxes, Asterisk will use a stutter dialtone rather than the ordinary dialtone. On supported hardware, the message waiting light will also be activated — this probably requires that you also set adsi=yes. Update: This option does NOT require ADSI. It will send a standard FSK tone down the line that lights up the MWI on any capable analog phone.
mailbox:這個選項爲通道定義的。當摘機時,Asterisk會檢測語音郵箱中未讀的郵件。如果有未讀郵件,Asterisk會有摘機警告音而不是通常的撥號音。在支持的硬件上,等待消息同樣激活,這需要設置adsi=yes。這個選項不需要ADSI支持,它會發送一個 標準的頻移鍵控提示音(也稱爲移頻調製和移頻信號)來掛掉支持WMI(消息等待支持)的模擬線路。

The parameters to this option are one or more comma-separated mailbox numbers, as defined in voicemail.conf.

   mailbox = 1234
   mailbox = 1,2

For each mailbox, if the mailbox is in a context other than "default", place the context after the mailbox number
separated by an at sign (@).
如果語音郵件不是在default而是在context,按照mailbox@context的格式

   mailbox = 1234@office
   mailbox = 12@office,34@home

group: Allows you to group together a number of channels so that the Dial command will treat the group as a single channel. When Dial tries to make a call on a Zap group, the Zap channel module will use the first available (i.e. non-busy) channel in the group for the call. Multiple group memberships may be specified with commas, and to signify no group membership, the portion after the equals sign may be omitted. Group numbers can range from 0 to 31. The default value is an empty string, i.e. no groups.
group:允許把多個通道組成一組,Dial命令撥號的時候把羣組視爲一個單一通道。當Dial試圖在ZAP組上撥號時,Zap通道模塊使用組中第一個可用通道。多羣組關係可以通過逗號來定義,等號後面省略表示沒有羣組。羣組範圍從0-31,缺省值時空字符串,即沒有羣組。

   group=1
   group=2,3
   group=

See more about Channels and Groups

language
: Each channel has a default language code that affects which language version of prerecorded sounds Asterisk uses for this channel. See Setting up a Multi-Language Asterisk Installation. The default is an empty string.
language:每個通道有一個缺省的語言編碼,這是由預先錄製聲音的語言版本來定義的
   language=en

progzone: This defines the timing and frequencies for call progress detection, which are buried in the sources in asterisk/dsp.c. This is DIFFERENT than the call progress timing defined in zaptel/zonedata.c and in /etc/asterisk/indications.conf, and so far only options you can use (defined in dsp.c) are us, ca, br, cr and uk. (This was added sometime between 1.0.9 stable and 1.2 beta). Default is: us
progzone:該選項爲呼叫處理檢測(在asterisk/dsp.c源代碼中)定義了時間和頻率,這與在zaptel/zonedata.c和/etc/asterisk/indications.conf中的定時呼叫處理不同。到目前爲止該參數只能是:us,ca,br,uk,缺省是us

Important Stuff

context: This specifies which context a call will start in. The context controls how Asterisk will handle the call. Contexts are defined in the Dialplan. Default: "default".
context:定義了呼叫開始的context,context控制Asterisk如何處理呼叫。Context在dialplan中定義,缺省爲"default"
   context=internal

channel: This keyword is unlike all the other keywords in this configuration file, because where all the other keywords merely specify settings to use, this keyword causes Asterisk to actually allocate a channel with the settings that have been specified earlier in the file.
channel:這個關鍵字與配置文件中的其他關鍵字不同。原因是其他關鍵字僅僅定義設置來使用,這個關鍵字可以使Asterisk把前面定義的設置分配到通道中。

The channel keyword defines one or more channels. Each channel definition will inherit all options stated ahead of it in this file. Channels maybe specified individually, separated by commas, or as a range separated by a hyphen. Allocating a channel will not "clear" the settings, so any channels defined later on in this file will inherit the options for this channel unless you override settings.
通道關鍵字定義一個或多個通道,每行通道定義都會繼承前面所有的選項配置狀態。通道可以通過逗號分離單獨定義,或者用連接符連接一組,分配通道不會清空設置,所以任何在後面定義的通道都會繼承前面的選項除非覆蓋設置。

   channel => 16
   channel => 2,3
   channel => 1-8

Obsolete Settings

stripmsd: (Obsolete) Strip the 'Most Significant Digit,' the first digit or digits from all calls outbound on the given trunk channels. Takes as an argument the number of digits to strip. Use ${EXTEN:x} for this functionality.
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章