asterisk目录及配置说明

合集下载

《Asterisk 使用资料》

《Asterisk 使用资料》

Asterisk目录及配置文件/etc/asterisk/Asterisk主目录,包含其它关于Asterisk的配置文件;*zaptel.conf这个配置文件放在/etc,因为其它软件也可以使用Zaptel这个硬件及其驱动,所以不是放在/etc/asterisk里./usr/lib/asterisk/modules/这个目录包含所有可以加载Asterisk模块(应用程序\编辑器\格式和有用通道),在Asterisk启运时会加载这些模块(可以编辑modules.conf)./var/lib/asterisk/比较重要的是astdb文件与agi-bin目录;astdb包含Asterisk当地数据库信息.sounds/所有声音提示的文件在里面,包括Asterisk原代码中的sounds.txt文件mohmp3/如果配置了音乐保持,应用程序会在这个目录下查找mp3(用CBR从文件中去除身份标签).keys/使用公钥和私钥系统认证与一个由RSA数字签名形成的一对等连接.公钥和私钥的扩展名分别为.pub和.keyfirmware/这个目录含了很多Asterisk相兼容的设备固件,它只有iax/这个子目录,其中有Digium的IAXy的二进制固件镜像.images/只有在较多的支持并且利用图解式的图像设备被发布,这个目录将会与相应的目录有更大的关联./var/lib/asterisk/agi-bin agi-bin包含所有脚本,可以通过许多已经建立的AGI应用程序与Asterisk连接./var/spool/asteriskoutgoing/gcall/tmp/voicemail/================配置文件================/etc/asterisk/asterisk.conf主要配置文件,/etc/zaptel.conf硬件接口的基本层.修改这个配置文件要用modprobe装载Linux Kernel使用模块./etc/asterisk/zapata.conf为硬件配置Asterisk的接口./etc/asterisk/extensions.conf拨号方案./etc/asterisk/sip.conf SIP协议配置文件/etc/asterisk/iax.conf呼入和呼出IAX通道/etc/asterisk/extensions.conf拨号方案配置文件/etc/asterisk/moduprobe.conf加载模块配置文件Asterisk developer\'s documentation 翻译计划by serva今天,Asterisk已经成为一个VOIP业界使用最广泛的一个集成电信级别P BX的工具,IPPBX如今已经成为VOIP商家争夺的一块重要市场,在我们越来越熟悉使用Asterisk的同时,我们希望能够越来越深入的了解asterisk,特别是对于开发人员,如果有自己特定的需求,在复杂的asterisk文件夹和asteri sk的源代码文件中迷失了方向,不知所措。

标准ERP配置Asterisk服务器使用指南说明书

标准ERP配置Asterisk服务器使用指南说明书

CONFIGURING AN ASTERISK SERVERFrom Standard ERP's T elephony module, it is possible to fully configure an Asterisk server, whether it is installed locally on the same server as Standard ERP (only applicable on a Linux-based server) or on a separate remote server.It is also possible to integrate Standard ERP with an existing Asterisk server without managing its configuration directly from Standard ERP. Below are the steps required for a full integration, and will not explain what steps are required for local, remote, and existing servers.PBX ConnectionThe basic setting for integrating your Standard ERP system with an Asterisk server is a PBX Connection. A PBX Connection represents a connection to a unique actual VoIP Server.T o start with, you should create a new PBX Connection from the T elephony module in the PBX Connection register.A PBX Connection is defined primarily by:Code: The PBX unique identifier.Comment: A descriptive text.Type: The type of VoIP server to connect to; this can be chosen from a variety of Asterisk versions, TrixBox, Digium Switchvox, VPBX and 3CX Phone System 12 etc.Hostname: The hostname for the server being used.Host IP address: The IP address for the server being used.Port: The port through which the Asterisk's Management Interface (AMI) can be reached (5038 by default for Asterisk)Username: Username to connect to the AMI.Password:Password to connect to the AMI.Closed: A PBX Connection can be closed when it is no longer in use or valid.In the case of a locally or remotely installed Asterisk server, the T ype should be Asterisk 1.8 (AMI). The username and password can be freely set as they will be configured in the server for you.In case you are connecting to an existing server, the port, username, and password should match the content of your server's manager.conf file. Here is an example of manager configuration usable with Standard ERP:[general]enabled=yesport=5038bindaddr=0.0.0.0allowmultiplelogin=yesdisplayconnects=yestimestampevents=yes[myadmin]secret=passwordxyzdeny=0.0.0.0/0.0.0.0permit=1.2.3.4read=system,call,originatewrite=system,call,originateIn this case Port would be 5038, username myadmin and password passwordxyz. You should replace 1.2.3.4 by the IP address of your Standard ERP server.A PBX Connection has other fields organised in four tabs, and which are used when managing a local or remote server entirely from Standard ERP. Administrators using an existing server fully managed by some external means should skip over to the Contact records section.Dialling SettingsUnder this tab, you can configure the various telephony prefixes in use in your system.International Dial Prefix: T o dial out of your country.Country Code: T o dial in your country.Default Area Code: T o dial in your local area.External Line Prefix: T o dial out of your organisation.Skip Digit for International Calls:As its name indicates, you may also define digits to skip when dialling internationally.These parameters are used to place and receive calls, and to identify contacts based on their caller ID, including when using IAX (see below).RulesThis T ab allows to define a number of rules from various types:Ignore SIP Channel:In case of an existing server, this will ignore possible intermediary SIP channels to handle calls and instead only care about the end points. The Identifier is the name of the intermediary SIP channel to ignore.No Act For Calls Between Extensions Shorter Than: Disables the automatic Activity creation for internal calls (detected by the short length of internal extensions). This is only applicable for PBX Connections of the T ype Digium SwitchVox. The Identifier is the maximum length.Track number: Not used.Unique callers only: With this option, only one call will be displayed in Communicator even if there is more than one call from or to the number configured in Identifier.Remote AdministrationFrom this tab, you can define the following:Remote User: Linux user that will be used to copy the Asterisk configuration files to a remote serverRemote Configuration Directory: The path where to copy said configuration files. As such, it is important that the directory is writable by the Linux user and that your Standard ERP server has been set up to be able to connect directly to the remote Asterisk server without needing to enter a password (namely set up a Public Key Authentication between both servers).AsteriskFrom this final tab, you can enable the connection of your Asterisk server to other Asterisk server using IAX (Inter-Asterisk eXchange).Enable Inter-Asterisk eXchange(IAX):By ticking this option, you will allow all other PBX Connections configured in Standard ERP and set to use IAX to connect to this particular server as well as allow this server to connect to all other servers enabled for IAX and configured in Standard ERP.IAX Password: The password used by this server to connect to other IAX servers.Sending configuration to the serverThis section only applies to the local and remote servers situations.After completing the above configuration of a PBX Connection, you can already send the configuration to an Asterisk server.If you are running a local server, you can dump the configuration files by using the Local Asterisk Server settings from the T elephony module.First, you will need to install the Asterisk server by selecting Setup Asterisk Server in the Operation Menu. This will give you a warning pop-up reading “Starting download and installation of Asterisk server”. Click OK. This will download the binaries for the Asterisk Server from the HansaWorld servers and install them on your local server. The server will then be started. You should never have to use Setup Asterisk Server again after this.If you close the Local Asterisk Inspect window and reopen it, you will see the path where your server is installed.From the Operation Menu, you can also select “Update Asterisk Server Configuration” (which will dump the current configuration on the Asterisk server configuration directory and restart the Asterisk server so that the configuration is applied), Start Asterisk Server, and Stop Asterisk Server (which should both only rarely be used, for instance for external maintenance purposes).If you are running a remote server which is fully configured using Standard ERP, you should instead head to the Asterisk SIP Configuration Files maintenance in the Routines of the T elephony module.Use Paste Special in the PBX Connection to select the server you want to update, and tick Send Files to Server before running. If you do not tick this option, then the files will only be generated locally on your Standard ERP server.Note that this will only work if you have properly setup your PBX Connection and the Linux environment of your Asterisk server (see above).You can also select from the following other Maintenance Routines:!Asterisk SIP trunks.!Asterisk Users.These routines will generate respectively only the configuration files for the SIP trunks of a PBX Connection, or for its users, instead of regenerating all the files.Note that the files are only sent to the server but not applied. An administrator needs to connect manually to the Asterisk server and reload them. For instance by issuing a 'core reload' command from Asterisk's command line interface.Asterisk usersThe next step in setting up your Asterisk server is to create a number of users.This section is applicable for local and remote servers.From the T elephony module, you can create new Asterisk Users for your employees or partners.For each user, you can define:PBX Connections: One or more servers on which the user will be created and allowed to connect to. Leave blank to create the user on all PBX Connections configured.Name: A descriptive name.Username: Will be used to configure their SIP client.Password:Will be used to configure their SIP client.Group: No longer used.Caller ID number: The display number that might be shown to the party this user is calling. Note that this can easily be overridden by the configuration of a SIP client or SIP trunk. Especially when dialling out to international telephone numbers, Caller ID numbers are likely to get lost.Caller ID name: The display name that might be shown to the party this user is calling. Note that this can easilybe overridden by the configuration of a SIP client or SIP trunk.Especially when dialling out to a mobile or landline telephone number, plain text display names will be lost.Closed: A closed user will simply not be configured on the server and as such, it will not be possible to connect to the server using that user.No Queue Fallback: If an Asterisk User is marked as not being part of Queue Fallback, then that user will not be called when a queue is not staffed but is receiving a phone call.Note that after creating one (or more) Asterisk users, it is necessary to send the configuration to the server, as described above.Contact recordsThis section is applicable for all types of servers: local, remote, and existing.As of now, Asterisk users and Standard ERP users (Persons), and their contact cards are not connected and as such, Contact cards for your users will need to be filled in manually with their SIP contact details.In the SIP field of the contact record pertaining to your Asterisk user should be filled in as username@host name. Where username comes from the Asterisk User record, and hostname from the PBX Connection record.SIP TrunksThis section is applicable for local and remote servers.At this point of the configuration, you can place calls between users of your Asterisk server. T o reach out to the outside world, you will need a SIP trunk or VoIP trunk. Each country usually has several providers that can help you get started. As Asterisk is a commonly used VoIP server platform, it is easy to get help from your provider in general.A simple Internet search should allow you to find a number of SIP providers for your country.Using the information provided by your subscriber, you will be able to fill in the SIP Trunk record necessary for you to place calls to the rest of the world. A SIP provider will usually be able to sell you the usage of one, or more phone numbers that your contacts will be able to call to reach you. In some cases, your SIP provider might also allow you to place outgoing calls. Make sure to carefully select the SIP provider that is able to provide you with the capabilities you need to run your business smoothly.Setting up a SIP trunk comes with a wide array of technical possibilities, a number of which are supported inStandard ERP. We will detail some of those here but it is not possible to list all the possible technical configurations one can encounter.Code: Select a unique code for your SIP trunk.PBX Connection: Paste Special the PBX connection on which you want this SIP trunk to be terminated.Host: Fill in the host name or IP address provided by your SIP provider here. It might be that host and domain have the same value.Domain: Fill in the domain name provided by your SIP provider here. It might be that host and domain have the same value.Username: Fill in the username provided by your SIP provider here.Password: Fill in the information provided by your SIP provider here.Skip Digit for International Calls: This parameters operates similarly to that set in the PBX Connection but will apply to calls using the SIP trunk.Country Code:This parameters operates similarly to that set in PBX Connection but will apply to calls using the SIP trunk.Caller ID: The caller ID of your SIP trunk provider (optional).Allow anonymous calls: Lets the system accept anonymous calls coming from your providers.Allowed IPs: Only incoming calls coming from these IP addresses will be allowed. Please check with your SIP provider to only open the minimum number of addresses. (optional but important security point).Inbound phone numbers: A SIP provider may very well provide you several telephone numbers using the same SIP trunks. In certain cases, you will be given unique identifiers for each one of them. They should be filled in here. It might be that the usernames and passwords are the same as above.Trunk type:Set to Outbound calls only if you intend to input a separate configuration for Inbound Phone Numbers in the matrix as described just above. Set to In- and outbound calls if you do not have a separate configuration for Inbound Phone Numbers.IAX: Select this if your SIP trunk provider is providing you services using an Asterisk IAX trunk.Queues and MenusThis section is applicable for local and remote servers.Most of us are familiar with the telephony lines operated by large companies. A welcome Menu plays when you call into the support line of a company, after pushing a few digits on your phone and listening to a few more voice Menu messages, you are placed in a Queue. Thanks to Standard ERP's integration with Asterisk, your company can easily benefit from such technology.In Standard ERP's terminology, a Menu is used to select between different queues or menus; and a Queue is used to put in relation agents answering calls and external callers. Queues and Menus share a number of settings (Phone Numbers, Opening Times) and capabilities (Playing a sound upon arrival, when closed, etc.).Instructions for users to use queues can be found earlier in the document.A Queue contains the following information:Code: A unique identifier in Standard ERPQueue ID: A unique identifier in Asterisk which will be used by your employees to connect to the queue and start answering calls.SIP Trunk: The SIP trunk from where the calls will be arriving.Description: A free-text comment.Phone Number: (Optional) in the case where you want a direct number for callers to reach the queue without going through a Menu. Note: you can play a greetings message even in the case where callers go straight toa queue. You do not need a Menu to play a welcome message.Fallback number: An optional number to call in the case i) no agent is available in the queue AND ii) no one is logged in to the Asterisk server or everyone who is logged in is marked with “No Queue Fallback”.Open from/until: it is possible to define two sets of opening hours (to include the possibility of a lunch break for instance). In case only one set of opening hours is needed, use the first pair of “Open from”/”Open until”fields and leave the second pair blank.A Menu contains the following information:Code: A unique identifier.SIP Trunk: T he SIP trunk from where the calls will be arriving.Description: A free-text comment.Phone Number: The phone number for your contacts to dial in order to access the Menu. Optional in case the Menu is accessed via another Menu.Open from/until:It is possible to define two sets of opening hours (to include the possibility of a lunch break for instance). In case only one set of opening hours is needed, use the first pair of “Open from”/”Open until”fields and leave the second pair blank.Repeat every (s): The number of seconds between repeats of the message explaining to the caller his or her possible choices.A matrix finally allows you to configure the different Menus and Queues reachable from this Menu:Number: The digit to press for the user to enter the selected Queue or Menu. Note that in the case pressing the digit leads to entering a Queue, the digit need not be the same as the Queue ID defined in the Queue.Queue: Paste Special to an existing Queue (note, if you select this, you should not select a Menu as well).Menu: Paste Special to an existing Menu (note, if you select this, you should not select a Queue as well).Comment: A free-text comment as a reminder of what the selected Queue or Menu might be.Using Menus, you can cascade multiple levels of Menus. However, once a caller has joined a Queue, he or she will not be able to go back to another Queue or Menu.The last remaining part of the configuration is now to assign sound files to be played to guide your callers through your Menus and Queues.Whereas all the previous configuration was done in Registers of the T elephony module, sounds will be configured from the Settings of the T elephony module. More precisely, from the PBX Sounds setting.First, create a new PBX Sound. Then in Event, use Paste Special to select the type of Event that will trigger the sound file to play. The Event you select will affect whether you are selecting a Queue or a Menu in the following field. Available Events are:Initial Queue Message: Played as an initial greeting when a caller reaches a Queue.Line Busy: Played after 30 seconds of a caller waiting in a Queue.Menu Closed: Played whenever a caller arrives to a Menu outside of the defined opening hoursMenu Message: Played as an initial greeting when a caller enters a Menu (should also describes the options available from the Menu and the digits associated with each function).Music on Hold:Music to play while the caller is waiting in a Queue.Queue Closed: Played whenever a caller arrives to a Queue outside of the defined opening hours.Once an Event is selected, use Paste Special to select the Queue/Menu where the sound file should be used. Only one Queue or Menu can be selected. After Saving the Record, you can now attach a file to the Record following the usual way of dragging and dropping the file over the paperclip icon or into the Document Manager window which you can open by double-clicking the paperclip icon.Note: the attached sound file must be a mono.wav file, sampled at 8kHz.Remember to send the configuration to the server once done. The sound files will be copied during that stage a s well.。

AsteriskWin32

AsteriskWin32

4.單擊Next, 4.單擊Next,
5.選擇安裝目錄,並單擊Next 5.選擇安裝目錄,並單擊Next
6.選擇Full installation和PBX New Installation 6.選擇Full installation和
7.You can create an desktop icon in this step
database put mgcpphone 333 aaln/1@192.168.1.254
5.SIP 測試 5.1 SIP 測試中moderm鍴的設置與之前的 設置 測試中moderm鍴的設置與之前的 步驟是一樣的 5.2 我們在callagent鍴,可以通過脩改sip.conf來 我們在callagent callagent鍴,可以通過脩改sip.conf sip.conf來 增加或者刪除電話號碼 5.3 打開sip.conf ,我們會看到幾組電話號碼, 打開sip.conf 格式如下圖:
AsteriskWin32使用指南 AsteriskWin32使用指南
安裝AsteriskWin32 安裝AsteriskWin32
1.雙擊AsteriskWin32-0.601.雙擊AsteriskWin32-0.60-Setup.exe
2.單擊Next,開始安裝 2.單擊Next,開始安裝
ห้องสมุดไป่ตู้
3.選擇 I accept the agreement,單擊Next
4.MGCP測試 4.MGCP測試 4.1 配置moderm 配置moderm voice mgcp config callagentaddr=192.168.1.00 voice mgcp config callagentport=2427 4.2 添加電話號碼到database 添加電話號碼到database 在GUI的CLI提示符后執行: GUI的CLI提示符后執行: database put mgcpphone 111 aaln/1@192.168.1.254 aaln/1@192.168.1.254 database put mgcpphone 222 aaln/2@192.168.1.254 aaln/2@192.168.1.254 4.3 添加mgcp 電話號碼 添加mgcp 脩改mgcp.conf,並添加至database 脩改mgcp.conf,並添加至database

