您的位置:首页 > 其它

常用参数配置

2012-06-07 09:49 239 查看
extensions.conf

拨号方案配置文件,下面是一个简单的拨号方案,通过此处对拨号方案有一个简单的了解。

[from-sql]-----------对应sip配置文件中的context,由此关联执行相应的拨号方案。

exten => 111,1,Answer() -----拨打111的第一步操作,进行应答摘机。

exten => 111,n,AGI(start.php)----拨号方案执行strat.php脚本

exten => 111,n,hangup------------------下一步操作,挂机。

注: n代表下一步操作,执行用php写的AGI脚本,也可以使用其他语言编写的AGI脚本,如C、Ruby、perl、java、python。AGI脚本默认存放于/var/lib/asterisk/agi-bin/下,如果不放在此处需要在括号内写入绝对路径。

zapata.conf配置文件说明

文件说明

Zap channel模块允许Asterisk与zaptel驱动程序之间通讯。通过配置zapata.conf文件实现。zapata.conf文件,没有看上去那么复杂,仅仅是定义通道参数,channel关键词才是真正的创建通道。非常重要的是,如果例如在通道前定义echocancel=no,会使影响所有通道,直到定义echocancel=yes,他会往下执行,因此,定义必须在channel=>前面进行定义。信令类型是唯一强制设置,在分配一个通道之前,必须定义信令类型。如果连接的模拟电话设备,注意模拟信令是导致混乱的来源。FXS通道采用FXO信令,反之,Asterisk通知内部设备采用相反方式。FXO接口卡采用FXS信令,同样须定义。设置通道信令类型,这些参数须与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)

配置通道.

上面为省略部分。

context=testflow----------------------------------------首先进入的拨号方案

group=1

channel => 1-15,17-31

channel => 32-46,48-62

channel => 63-77,79-93

channel => 94-108,110-124

manager.conf

manager.conf用于配置管理接口,这个管理接口是用于远程浏览/更改控制台(及其他)行为。通过使用管理接口,与CLI接口非常相似,你能发送行动,并收到响应。

manager.conf使用语法

交互方式如下:

telnet host 5038

注意:你必须要在manager.conf指定一个用户,并设置enabled = yes。

# vi /etc/asterisk/manager.conf

[general]

enabled = yes

port = 5038

bindaddr = 0.0.0.0

[theuser]

secret = somepassword

read = system,call,log,verbose,command,agent

write = system,call,log,verbose,command,agent

modules.conf

配置asterisk的未加载的模块,asterisk默认全部加载,可以在此处noload不需要的模块。若某个模块加载不上,也可以在此处load,让系统强制加载。

SIP.CONF

Sip.conf 用于配置SIP通道。

[1005]------------------------------------------------------
拨号方案实例

username=1005-----------------------------------------
用户名

type=friend-----------------------------------------------
类型,友好

secret=123456-------------------------------------------
密码123456,sip呼入时验证用

qualify=no------------------------------------------------
资格

port=5060------------------------------------------------
端口5060,sip呼入使用的默认端口

nat=yes---------------------------------------------------
网络地址转换,内网穿透

host=dynamic-------------------------------------------
主机名动态获取

context=from-sql---------------------------------------
上下文,对应拨号方案中的标签from-sql

canreinvite=no-------------------------------------------
不允许重复邀请

allow = ulaw ---------------------------------------------
允许使用gsm、ulaw、G729、G711、pcm、vox、wav等音频格式,不配置此项默认gsm格式。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: