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 FXOsignalling, 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 (