Asterisk系统的安装与配置

Asterisk系统的安装与配置

Asterisk系统的安装与配置一、安装包装备asterisk1.8.7.1.tar.gzdahdi-linux-complete-2.6.1+2.6.1.tar.gzdahdi是Asterisk管理硬件的插件(中间件)二、安装dahdi 安装时需要下载东西,所以需要互联网1.tar zxvf dahdi-linux-complete-2.6.1+2.6.1.tar.gz2.cd dahdi-linux-complete-2.6.1+2.6.13.make all4.make install5.make config ;生成启动脚本/etc/init.d/dahdi6./etc/init.d/dahdi restart ;启动dahdi7.chkconfig dahdi on ;检查编译DAHDI时CONFLICTING TYPES FOR ‘BOOL’解决办法,google上面有,说是linux版本宏引起的。

三、安装asterisk1.tar zxvf asterisk1.8.7.1.tar.gz2.cd asterisk1.8.7.13../configure --build=i3864.;指定安装路径 ./configure --prefix=/usr/local5.make menuselect ;在配置界面选中meete应用6.make ;编译7.make install 安装Asterisk8.make samples ;安装配置文件模版/etc/asterisk下9.make progdocs ;安装Asterisk程序文档10.asterisk 启动四、配置SIP通道默认语言 /etc/asterisk/sip.conf[general]language=cn/enbindaddr=0.0.0.0 服务器IP五、配置基本SIP账户 /etc/asterisk/sip.conf1.CLI命令sip show userssip show peerssip show settingssip set debug on/offsip reload2.分机号码模板[SIPPHONE](!)type=friend 呼入呼出均可host=dynamic 分机号注册时获取contex=geeyavoip ; 分机号呼入时使用的上下文extensions.conf中的上下文nat=no 不支持natqualify=20003.使用号码模板定义分机号[301](SIPPHONE) ;继承SIPPHONE模板username=301accountcode=301directrtpsetup=yes aster工作在proxy,不修改sdp实现rtp透传;secret=301 ;无需密码则注释掉这句;directmidia=yes 媒体穿越nat NAT=yes;canreinvite = yes 与上面一行等效的to disable re-invites if you had NAT=yes六、配置电话会议室 /etc/asterisk/meete.conf[rooms] ;会议室号将作为拨号计划中 meetme参数conf => 1001 ;定义会议室号1001,无密码conf => 1002,918 ;定义会议室密码为918备注:拨号计划中调用meetme函数时,将进入会议桥,如需要密码,系统将提示输入会议室密码。

Asterisk安装和配置

Asterisk安装和配置

1.安裝所需套件yum install gcc gcc-c++ kernel-devel zlib zlib-devel openssl openssl-devel2.下载asterisk、libpri、zaptelcd /usr/local/src/wgetwgetwget3.安装zapteltar -zxvf zaptel-.1.tar.gzcd /usr/local/src/zaptel-.1./configuremakemake installmodprobe zaptel4.安装libpritar -zxvf libpri-.tar.gzcd /usr/local/src/libpri-makemake install5.安装asterisktar -zxvf asterisk-.tar.gzcd /usr/local/src/asterisk-./configuremakemake installmake samplesasterisk -vvvc6.分机配置vim /etc/asterisk/sip.confSIP分机常用参数配置:[101] ;SIP分机注册账号callerid=ABC ;分机显示名称(可不设定)username=101 ;SIP再注册时要使用的账号(可不设定)type=friend ;连线的模式,一般话机设成friendsecret=101 ;分机注册密码qualify=yes ;验证模式,只有在type=peer时生效(可不设定)nat=yes ;是否在NAT下host=dynamic ;搜寻Client的模式,dynamic由话机主动去注册或者输入Hostname、IP由SIP Server去连线dtmfmode=rfc2833 ;按键信号模式,预设为rfc2833context=internal ;设定要用extensions.conf哪一组的动作canreinvite=no ;分机直通或由SIP连接callgroup=0 ;定义群组,可利用于群组广播....等(可不设定)pickupgroup=0 ;定义代接群组(可不设定)[102]username=102type=friendsecret=102qualify=yesnat=yeshost=dynamicdtmfmode=rfc2833context=internalcanreinvite=no7.设定接通动作vim /etc/asterisk/extensions.conf最后面加放设定[internal]exten => _X.,1,Dial(SIP/${EXTEN}|30) exten => _X.,n,Hangup()说明:_:代表开头X:代表0-9.:代表任意长度的字元_X.:电话以数字开始不限制长度Dial:接通SIP:线路模式SIP协议${EXTEN}:收到的号码30:只振玲等待30秒Hangup:挂断8.设定远端管理账号(依需求设定)vim /etc/asterisk/manager.confenabled = yes最后面增加[admin] secret=admin deny=.0/0.0.0.0 permit=127.0.0.1/255.255.255.0 read = system,call,log,verbose,command,agent,user write =system,call,log,verbose,command,agent,user用telnet localhost 5038到asterisk的管理界面出现Asterisk Call Manager/1.0输入action: login <enter>username: admin <enter>secret: admin <enter><e。

