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

服务器的安装
所有步骤参考
有以下几点需要注意
∙在开始安装之前,使用root账号来登陆ubuntu
∙严格按照案指导文档的步骤来操作
服务器的配置
在首次登陆配置界面http://sipServerIP/admin ,按系统要求配置登陆账号密码等信息后即可以
登陆进行配置。
账号配置
Applications->Extensions->+Add Extension->Add New PJSIP Extension进入到添加账号页面,
下面几项需要填写。
例如:
User Extension: 500
Display Name:500
Secret: 500
进入Advanced标签页,DTMF Signaling设置,本便设置为In band audio,然后右下角Submit,最后在右上角点击红色Apply按键。
配置完成
配置完成后需要重启系统。
如果SIP客户端经过了路由器,则路由器的SIP ALG要开启。
Asterisk权威指南(第3版)中文第07章外线连接

Asterisk权威指南(第3版)中⽂第07章外线连接第七章外线连接⽬录7.1 ⼲线(Trunking)基础 (2)7.2 ⽤于外线连接的基本Dialplan (3)7.3 PSTN线路 (4)7.3.1 传统PSTN⼲线 (4)7.3.2 安装PSTN⼲线(PSTN Trunks) (6)7.4 VoIP (13)7.4.1 PSTN终结(termination) (13)7.4.2 PSTN再⽣ (14)7.4.3 VoIP to VoIP (15)7.4.4 配置VoIP⼲线(VoIP Trunks) (16)7.5 结论 (22)在之前的章节⾥,我们已经介绍了很多重要知识,这些知识是对于使Asterisk系统能正产⼯作是必不可少的。
然⽽,我们还没有完成⼀件对于任何PBX都必不可少的事情:即,将Asterisk与外部世界连接起来。
在本章中,我们即来讨论这件⼯作。
之所以说Asterisk的软件架构具有重要意义,很⼤程度上是由于这样⼀个事实,Asterisk 平等的对待每⼀个channel。
这⼀点完全不同于传统PBX,在传统PBX中,外线(⽤于连接外部世界)和分机(⽤于连接内部⽤户和资源)是完全不同的。
事实上,Asterisk dialplan⽤相似的⽅法处理所有channel,这意味着你可以在Asterisk系统中⾮常容易的实现⼀些在传统PBX⾮常难以实现(或不可能实现)的⼯作。
然⽽,这种灵活性也是有代价的。
由于系统并不会固有的知道内部资源(例如⼀部内线分机)和外部资源(例如,⼀个电信线路)的不同,Asterisk系统需要你来保证你的dialplan 恰当的处理了每种类型的资源。
7.1⼲线(Trunking)基础⼲线(Trunking)的⽬的是在两个实体间提供⼀个共享连接。
举例来说,公路⼲线是把两个镇⼦连接起来的⾼速公路。
铁路上⼴泛的使⽤术语“⼲线(trunk)”,来指代那些将⽀线铁路连接到⼀起的主要线路。
标准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.。
《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的源代码文件中迷失了方向,不知所措。
Asterisk权威指南(原书第5版)

23.4 Asterisk的
未来
23.5**的未 来
作者介绍
这是《Asterisk权威指南(原书第5版)》的读书笔记模板,暂无该书作者的介绍。
读书笔记
这是《Asterisk权威指南(原书第5版)》的读书笔记模板,可以替换为自己的心得。
精彩摘录
这是《Asterisk权威指南(原书第5版)》的读书笔记模板,可以替换为自己的精彩内容摘录。
5.3配置Asterisk
5.4进行测试以确保 设备已经注册成功
5.5用于设备测试的 基本dialplan
5.6透过现象看本质: 第一次通话
5.7小结
6.1 dialplan语法
6.2一个简单的 dialplan
6.3构建交互式 dialplan
6.4小结
7.1中继基础
7.2用于外线连接的 基本dialplan
15.8 ACD队列的数 据库集成
15.7存储呼叫详情 记录
15.9小结
16.1 IVR的组成
16.2 IVR设计的考 虑因素
16.3 Asterisk的 IVR模块
16.4使用CURL()创 建简单的IVR
16.6语音识别和文 本语音转换
16.5录制提示音的 IVR函数
16.7小结
1
17.1呼叫文件
10.9小结
11.2驻留和寻呼
11.3高级会议 11.4小结
12.1创建一个 1
简单的ACD队 列
2
12.2队列成员
3
12.3高级队列
4 12.4队列统计:
queue_log文 件
5
12.5小结
13.2使用hint指令 的分机状态
13.1设备状态信息
centos6.4安装Asterisk+freepbx

centos6.4安装Asterisk+freepbx2013-07-26 11:02:36分类: LINUXCentos 6.4 上安装Asterisk 11.3+FreePBX 2.11最近项目需要用asterisk来做一下研究,顺手记录一下安装过程,官方文档都太旧了,地址 https:///wiki/display /AST/Asterisk+Packages现在asterisk版本都已经出到了11.3.0,所以以下记录都是针对最新版本在Centos 6.4上的安装。
1. 安装asteriskasterisk官方为RedHat/Centos/Ubuntu等主流发行版提供好了相应的包,直接用yum/apt就可以完成安装,还是相当方便的。
sudo rpm -Uvh/centos/6/current/x86 _64/RPMS/asterisknow-version-3.0.0-1_centos6. noarch.rpmsudo yum -y update这是目前的最新版本,如果asterisk有更新的版本,可以先去/centos/里找对应的那个包的地址,注意区分centos版本和i386/x86_64架构然后先更新一把系统,重启一下(因为可能会更新内核版本)好了,可以开始装asterisk,目前版本是11.xsudo yum install asterisk asterisk-configs --enablerepo=asterisk-11安装需要的一些模块sudo yum install dahdi-linux dahdi-tools libpri验证安装如果一切正常的话,到这里就安装完成了,可以用以下命令检查dahdi 和asterisk是否已经运行sudo service dahdi statussudo service asterisk status如果没有运行的话,用sudo service dahdi start 和sudo service asterisk start 来启动如果dahdi正常运行,用lsmod|grep dahdi 应该可以看到加载了一些相应的模块如果asterisk正常运行,在命令行下用sudo asterisk -r 可以连接到控制台,到这里验证安装完成。
一步一步安装asteriskfreepbx

一步一步安装freepbx1. Ce ntOS5.3系统安装安装时需要注意把所有组件全部安装(在安装系统时选择自定义选项,即可。
)。
此问题主要是为了方便以后安装Asterisk和Pbx需要的软件开发包。
参考:http://blog.si .c n/s/blog_416adf890100aye1.html~type=v5_o ne&label=rela _n extarticle2.安装Tools Linux.iso。
用光驱加载Linux.iso。
把光驱里的文件拷贝到根文件夹,解压缩VMwareTools-5.5334685.tar.gz 文件(tar zxvf文件名),后来进入vmware-tools-distrib 文件夹。
执行./vmware-install.pl 后来一路回车即可。
3.配置虚拟机网络。
(2安装和3配置,完毕最好从启一下)4.要安装Asterisk 了各位观众请注意!!!/s/blog_416adf890100aydi.html/s/blog_416adf890100aye n.htmlhttp://blog.si .c n/s/blog_416adf890100b819.html/sv n/freeiris2/tru nk/INSTALL.html禁用Selinux,禁用防火墙运行一下包,看看那个不存在就更新安装那个yum in stall (包名)rpm -q 'ker nel-deve l'rpm -q 'httpd'rpm -q 'mysql-server'rpm -q 'mysql'rpm -q 'mysql-devel'rpm -q 'php'rpm -q 'php-mysql'rpm -q 'perl'rpm -q 'libdbi-dbd-mysql'rpm -q 'perl-libwww-perl'rpm -q bis onrpm -q bis on-develrpm -q n cursesrpm -q n curses-develrpm -q zlib-develrpm -q ope nsslrpm -q ope nssl-develrpm -q gnu tls-develrpm -q gccrpm -q gcc-c++以下也是要更新的包yumin stall e2fsprogs-devel keyutils-libs-devel krb5-devel libogg libseli nu x-devel libsepol-devel libxml2-devel libtiff-devel gmpphp-pear php-pear-DB php-gd php-pdo ncurses-devel audiofile-devel libogg-devel zlib-devel perl-DateMa nip sen dmail-cf bind sen dmail php-mbstri ng然后安装Lame 3.97cd /usr/srcwget http://eas yn ews.dl.sourceforge. net/sourceforge/lame/lame-3.97.tar.gztar zxvf lame-3.97.tar.gzcd lame-3.97./con figureMakemake in stall安装dahdi驱动(A1200P板卡用户要自己打patch请咨询openvox公司,如果要安装oslec回音消除也请参考资料):wget"/dow nload/dow n.php?target=asterisk&obj=& file=dahdi-li nux-2.1.0.4.tar.gz"tar zxvf dahdi-li nu x-2.1.0.4.tar.gzcd dahdi-li nux-2.1.0.4makemake in stallcd ..wget"/dow nload/dow n.php?target=asterisk&obj=& file=dahdi-tools-2.1.0.2.tar.gz"tar zxvf dahdi-tools-2.1.0.2.tar.gzcd dahdi-tools-2.1.0.2makemake in stallmake config/etc/i nit.d/dahdi start/etc/i nit.d/dahdi stopcd ..wget"/dow nload/dow n.php?target=asterisk&obj =& file=libpri-1.4.10.tar.gz"tar zxvf libpri-1410.tar.gzcd libpri-1.4.10makemake in stallcd ..安装asterisk软件:wget"/dow nload/dow n.php?target=asterisk&obj =& file=asterisk-1.4.26.tar.gz"tar zxvf asterisk-1.4.26.tar.gzcd asterisk-1.4.26./con figuremakemake in stallmake samplesmake configcd ..wget"/dow nload/dow n.php?target=asterisk&obj =& file=asterisk-add on s-1.4.8.tar.gz"tar zxvf asterisk-addo ns-1.4.8.tar.gzcd asterisk-add on s-1.4.8./con figuremake cdrcp cdr/cdr_addo n_mysql.so /usr/lib/asterisk/modules/ cd ..安装g729 g723的语音编码:请注意这两个语音编码是专利编码,如果你要使用在商业领域,请向编码版权所有者交纳版税•否则请跳过此步骤•wget"http://asterisk.hosti ng.l v/bi n/codec_g723-ast14-gcc4-glibc-pen tium3.sowget"http://asterisk.hosti ng.l v/bi n/codec_g729-ast14-gcc4-glibc-pen tium3.so"cp -avf codec_g72*.so /usr/lib/asterisk/modules/哇塞赛好累好累,休息休息,以上就是asterisk安装的全过程。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
Asterisk安装指南2010-03-20 10:491、选择操作系统据说Asterisk对大多Linux支持的都比较好,内核版本2.6.9-55.EL安装起来很顺利,2.4的麻烦一些。
注意安装系统的时候选择上开发环境的包。
2、在/usr/src目录中下载Asterisk相关安装包并解压#cd /usr/src/pub/libpri/releases/libpri-1.4.10.tar.gz/pub/zaptel/releases/zaptel-1.4.12.1.tar.gz(dahdiasterisk1.6以后就不用这个,用/pub/telephony/dahdi-linux-complete/releases/dahdi-linux-complete-2.6.1+2.6.1.tar.gz) /pub/asterisk/releases/asterisk-1.6.2.tar.gz/pub/asterisk/releases/asterisk-addons-1.6.2.0.tar.gz/pub/asterisk/releases/asterisk-sounds-1.2.1.tar.gz# tar -xvzf *.tar.gz3.安装libpri# cd libpri-1.4.9# make# make install4.安装zaptel# cd ..# cd zaptel-1.4.12.1# make# make install# make config5.安装asterisk# cd ..# cd asterisk-1.4.24.1# ./configure# make# make install# make samples6.安装asterisk-addons# cd ..# cd asterisk-addons-1.4.7# ./configure# make# make install# make samples7.安装asterisk-sounds# cd ..# cd asterisk-sounds-1.2.1# make# make install8.安装完成,启动服务/usr/sbin/safe_asteriskAsterisk安装指南12010-04-03 9:531. 准备环境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 audi ofile-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.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/asterisk chown -R asterisk:asterisk /var/run/asterisk chown -R asterisk:asterisk /var/log/asterisk chown -R asterisk:asterisk /var/lib/php/sessionAsterisk安装指南22010-04-03 9:533. 安装FreePBX3.1 下载FreePBX:wget /freepbx-2.7.0.tar.gztar 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 pr ivileges on *.* to asterisk@’%’ identified by ‘asterisk’; flush privileges;create database asteriskcreate database asteriskcdrdbsource 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.conf下面是两个重要的配置文件:/etc/amportal.conf/var/lib/asterisk/bin/retrieve_conf4. 安装成功后的配置4.1 中文件支持/var/www/html/admin/header.php中的set_language()中修改默认语言在/var/www/html/admin/views/freepbx_admin.php文件中增加<option value="zh_CN" <?php echo ($_COOKIE['lang']=="zh_CN" ? "selected" : "") ?> >简体中文</option>创立/admin/i18n/zh_CN/LC_MESSAGES的目录,并把翻译化后的amp.po amp.mo复制到这里,注意设置对应权限。
4.2 给FreePBX加登录密码的方法如下:1.编译配置文件,#vi /etc/amportal.conf将AUTHTYPE=none改为AUTHTYPE=database2.使其生效/usr/src/freepbx-2.5.1/apply_conf.sh3.这样/etc/amportal.conf中的AMPDBUSER=adminAMPDBPASS=admin就是登录密码了。
默认的应该是asteriskuser和amp1094.3 将用户(user)与设备(device)区分开来编辑文件 /etc/amportal.conf找到:AMPEXTENSIONS=extensions改为:AMPEXTENSIONS=deviceanduser重启Asteriskamportal restart5. 其他配置让CRM中的记录更全面:extensions.conf文件的628行注释掉;exten => s,n,NoCDR()在cdr.conf中配置unanswered = yesAsterisk的配置文件都在/etc/asterisk目录下,重要的配置文件有: sip.conf 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 日志6. 解决问题报表不能查看如果查看报表的时候出现如下的错误提示:YOU MUST ACCESS THE CDR THROUGH THE ASTERISK MANAGEMENT PORTAL!发生这个错误的原因可能是httpd进程不能读写php会话的保存路径。