Asterisk安装与配置

Asterisk安装与配置
Enable:
YES
Display
Name: 1001
Username:
1001
Authorization
User: 1001
Password:
test
Domain/Realm:
xx.xx.xx.xx ;Asterisk服务器地址
SIP
Proxy: xx.xx.xx.xx ;Astersk服务器地址
Asterisk应该搭配数据库,不然从语音邮箱考虑,存储都是个问题。。。。

=> 1234, qiong,
[email=qiong@asterisk-server]qiong@asterisk-server[/email]
1002
=> 1234, ddd,
[email=ddd@astersik-server]ddd@astersik-server[/email]
kernel-smp-devel--zaptel
gcc-c++--asterisk
openssl-devel--asterisk
newt-devel--zaptel
zlib-devel--asterisk
unixODBC-devel--asterisk
libtool--asterisk
#
make config ;对于REDHAT系列系统,可将asterisk添加到/etc/rc.d/init.d中
#
make samples ;安装配置文件
3、Asterisk简易配置
make--asterisk
注:很多包在安装光盘中都有,不需要再下载。

asterisk配置文件列表及常用指令

asterisk配置文件列表及常用指令

配置文件说明列表:常规指令Authenticate:鉴别用户VMAuthenticate:根据“voicemail.conf”鉴别用户Curl:接受外接URLs的修复。

支持POSTingDUNDiLookup:用DUNDi查寻号码SendDTMF:发送独裁的DTMF数据SendImage:发送图像档案SendText:发送给客户正文消息SendURL:发送给客户USL以显示System:执行系统命令Transfer:将访客转移到另一个扩展名TrySystem:0回复执行系统命令Wait:稍等WaitExten稍等:WaitForRing:等待呼叫申请WaitMusicOnHold:等待,在线音乐BillingForkCDR:将CDR分成两个独立的实体NoCDR:确保 asterisk没有把CRD保存为特定的呼叫ResetCDR:重新安装CDR数据SetAccount:设置帐簿号码SetAMAflags:开通AMA标志开户的渠道SetCDRUserField:建立CDR用户领域AppendCDRUserField:给CDR用户附加数据Call management (hangup, answer, dial, etc)Answer:如果呼叫回复一个信道Busy:显示忙的情形等待挂断ChanIsAvail:如果信道可以利用即核查Congestion:显示拥塞等待挂断Dial:设置一个指令连接当前的信道DISA:直接访问内在系统Hangup: 无条件挂断Ringing显示呼叫Caller presentation (ID, Name etc)CallingPres:更改呼叫者的身份介绍LookupBlacklist: 从黑名单数据库上查询访客的身份姓名和号码LookupCIDName: 从当地的数据库查询访客的身份和姓名PrivacyManager:如果没有CallerID过来,要求输入电话号码SetCallerID: 建立CallerID,发生矛盾服从CallerIDSetCallerPres:建立访客资料的独立信道SetCIDName:建立呼叫者身份姓名,发生矛盾服从CallerID SetCIDNum: 只建立访客的身份号码(没有姓名),发生矛盾服从CallerID SoftHangup: 请求挂断转到另一个信道Zapateller:拥SIT阻止远程商人ADSI• ADSIProg:将 Asterisk ADSI Scripts 加载到电话• GetCPEID: 获得 ADSI CPE IDDatabase handling• DBdel: 从数据库中删除一个键. 发生矛盾服从 DB.• DBdeltree: 从数据库中删除群. 发生矛盾服从 DB.• DBget:从数据库中找回数值. 发生矛盾服从DB.• DBput: 在数据库中储存一个数值. 发生矛盾服从DB.• MYSQL:执行不同的 mySQL 数据库行为查 Asterisk database 找更多的信息.Application integration• AGI: 执行一套AGI 适应程序• DeadAGI: 在中断的信道上执行AGI• EAGI: 执行一套 AGI 适应程序• EnumLookup:在 ENUM 中查找号码• Macro: 执行较大的程序• NoOp: 不进行操作,可将数值打印到控制太进行调试• Perl: res perl 是Apache 的 mod_perl, 只适用于 Asterisk • PHP: res_php 不需要就可将PHP与进行一体化处理• Read: 用DTMF读变量• TXTCIDName: 从 TXT 记录中查找访客的姓名• UserEvent:发送任意结果给界面处理器Control flow & timeouts• AbsoluteTimeout: 建立呼叫最长时间• DigitTimeout: 建立数据间的最长时间间隔• Goto:转到优先码,扩展名和过渡段• GotoIf: 条件展转接• GotoIfTime: 当前的条件转接• Random: 在拨号栏中随机跳动• ResponseTimeout: 设置等候回应的最长时间• While: 开始一个当循环- *1.2beta• EndWhile: 结束一个当循环 - *1.2beta• ExecIf: 条件执行 - *1.2betaString & variable manipulation• Cut: 串处理功能,发生矛盾支持 CUT.• ImportVar: 赋数值变量• Math: 进行简单的计算• Prefix: 预设主要的数据• SetGlobalVar:赋数值变量• Set: 设信道变量和功能值• SetVar: 赋数值变量(如果不允许,使用 Set)• StripLSD: 消除附加的数据• StripMSD: 消除主要的数据• SubString: 在一个预设的变量中保存子链数据• Suffix:添加附加数据Sounds:录音重放• Background: 当执行其它命令的时候播放声音文件• BackgroundDetect: 用谈话探测背景文件• ControlPlayback: 用快进,重绕和离开当前命令控制器播放声音文件• DateTime: 显示日期/和时间• Echo: 重复声音回复到永福端• Festival: 使用欢快的声音合成器朗诵课文• Milliwatt: 在0分贝产生持续的1000赫兹的音调• MP3Player: 播放MP3声音文件• MusicOnHold: 无限度地播放音乐• Playback: 播放一个声音文件• Playtones: 当执行其它命令的时候播放声音列表• SayUnixTime: 显示日期/和时间• SayAlpha: 显示字母• SayDigits: 显示阿拉伯数字• SayNumber: 显示数字• SayPhonetic:显示语音• SetMusicOnHold: 在控制系统上显示默认的音乐• SetLanguage: 为录音重放显示语言转换• StopPlaytones: 停止播放音调列表查看Asterisk sound files 获取更多信息语音: 录音和监测• ALSAMonitor: 监测ALSA控制台• ChangeMonitor: 转换监测的路线文件名• ChanSpy:通用的路线干涉• Dictate: 听写的录音和播放• Monitor: 录音电话会话到声音文件• MuxMon:记录和混合电话支架• Record: 记录电话会话到语音文件• StopMonitor: 停止监测路线SIP 命令• SIPdtmfMode: 在SIP呼叫过程中转换DTMF模式• SIPGetHeader: 从SIP邀请信息中获取标题• SIPAddHeader: 填标题到外部的SIP邀请• suplimental resource SIPCallPickup:在获取组中获取打入的电话• sipredirect: 发送SIP 302信息到呼叫者ZAP 命令• Flash: 编辑到Zap主页• ZapBarge: 干涉Zap路线• ZapRAS: 提供ISDN数据服务• ZapScan: 扫描Zap路线到监督程序调用•查看 Asterisk zap channels, zapata.conf 获取等多信息.语音邮件和会议• Directory: 规定语音邮件扩展目录• HasNewVoicemail: 有条件的分枝到优先权+101• MailboxExists: 检查邮箱是否存在• MeetMe:简单的 MeetMe 会议桥• MeetMeAdmin: MeetMe 会议管理• MeetMeCount: MeetMe参与者计算• VoiceMail: 语音留言• VoiceMailMain: 进入语音系统• VMAuthenticate: 基于语音邮箱鉴别用户查看 voicemail.conf 获取更多的信息列队和ACD操纵• AddQueueMember: 自动添加排队成员• AgentCallbackLogin: 呼叫代理商回叫注册• AgentLogin: 呼叫代理商注册• AgentMonitorOutgoing: 记录代理商的外出呼叫• ParkAndAnnounce: 停放和宣告• ParkedCall: 回复被停放的呼叫• PauseQueueMemeber: 中止代理• Queue: 排队等代呼叫• RemoveQueueMember: 自动移交列队成员• UnpauseQueueMemeber: 重新开始代理警报监测/中心站警报接受站:仿效一个Ademco 连接ID的警报接受站业余无线电接受装置/转发器连接Rpt:支持业余无线电接受装置和商业化的两种转发器连接外部应用(不是在CVS里)Asterisk app_dbodc:用unixODBC进行拨号方案修正DynExtenDB:数据库中的存储扩充Iconv:字符切换设置app Prepaid:为Postgres 所设计的PPPD:邮件后台程序连接器Bristuff & zaphfc applications• PickUp: 大多数路线是独立的;是bristuff片的一部分• PickUpChan:接收指定路线• PickupSIPuri• PickDown: 挂断长途电话• Steal: 接受中转电话• Devstate: 产生一种安装设备驱动程序状态来改变事件(忙,打电话…)• Segfault:用 segfault 撞击Asterisk• ZapEC: 对于Zap能或者不能的回波消除• Autoanswer: 在指定范围内自动回话• AutoanswerLogin: 登陆到自动回话应用程序vISDN applicationsVISDN交叠拨号Sirrix 路径的应用• SrxEchoCan: 不能/能回波消除• SrxDeflect: 偏转进入的电话• SrxMWI:在Sirrix组上设置/重新设置信息等待指示(MWI)。

Asterisk安装指南

Asterisk安装指南

1. 准备环境1.1 安装前要确定已经安装了以下服务:*DNS Server*Web Server*Mail Server*MySQL Database*Development Toolsgroupadd asteriskuserdel -r asterisk创建用户asterisk到主组asteriskuseradd -g asterisk -d /etc/asterisk/ asterisk修改用户主目录可通过修改“/etc/passwd”文件实现1.2 没有安装的话可以用以下命令安装yum install bindyum install sendmailyum -y updateyum install e2fsprogs-devel keyutils-libs-devel krb5-devel libogg libselinux-devel libsepol-devel libxml2-devel libtiff-devel gmp php-pear php-pear-DB php-gd php-mysql php-pdo kernel-devel ncurses ncurses-devel audiofile-devel libogg-devel openssl-devel mysql-devel zlib zlib-devel perl-DateManip sendmail-cf sox gcc gcc-c++ gnutls-devel bison bison-deve1.3 安装完之后用以下命令设为自动启动chkconfig mysqld onchkconfig httpd on2. 在/usr/src目录中下载Asterisk相关安装包并解压2.1 下载#cd /usr/srcwget /sourceforge/lame/lame-3.97.tar.gzwget /pub/libpri/releases/libpri-1.4.10.tar.gzwget /pub/zaptel/releases/zaptel-1.4.12.1.tar.gzwget /pub/asterisk/releases/asterisk-1.6.2.6.tar.gzwget /pub/asterisk/releases/asterisk-addons-1.6.2.0.tar.gzwget /pub/asterisk/releases/asterisk-sounds-1.2.1.tar.gzwget /freepbx-2.7.0.tar.gzls *.tar.gz | xargs -n1 tar xzvf2.2 安装lametar zxvf lame-3.97.tar.gzcd lame-3.97./configuremakemake install2.3 安装libpri# cd libpri-1.4.9# make# make install2.4 安装zaptel# cd zaptel-1.4.12.1# ./configure# make# make install# make config2.5 安装asterisk创建用户和用户组:asterisk:asterisk# cd asterisk-1.4.24.1# ./configure# make# make install# make samples2.6 安装asterisk-addons# cd asterisk-addons-1.4.7# ./configure# make# make install# make samples启动asterisk#amportal start2.7 安装asterisk-sounds# cd asterisk-sounds-1.2.1# make# make installchown -R asterisk:asterisk /var/lib/asteriskchown -R asterisk:asterisk /var/run/asteriskchown -R asterisk:asterisk /var/log/asteriskchown -R asterisk:asterisk /var/lib/php/session3. 安装FreePBX3.1 下载FreePBX解压: tar zxvf freepbx-2.7.0.tar.gz3.2 安装数据库cd freepbx-2.7.0cd SQL/usr/bin/mysqladmin -u root password 'root'grant all privileges on *.* to asterisk@localhost identified by ‘asterisk’;grant all privileges on *.* to asterisk@’%’ identified by ‘asterisk’;flush privileges;create database asterisk default character set utf8 default collate utf8_general_ci; create database asteriskcdrdb default character set utf8 default collate utf8_general_ci; source SQL/newinstall.sqlsource SQL/cdr_mysql_table.sqlflush privileges;\q3.3 安装FREEPBXcd .../start_asterisk start./install_amp --username=asterisk --password=asterisk3.4 修改文件/文件夹权限chown -R asterisk /etc/asteriskchgrp -R asterisk /etc/asteriskchown -R asterisk /var/lib/asteriskchgrp -R asterisk /var/lib/asteriskchown -R asterisk /var/spool/asteriskchgrp -R asterisk /var/spool/asteriskchmod -R 777 /etc/asteriskchmod -R 777 /var/lib/asterisk/chmod -R 777 /var/spool/asteriskchmod -R 777 /var/www/htmlchmod -R 777 /etc/amportal.confFreePBX安装时要用的配置文件:/etc/amportal.conf重新加载asterisk配置/var/lib/asterisk/bin/retrieve_conf4. 安装成功后的配置4.1 中文件支持1. var/www/html/admin/header.php中的set_language()中修改默认语言在/var/www/html/admin/views/freepbx_admin.php文件中增加2. <option value="zh_CN" <?php echo ($_COOKIE['lang']=="zh_CN" ? "selected" : "") ?> >Chinese Simplified</option>3. 创立/admin/i18n/zh_CN/LC_MESSAGES的目录,并把翻译化后的amp.po amp.mo复制到这里,注意设置对应权限。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

asterisk 目录及配置说明Asterisk 目录及配置文件/etc/asterisk Asterisk 主目录,包含其它关于Asterisk 的配置文件;*zaptel.conf 这个配置文件放在/etc, 因为其它软件也可以使用Zaptel 这个硬件及其驱动, 所以不是放在/etc/asterisk 里./usr/lib/asterisk/modules 这个目录包含所有可以加载Asterisk 模块(应用程序编辑器格式和有用通道), 在Asterisk 启运时会加载这些模块(可以编辑modules.conf)./var/lib/asterisk 比较重要的是astdb 文件与agi-bin 目录; astdb 包含Asterisk 当地数据库信息.sounds/ 所有声音提示的文件在里面,包括Asterisk 原代码中的sounds.txt 文件mohmp3/ 如果配置了音乐保持,应用程序会在这个目录下查找mp3(用CBR从文件中去除身份标签).keys/ 使用公钥和私钥系统认证与一个由RSA 数字签名形成的一对等连接.公钥和私钥的扩展名分别为.pub 和.keyfirmware/ 这个目录含了很多Asterisk相兼容的设备固件,它只有iax/这个子目录,其中有Digium的lAXy的二进制固件镜像.images/ 只有在较多的支持并且利用图解式的图像设备被发布,这个目录将会与相应的目录有更大的关联./var/lib/asterisk/agi-bin agi-bin 包含所有脚本,可以通过许多已经建立的Asterisk 连接.系统的接口,在这里可以写自己的脚本来控制拨打流程。

================配置文件================/etc/asterisk/asterisk.conf 主要配置文件,修改这个配置文件要用modprobe 装载Linux AGl 应用程序与/etc/zaptel.conf 硬件接口的基本层Kernel 使用模块./etc/asterisk/zapata.conf 为硬件配置Asterisk 的接口. /etc/asterisk/extensions.conf 拨号方案./etc/asterisk/sip.co nf SIP 协议配置文件/etc/asterisk/iax.co nf 呼入和呼出IAX 通道/etc/asterisk/extensions.conf 拨号方案配置文件extensions.conf( 四部分:context,extension,priorities,application)context: 用于对extensions 组命名,把拨号方案的不同部分进行分离,免得交织在一起.表示方法是把名字放在[]的中间,名字只能用a~z,A~Z,0~9以及连字号和下划线组成.如:[co ntext1],[i ncomi ng];所有放在con text定义的之后的指令都是这个con text 一部分,直到下一个con text定义的开始.context 的一个重要用途就是加强安全性.如果没有仔细设计拨号方案,可能会造成别人盗用你的系统的不良后果.extensions:extensions 是asterisk 要执行的指令extension 的语法是单词exten 后面跟着一个由等号和大于号组成的箭头, 女口:exten=>extension 的名字一个完整的extension 由三部分组成:extensions 的名字或号码priority( 每个extension 可以有多个步骤,步骤的编号称作priority)应用(或者命令),针对呼叫完成一些动作这三个部分用英文逗号分开,如:exten=>name,priority,application()priorities: 每个extension 都可以有几个步骤,称作priorities文档来源为:从网络收集整理.word版本可编辑.欢迎下载支持如:exten=>50001,1,Answer() #编号为 1 的priority,执行接听电话exten=>50001,2,Hangup() #编号为2 的priority,然后挂电话必须确保priority从1开始并且连续的编号Asterisk pbx 系统安装配置手册 1.0一:系统及安装包选择1.1操作系统:fedora 7。

必须选上mysql相关的所有选项,其他的按照默认即可。

由于安装asterisk-addons 中需要使用mysqlclient ,需要另外安装一个mysql-devel-,否则会有无法找到mysql.h 的错误。

安装方法:rpm -ivh mysql-devel-至此,系统平台搭建完毕,基于此系统下,以后的编译一般不会有问题。

1.2 asterisk 相关包主程序:asterisk-会议定时相关:zapatel-以及asterisk-addons-1.4.2 ,asterisk-sounds-1.2.1,asteriskgui,astbill-1.2.1 zaptel-Zaptel的安装必须在主程序之前,这样在编译主程序的时候就能够找到ztdummy ,才能够选择编译会议相关功能。

进入zaptel 目录:-Make clea n文档来源为:从网络收集整理.word版本可编辑.欢迎下载支持-./configure-Make menuselect这里记得选上Kernel Modules 中的全部选项,其他的采用默认选项-make-make install.1.2.2 asterisk-进入asterisk 目录:-make clean-./configure-make menuselectApplication 中的全部选中,Dialplan Functions 除odbc相关其他能选的全部选上,其余默认-make-make install-make samplesAsterisk-addons 禾廿asterisk-sounds 的安装基本差不多1.2.3 asteriskgui 安装gui源码获取进入目录:-./configure-make-make install1.2.4 astbill 安装源码下载。

Astbill需要的支持比较多,有mysql ,perl,apache等,这在我们搭建系统的时候就已经完成了,所以无需再考虑。

进入目录,然后chmod +x in stall.sh—./in stall.sh为astbill准备数据库,请参考安装包当中的文档installmysql.txt注意,astbill的安装会覆盖/etc/asterisk 目录下的asterisk 相关配置文件,请备份!!安装完后,在/usr/sbin 下运行./safe_asterisk 加载系统。

二.配置2.1 asterisk 基本配置文件Asterisk的配置文件都在/etc/asterisk 目录下,重要的配置文件有:sip.co nf sip 电话基本配置extensions.conf 拨号规则voicemail.conf 配置语音信箱meetme.conf 会议室http.conf web界面相关manager.conf web界面相关asterisk.conf asterisk 目录的配置cdr_mysql.conf 详单数据库res_mysql.conf mysql数据库设置features.conf 自定义按键配置,同时还有一些系统默认的功能键modules.conf 定义系统启动时加载的模块logger.conf 日志下面简单介绍一下这几个文件的配置,当然只给出最简单的配置,如需更深入的了解,请参考系统给出的样本配置。

下面的配置如无特别提出,请在系统的样本配置末端加入。

2.1.1 sip.conf[101]type=friend;secret=101;host=dynamic; //需要注册到服务器context=default;username=101;;callgroup=1; // 组设置;pickupgroup=1;mailbox=101@default // 语音信箱[102]type=friend;secret=102;host=dynamiccontext=default;username=102;;callgroup=1;;pickupgroup=1;mailbox=102@default[ServerA] //声明另一个asterisk服务器,可以在拨号规则中呼叫;pickupgroup=1;type = friendsecret =username = ServerAfromuser = ServerAcontext = default ;insecure = very ;authname = ServerAcanreinvite = nohost = //对端服务器ip地址2.1.2 extensions.conf[default] include => DID // 包含DID contextinclude => featuremap // 可以使用features.conf 中定义的功能include => parkedcalls // 支持call park exten => 1000,1,saydigits(${EXTEN}) exten =>1000,2,Set(DYNAMIC_FEATURES=testfeature#musichold#record#unrecord) exten => 1000,3,background(hello-world) exten => 1000,4,waitexten(10,m) 转下篇。

相关文档
最新文档