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服务器使用指南说明书

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

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系统的安装与配置一、安装包装备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安装和配置

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安装与配置

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配置文件列表及常用指令

配置文件说明列表:常规指令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安装指南

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复制到这里,注意设置对应权限。
Asterisk基础知识

• 从功能和稳定性上,两者没有区别
asterisk和digium的板卡有何关系 和 的板卡有何关系
• 开源不代表不赚钱,开源的目的就是东方 不亮西方亮,靠硬件赚钱,那就是板卡 • 很多国外的人对digium是崇拜的,所以再贵 他们也要买digium的卡 • aserisk不是必须插板卡的,但是如果有板卡, ippbx的外部接口会更丰富 • 其它一些公司的板卡也能兼容asterisk,比 如eicon,比如yate。
asterisk 能够支持传统的线路
• tdm (time division multiplexing) • t1/ e1 pri/ pra & rbs (robbed bit signal)modes analog phone lines/ phones (pots) • isdn (integrated services digital network) both bri (basic rate)and pri (primary rate) • asterisk需要的带宽,一般为:32kb/ 线路。也 就是说每支持一条线路,只需要增32kb 的带 宽,但是需要网络质量良好
asterisk能做什么 能做什么
• asterisk,英文是“星号”的意思,设计的 初衷是,任何和电话系统有关的东西,它 都能做
– 并不是所有和电话有关的功能靠asterisk实现都 是最好的
• asterisk最擅长的就是做一个ippbx,
– 当然有人用它来做voicemail服务器、ivr服务器、 会议服务器、中继网关、sip server、发卡系统 等等
安装Asterisk-1
Asterisk配置文件说明

关于AsteriskAsterisk是一款实现用户电话交换机(PBX)功能的自由软件、开源软件。
Asterisk提供完善PBX 功能,可以连接多种不同的电话终端,包括普通电话机,IP电话机,软电话等,支持多种主流的IP电话协议和系统接口。
软件名称Asterisk-星号(*),在Unix(包括Linux)和DOS操作系统中是通配符,用来在查找中适配任何字符,寓意该软件广泛的适用性。
Asterisk软件提供很多以前只有昂贵的专业PBX系统才支持的功能,比如:语音信箱,会议电话,交互式语音提示和自动电话转接等。
由于该软件开放的性质,用户可以灵活的配置方便的扩展系统的功能,甚至编程开发自己所需功能的模块。
Asterisk通常都运行在Linux操作系统下,当然它也可以在其他系统,如BSD, Windows或OS X下编译并安装。
Asterisk服务器不需要任何特殊的硬件即可提供VoIP的服务,只需服务器有网络连接即可。
它支持主流VoIP协议,包括会话发起协议(SIP)、H.323,既可作为IP电话服务器也可以作IP 电话和PSTN之间的转接。
Asterisk系统还设计了一个新协议,IAX,用于在Asterisk服务器之间维护话路通道。
如果需要连接普通电话或PSTN中继线,运行Asterisk的服务器则需要安装相应的硬件接口板。
许多厂商都生产用于连接普通电话、T1、E1中继线、ISDN等的接口板。
由于是自由软件且具有丰富的系统功能,Asterisk提供给用户一个廉价并功能强大的PBX解决方案。
它被越来越多的用于代替传统专用的PBX,或被用于跨国VoIP电话以节省长途费用。
一些国家的VoIP电话公司已经开始支持Asterisk,提供IAX2接口或允许用户的Asterisk 服务器使用SIP协议连接。
截止2008年4月22日,Asterisk的最新版本是1.4.19.1版。
Asterisk功能说明及基本呼叫流程1.Asterisk内部核心:共分为6个部分A.PBX核心交换模块B.调度和IO管理模块C.应用调用模块D.编码转换模块E.动态模块加载器模块F.CDR生成模块(即时呼叫详细记录报告)2.Asterisk基本呼叫流程(1)通过Asterisk的一个电话呼叫在一个通道驱动接口上到达,如SIP通道。
Asterisk权威指南(第3版)中文第14章设备状态

same => n,Hangup()
如果我们从我们检查状态的设备拨打 7012,下述诊断信息将会显示在 Asterisk 控制台上:
-- The state of SIP/0004F2060EB4 is INUSE
第 20 章讨论 Asterisk 管理接口(Asterisk Manager Interface,AMI)。Get Var 管理操作可以用在外部程序检索设备状态中。你可以通过它获得一般变量 或 dialplan 函数的值。例如 DEVICE_STATE()。
14.4 使用自定义设备状态...............................................................................................7 14.4.1 一个例子...........................................................................................................7
14.1 设备状态
设备状态涉及两种类型的设备:真实的设备和虚拟设备。真实的设备指可以接打电话的 电话终端设备,例如 SIP 话机。虚拟设备指在 Asterisk 内部的一些提供了有用的状态信息的 东西。Table14-1 列出了 Asterisk 中的有效虚拟设备。
Asterisk学习笔记

Asterisk学习笔记Asterisk学习笔记1.安装Asterisk需要那些安装包。
a)Asterisk(pure voip only need this)b)Zaptel(support 硬件板卡支持)c)Pri(libpri)2.Asterisk的版本a)Asterisk目前有1.4和1.6两个分支,我们的HCC系统采用的是1.4分支上进行扩展开发。
1.6 no longer support zaptel,增加了很多新features,相对与1.4版本变动比价大。
b)Upgrade:ael 取消了Macro() 用Gosub()来代替。
Applications:ChanIsAvail()增加-t选项3.How to install Asterisk on Linux.a)Login as rootb)tar zxvf Asterisk-1.6…解压c)进入sub folderd)#make cleane)#./configuref)#makeg)#make installh)#make samples(安装示例配置)4.How to run/stop Asteriska)进入console,直接运行#asterisk 来运行b)进入asterisk命令提示界面:#asterisk –r 然后CLI>stop nowc)Asterisk可以用safe_asterisk来安全启动,通过safe_asterisk 启动后如果asterisk crash会dump core到/tmp目录,并且给administrator发email告警。
5.Asterisk目录结构a)/usr/lib/asterisk/modules 这个目录下包含所有可加载的asterisk模块b)/var/spool/asterisk 这个目录下包括outgoing gcall tmp voicemail目录asterisk会去monitor这个目录,可以用在做自动外呼等等c)/var/log/asterisk用来store logsd)/var/log/asterisk/cdr-csv用来store cdrs in csv format. CSV=comma-separate-value6.SIP in Asteriska)Asterisk中sip配置文件为/etc/asterisk/sip.confb)Asterisk支持IAX与SIP VOIP协议。
1asterisk服务器安装手册

Asterisk服务器安装手册版本 1.0文档编号:RPT12345678-001版权所有© 1998-2014 263网络通信股份有限公司公司网址:版权申明本文档包含了来自263网络通信股份有限公司的机密技术和商业信息,这些信息作为263网络通信股份有限公司专用。
接受本文档即视为表示同意对其内容保密,并且未经263网络通信股份有限公司书面许可,不得复制、泄露或散布本文档的全部或部分内容。
本文档及其描述的内容及产品的著作权和版权受有关法律保护,对本文档内容的任何形式的非法复制,泄露或散布,将导致承担相应的法律责任。
263网络通信股份有限公司保留在不另行通知的情况下修改本文档的权利,并保留对本文档内容的全部解释权。
“263网络通信”标识是263网络通信股份有限公司的注册商标。
This document contains confidential technical and commercial information from Net263 Ltd, and is intended for the use of Customers or Net263’s partners only for the purposes of related projects to Net263. No part of it may be reproduced or transmitted in any form or means without the written permission of Net263.This document and the product it describes are protected by copyright according to the applicable laws.The information in this document is subject to change without notice and describes only the product defined in the introduction of this documentation. Net263 will, if necessary, explain issues, which may not be covered by the document.“Net263” logo is a registered trademark of Net263 Ltd.修订历史正文目录1.概述( OVERVIEW ) (1)1.1范围(S COPE ) (1)1.2发布(I SSUE ) (1)1.3综述(B RIEF ) (1)2.参考( REFERENCE ) (1)3.定义( DEFINITION ) (1)3.1术语(T ERMINOLOGIES ) (1)3.2约束(C ONSTRAINTS ) (2)4.软件特性 (2)4.1功能 (2)4.2性能 (2)5.运行环境 (2)5.1硬件 (2)5.2支撑软件 (2)6.程序安装、初始化及文件配置 (2)6.1ZAPTEL程序安装 (2)6.2ASTERISK程序安装 (2)6.3文件配置 (3)6.3.1配置文件 (3)6.3.2语音文件 (3)6.3.3codec_g729.so库文件 (3)6.4LIBAST_SOAP.SO库文件路径指向 (3)6.5配置文件的修改 (3)7.评价 (4)8.附录( APPENDICES ) (4)8.1文档绑定 (4)图表目录错误!未找到图形项目表。
asterisk安装和asterisk_sip控制台信息

asterisk安装和asterisk_sip控制台信息1. 检查依赖的包是否安装:依赖的包有gcc--libpri,zaptelasteriskncurses-devellibtermcap-develkernel-develkernel-smp-develgcc-c++openssl-develnewt-develzlib-develunixODBC-devellibtoolmake利用 rpm -q 名称进行查询看是否安装,无时进行安装,当然用源安装快!2.asterisk 的安装和环境的搭建首先在FTP上(自己Google)得到压缩包,或者ssh 远程得到命令为 get 名称自己的主机名称:放置目录安装到/usr/src目录下解压缩、切换目录(/usr/src/asterisk-xxx)、执行(sudo ./configure)、sudo make、sudo make install 、sudo make samples、sudo make progdocs修改配置: 1.1 在/etc/asterisk/sip.conf 中添加用户:[1001]type=friendsecret=testhost=dynamic[1002]type=friendsecret=testhost=dynamic1.2 /etc/asterisk/extensions.conf 中添加:[test]exten => 1001,1,Dial(SIP/1001)exten => 1002,1,Dial(SIP/1002)===============================各项讲解=================================== sip环境的简易配置:(所有的配置文件都在/etc/asterisk目录下,其它地方的配置无效) sip.conf[general] 所有用户和对端的默认选项allowoverlap=nobindport=5060 监听端口bindaddr=0.0.0.0 监听所有过来的电话srvlookup=yes 使用 DNS 服务qualify=yescontext=test 拨号方案[1001]type=friend 类型用户类型的用于认证呼入呼叫端Peer 是用于呼出呼叫朋友类型两者都有secret=test 密码host=dynamic 动态IP[1002]type=friendsecret=testhost=dynamicextensions.conf在文档的最后添加:[test]exten => 1001,1,Dial(SIP/1001) 呼叫超时秒数exten => 1002,1,Dial(SIP/1002)====================================== ===================================运行asterisk的命令为:asterisk & or sudo /usr/sbin/asterisk -vvvvvvcg停止命令为:stop now连接到命令行:asterisk -rvvvdialplan reloadsip reload显示支持的通信类型: show channeltypes打开调试信息: sip set debug现在astersik下的sip环境就搭建完成了,开启astersik ================================== sudo /usr/sbin/asterisk -vvvvvvcg =============================== ==登录到Astersk服务器运行控制台: asterisk -crvvv查看登录用户 : sip shwo peers*CLI> sip show peersName/username Host Dyn Nat ACL Port Status1004 (Unspecified) D 0 UNKNOW N1003 (Unspecified) D 0 UNKNOW N1002 (Unspecified) D 0 UNKNOW N1001/1001 192.168.123.58 D 39478 OK (101 ms)4 sip peers [Monitored: 1 online, 3 offline Unmonitored: 0 online, 0 offline]*CLI>查看详细记录: sip show peer 1001*CLI> sip show peer 1002 ////注意与查看全部的区别 peers peer* Name : 1002Secret : <Set>MD5Secret : <Not set>Context : testSubscr.Cont. : <Not set>Language :AMA flags : UnknownTransfer mode: openCallingPres : Presentation Allowed, Not ScreenedCallgroup :Pickupgroup :Mailbox :VM Extension : asteriskLastMsgsSent : 32767/65535Call limit : 0Dynamic : YesCallerid : "" <>MaxCallBR : 384 kbpsExpire : -1Insecure : noNat : RFC3581ACL : NoT38 pt UDPTL : NoCanReinvite : YesPromiscRedir : NoUser=Phone : NoVideo Support: NoTrust RPID : NoSend RPID : NoSubscriptions: YesOverlap dial : NoDTMFmode : rfc2833LastMsg : 0ToHost :Addr->IP : (Unspecified) Port 0 Defaddr->IP : 0.0.0.0 Port 5060Def. Username:SIP Options : (none)Codecs : 0x8000e (gsm|ulaw|alaw|h263) Codec Order : (none)Auto-Framing: NoStatus : UNKNOWNUseragent :Reg. Contact :*CLI>重新加载拨号方案:dialplan reload*CLI> dialplan reload== Parsing '/etc/asterisk/extensions.conf': Found== Setting global variable 'CONSOLE' to 'Console/dsp'== Setting global variable 'IAXINFO' to 'guest'== Setting global variable 'TRUNK' to 'Zap/G2'== Setting global variable 'TRUNKMSD' to '1'-- Registered extension context 'dundi-e164-canonical'-- Registered extension context 'dundi-e164-customers'-- Registered extension context 'dundi-e164-via-pstn'-- Registered extension context 'dundi-e164-local'-- Including context 'dundi-e164-canonical' in context 'dundi-e164-local'-- Including context 'dundi-e164-customers' in context 'dundi-e164-local'-- Including context 'dundi-e164-via-pstn' in context 'dundi-e164-local'-- Registered extension context 'dundi-e164-switch'-- Including switch 'DUNDi/e164' in context 'dundi-e164-switch'-- Registered extension context 'dundi-e164-lookup'-- Including context 'dundi-e164-local' in context 'dundi-e164-lookup'-- Including context 'dundi-e164-switch' in context 'dundi-e164-lookup'-- Registered extension context 'macro-dundi-e164'-- Added extension 's' priority 1 to macro-dundi-e164-- Including context 'dundi-e164-lookup' in context 'macro-dundi-e164'-- Registered extension context 'iaxtel700'-- Added extension '_91700XXXXXXX' priority 1 to iaxtel700 -- Registered extension context 'iaxprovider'-- Registered extension context 'trunkint'-- Added extension '_9011.' priority 1 to trunkint-- Added extension '_9011.' priority 2 to trunkint-- Registered extension context 'trunkld'-- Added extension '_91NXXNXXXXXX' priority 1 to trunkld -- Added extension '_91NXXNXXXXXX' priority 2 to trunkld -- Registered extension context 'trunklocal'-- Added extension '_9NXXXXXX' priority 1 to trunklocal-- Registered extension context 'trunktollfree'-- Added extension '_91800NXXXXXX' priority 1 to trunktollfree-- Added extension '_91888NXXXXXX' priority 1 to trunktollfree-- Added extension '_91877NXXXXXX' priority 1 to trunktollfree-- Added extension '_91866NXXXXXX' priority 1 to trunktollfree-- Registered extension context 'international'-- Including context 'longdistance' in context 'international' -- Including context 'trunkint' in context 'international'-- Registered extension context 'longdistance'-- Including context 'local' in context 'longdistance'-- Including context 'trunkld' in context 'longdistance'-- Registered extension context 'local'-- Including context 'default' in context 'local'-- Including context 'trunklocal' in context 'local'-- Including context 'iaxtel700' in context 'local'-- Including context 'trunktollfree' in context 'local'-- Including context 'iaxprovider' in context 'local'-- Including context 'parkedcalls' in context 'local'-- Registered extension context 'macro-trunkdial'-- Added extension 's' priority 1 to macro-trunkdial-- Added extension 's' priority 2 to macro-trunkdial-- Added extension 's-NOANSWER' priority 1 to macro-trunkdial-- Added extension 's-BUSY' priority 1 to macro-trunkdial-- Added extension '_s-.' priority 1 to macro-trunkdial-- Registered extension context 'macro-stdexten'-- Added extension 's' priority 1 to macro-stdexten-- Added extension 's' priority 2 to macro-stdexten-- Added extension 's-NOANSWER' priority 1 to macro-stdexten-- Added extension 's-NOANSWER' priority 2 to macro-stdexten-- Added extension 's-BUSY' priority 1 to macro-stdexten-- Added extension 's-BUSY' priority 2 to macro-stdexten-- Added extension '_s-.' priority 1 to macro-stdexten-- Added extension 'a' priority 1 to macro-stdexten-- Registered extension context 'macro-stdPrivacyexten'-- Added extension 's' priority 1 to macro-stdPrivacyexten -- Added extension 's' priority 2 to macro-stdPrivacyexten -- Added extension 's-NOANSWER' priority 1 to macro-stdPrivacyexten-- Added extension 's-NOANSWER' priority 2 to macro-stdPrivacyexten-- Added extension 's-BUSY' priority 1 to macro-stdPrivacyexten-- Added extension 's-BUSY' priority 2 to macro-stdPrivacyexten-- Added extension 's-DONTCALL' priority 1 to macro-stdPrivacyexten-- Added extension 's-TORTURE' priority 1 to macro-stdPrivacyexten-- Added extension '_s-.' priority 1 to macro-stdPrivacyexten -- Added extension 'a' priority 1 to macro-stdPrivacyexten -- Registered extension context 'macro-page'-- Added extension 's' priority 1 to macro-page-- Added extension 's' priority 2 to macro-page-- Added extension 's' priority 3 to macro-page-- Added extension 's' priority 4 to macro-page-- Added extension 's' priority 5 to macro-page-- Added extension 's' priority 6 to macro-page-- Added extension 's' priority 7 to macro-page-- Registered extension context 'demo'-- Added extension 's' priority 1 to demo-- Added extension 's' priority 2 to demo-- Added extension 's' priority 3 to demo-- Added extension 's' priority 4 to demo-- Added extension 's' priority 5 to demo-- Added extension 's' priority 6 to demo-- Added extension 's' priority 7 to demo-- Added extension '2' priority 1 to demo-- Added extension '2' priority 2 to demo-- Added extension '3' priority 1 to demo-- Added extension '3' priority 2 to demo-- Added extension '1000' priority 1 to demo-- Added extension '1234' priority 1 to demo-- Added extension '1234' priority 2 to demo -- Added extension '1235' priority 1 to demo -- Added extension '1236' priority 1 to demo -- Added extension '1236' priority 2 to demo -- Added extension '#' priority 1 to demo-- Added extension '#' priority 2 to demo-- Added extension 't' priority 1 to demo-- Added extension 'i' priority 1 to demo-- Added extension '500' priority 1 to demo -- Added extension '500' priority 2 to demo -- Added extension '500' priority 3 to demo -- Added extension '500' priority 4 to demo -- Added extension '600' priority 1 to demo -- Added extension '600' priority 2 to demo -- Added extension '600' priority 3 to demo -- Added extension '600' priority 4 to demo -- Added extension '76245' priority 1 to demo -- Added extension '_7XXX' priority 1 to demo -- Added extension '7999' priority 1 to demo -- Added extension '7999' priority 2 to demo -- Added extension '8500' priority 1 to demo -- Added extension '8500' priority 2 to demo -- Registered extension context 'page'-- Added extension '_X.' priority 1 to page-- Registered extension context 'default'-- Including context 'demo' in context 'default' -- Registered extension context 'test'-- Added extension '1001' priority 1 to test-- Added extension '1002' priority 1 to test-- Added extension '1003' priority 1 to test-- Added extension '1004' priority 1 to test== Parsing '/etc/asterisk/users.conf': FoundDialplan reloaded.*CLI>重新加载SIP方案:sip reload*CLI> sip reload*CLI> Reloading SIP== Parsing '/etc/asterisk/sip.conf': Found== Parsing '/etc/asterisk/users.conf': Found== Parsing '/etc/asterisk/sip_notify.conf': Found*CLI>=========================sip 控制台信息=====================================1. 运行调试常用命令./asterisk & 在后台运行./asterisk -vvvc 启动并尽量多的在控制台显示调试信息./asterisk -r 连接控制台set verbose 9999 设置打印详细信息2. 控制台下常用命令sip reload 重新加载sip信息sip set debug 设置显示更多的sip信息sip set debug off 关闭显示更多的sip信息sip show channels 显示所有活动的sip通道sip show users 显示用户情况sip show user xxx 显示用户xxx的情况dialplan show 显示拨号方案dialplan reload 重新加载拨号方案stop gracefully 优雅的停止asteriskstop now 立即停止运行module show 显示已有的加载module load cdr_radius.so 加载模块 cdrxxxmodule reload cdr_radius.so 重新加载模块 cdrxxxmodule unload cdr_radius.so 卸载模块 cdrxxxcore show applications 显示所有的应用比如Dial Radius Hangup Answer等core show channels 显示所有的通话通道core show codecs 显示所有支持的编码core show functions 显示所有的功能函数-------------------------------------------------------------------------*CLI> help! Execute a shell commandabort halt Cancel a running haltael debug contexts Enable AEL contexts debug (does nothing)ael debug macros Enable AEL macros debug (does nothing) ael debug read Enable AEL read debug (does nothing)ael debug tokens Enable AEL tokens debug (does nothing) ael nodebug Disable AEL debug messagesael reload Reload AEL configurationagent logoff Sets an agent offlineagent show Show status of agentsagent show online Show all online agentsagi debug Enable AGI debuggingagi debug off Disable AGI debuggingagi dumphtml Dumps a list of agi commands in html format agi show List AGI commands or specific helpcdr status Display the CDR statusconsole active Sets/displays active consoleconsole answer Answer an incoming console callconsole autoanswer Sets/displays autoanswerconsole boost Sets/displays mic boost in dBconsole dial Dial an extension on the consoleconsole flash Flash a call on the consoleconsole hangup Hangup a call on the consoleconsole mute Disable mic inputconsole send text Send text to the remote deviceconsole transfer Transfer a call to a different extensionconsole unmute Enable mic inputcore clear profile Clear profiling infocore set debug channel Enable/disable debugging on a channelcore set debug Set level of debug chattinesscore set debug off Turns off debug chattinesscore set global Set global dialplan variablecore set verbose Set level of verbosenesscore show applications Shows registered dialplan applicationscore show application Describe a specific dialplan applicationcore show audio codecs Displays a list of audio codecscore show channels Display information on channelscore show channel Display information on a specific channel core show channeltypes List available channel typescore show channeltype Give more details on that channeltypecore show codecs Displays a list of codecscore show codec Shows a specific codeccore show config mappings Display config mappings (file names to config engines)core show file formats Displays file formatscore show file version List versions of files used to build Asteriskcore show functions Shows registered dialplan functionscore show function Describe a specific dialplan functioncore show globals Show global dialplan variablescore show hints Show dialplan hintscore show image codecs Displays a list of image codecscore show image formats Displays image formatscore show license Show the license(s) for this copy of Asteriskcore show profile Display profiling infocore show switches Show alternative switchescore show threads Show running threadscore show translation Display translation matrixcore show uptime Show uptime informationcore show version Display version infocore show video codecs Displays a list of video codecscore show warranty Show the warranty (if any) for this copy of Asteriskdatabase del Removes database key/valuedatabase deltree Removes database keytree/valuesdatabase get Gets database valuedatabase put Adds/updates database valuedatabase show Shows database contentsdatabase showkey Shows database contentsdialplan add extension Add new extension into contextdialplan add ignorepat Add new ignore patterndialplan add include Include context in other contextdialplan reload Reload extensions and *only* extensionsdialplan remove extension Remove a specified extensiondialplan remove ignorepat Remove ignore pattern from contextdialplan remove include Remove a specified include from contextdialplan save Save dialplandialplan show Show dialplandnsmgr reload Reloads the DNS manager configurationdnsmgr status Display the DNS manager statusdundi debug Enable DUNDi debuggingdundi flush Flush DUNDi cachedundi lookup Lookup a number in DUNDidundi no debug Disable DUNDi debuggingdundi no store history Disable DUNDi historic recordsdundi precache Precache a number in DUNDidundi query Query a DUNDi EIDdundi show entityid Display Global Entity IDdundi show mappings Show DUNDi mappingsdundi show peers Show defined DUNDi peersdundi show peer Show info on a specific DUNDi peerdundi show precache Show DUNDi precachedundi show requests Show DUNDi requestsdundi show trans Show active DUNDi transactionsdundi store history Enable DUNDi historic recordsfeature show Lists configured featuresfile convert Convert audio filegroup show channels Display active channels with group(s) help Display help list, or specific help on a commandhttp show status Display HTTP server statusiax2 provision Provision an IAX deviceiax2 prune realtime Prune a cached realtime lookupiax2 reload Reload IAX configurationiax2 set debug Enable IAX debuggingiax2 set debug jb Enable IAX jitterbuffer debuggingiax2 set debug jb off Disable IAX jitterbuffer debuggingiax2 set debug off Disable IAX debuggingiax2 set debug trunk Enable IAX trunk debuggingiax2 set debug trunk off Disable IAX trunk debuggingiax2 show cache Display IAX cached dialplaniax2 show channels List active IAX channelsiax2 show firmware List available IAX firmwaresiax2 show netstats List active IAX channel netstatsiax2 show peers List defined IAX peersiax2 show peer Show details on specific IAX peeriax2 show provisioning Display iax provisioningiax2 show registry Display IAX registration statusiax2 show stats Display IAX statisticsiax2 show threads Display IAX helper thread infoiax2 show users List defined IAX usersiax2 test losspct Set IAX2 incoming frame loss percentage indication add Add the given indication to the countryindication remove Remove the given indication from the countryindication show Display a list of all countries/indicationskeys init Initialize RSA key passcodeskeys show Displays RSA key informationlocal show channels List status of local channelslogger mute Toggle logging output to a consolelogger reload Reopens the log fileslogger rotate Rotates and reopens the log fileslogger show channels List configured log channelsmanager show command Show a manager interface commandmanager show commands List manager interface commandsmanager show connected List connected manager interface usersmanager show eventq List manager interface queued events manager show users List configured manager usersmanager show user Display information on a specific manager usermgcp audit endpoint Audit specified MGCP endpointmgcp reload Reload MGCP configurationmgcp set debug Enable MGCP debuggingmgcp set debug off Disable MGCP debuggingmgcp show endpoints List defined MGCP endpointsmixmonitor Execute a MixMonitor command.module load Load a module by namemodule reload Reload configurationmodule show List modules and infomodule show like List modules and infomodule unload Unload a module by namemoh reload Music On Holdmoh show classes List MOH classesmoh show files List MOH file-based classesno debug channeloriginate Originate a callqueue add member Add a channel to a specified queuequeue remove member Removes a channel from a specified queuequeue show Show status of a specified queuerealtime load Used to print out RealTime variables.realtime pgsql status Shows connection information for the Postgresql RealTime driverrealtime update Used to update RealTime variables.restart gracefully Restart Asterisk gracefullyrestart now Restart Asterisk immediatelyrestart when convenient Restart Asterisk at empty call volumertcp debug ip Enable RTCP debugging on IPrtcp debug Enable RTCP debuggingrtcp debug off Disable RTCP debuggingrtcp stats Enable RTCP statsrtcp stats off Disable RTCP statsrtp debug ip Enable RTP debugging on IPrtp debug Enable RTP debuggingrtp debug off Disable RTP debuggingsay load set/show the say modeshow parkedcalls Lists parked callsshow queuessip history Enable SIP historysip history off Disable SIP historysip notify Send a notify packet to a SIP peersip prune realtime Prune cached Realtime object(s)sip prune realtime peer Prune cached Realtime peer(s)sip prune realtime user Prune cached Realtime user(s)sip reload Reload SIP configurationsip set debug Enable SIP debuggingsip set debug ip Enable SIP debugging on IPsip set debug off Disable SIP debuggingsip set debug peer Enable SIP debugging on Peernamesip show channels List active SIP channelssip show channel Show detailed SIP channel infosip show domains List our local SIP domains.sip show history Show SIP dialog historysip show inuse List all inuse/limitssip show objects List all SIP object allocationssip show peers List defined SIP peerssip show peer Show details on specific SIP peersip show registry List SIP registration statussip show settings Show SIP global settingssip show subscriptions List active SIP subscriptionssip show users List defined SIP userssip show user Show details on specific SIP userskinny reset Reset Skinny device(s)skinny set debug Enable Skinny debuggingskinny set debug off Disable Skinny debuggingskinny show devices List defined Skinny devicesskinny show lines List defined Skinny lines per devicesoft hangup Request a hangup on a given channelstop gracefully Gracefully shut down Asteriskstop now Shut down Asterisk immediatelystop when convenient Shut down Asterisk at empty call volumestun debug Enable STUN debuggingstun debug off Disable STUN debuggingudptl debug Enable UDPTL debuggingudptl debug ip Enable UDPTL debugging on IPudptl debug off Disable UDPTL debuggingvoicemail show users List defined voicemail boxesvoicemail show zones List zone message formats*CLI> [Jan 20 16:15:05] NOTICE[6579]: chan_sip.c:15094 handle_request_subscribe: Received SIP subscribe for peer without mailbox: 1001。
asteriskSIP.conf配置文件详细说明

asteriskSIP.conf配置文件详细说明1. 介绍extensions.conf中使用sip设备的语法是SIP/devicename如果用户在Internet上,可以使用SIP/username@domain形式,同时不要忘记打开DNS SRV功能。
如果定义了一个SIP代理,可以使用SIP/proxyhostname/user 或者SIP/user@proxyhostname形式,proxyhostname的定义在下面的章节说明。
2. 在CLI中的查询命令:sip show peers 显示所有的SIP peers(包括friends) sip show users 显示所有的SIP users(包括friends) sip show registry 显示注册到的主机状态sip debug 显示所有的Sip信息module reload chan_sip.so 重新装载sip的配置文件3. 设备命名命名一个设备之前,要先理解Asterisk是怎么处理呼入电话的:1) Asterisk取出SIP From: address中的username,使用它来匹配系统中定义的type=user的的设备名。
2) Asterisk检查INVITE请求中的IP地址和端口号,使用它来匹配系统中定义的type=peer的设备。
不要混淆extensions和设备名的概念。
设备需要一个唯一的名字。
设备名不能用于电话号码。
电话号码是拨号计划中的声明的一个extension。
注意:参数username并不是用户名的意思,在大多数情况下,它根本不是必须的。
在后边,我们把它重命名做defaultuser,因为他与defaultip合并使用。
4. 通用属性说明[general] ;通用属性context=default ;呼入电话默认使用的contextallowguest=no ; 允许或拒绝客户呼叫 (默认 yes)allowoverlap=no ; 允许重叠拨号(默认yes)allowtransfer=no ; 允许呼叫转接(默认yes)realm=mydomain.tld ; 认证的领域。
Asterisk数据库配置方案

Asterisk数据库配置方案Asterisk 之数据库配置方案一:硬件环境二台x86 PC一个Hub 或者 Switch一部外线虚拟电话(电话号码比如:82085471),一部SIP电话(内部设置分机号为:82081001)Asterisk卡(Open Vox A1200p)一条电话线(比如电话号码为82085498)接Asterisk卡二:软件环境二台x86 PC:PC1:安装Windows Xp Sp2。
XP下安装VM-5.5,并在VM中安装Fedora 9,在其中架设Sip Server,本项目使用kamailio。
PC2:安装Centos 5.3,并安装asterisk相关包,作为语音网关。
Asterisk包安装:asterisk-1.4.22.1.tar.gz : asterisk主程序包。
asterisk-addons-1.4.7.tar.gz :asterisk扩展包。
asterisk-sounds-1.2.1.tar.gz :asterisk 语音包。
openvox_zaptel-1.4.11.tar.gz :asterisk 卡驱动包。
libpri-1.4.2.tar.gz :PRI库三:软件安装PC1(192.168.1.199)Kamailio的安装:make clean./configuremake installPC2(192.168.1.200)安装顺序:libpri->openvox_zaptel->asterisk->asterisk-addons->asterisk-sounds安装前最好先把各个包放到/usr/src/目录下解压安装: libpri安装:tar xzvf libpri-1.4.2.tar.gzcd libpri-1.4.2.tar.gzmake cleanmakemake installopenvox_zaptel-1.4.11.tar.gz的安装:tar xzvf openvox_zaptel-1.4.11.tar.gzcd openvox_zaptel-1.4.11make clean./configuremakemake installasterisk-1.4.22.1.tar.gz 的安装:tar xzvf asterisk-1.4.22.1.tar.gzcd asterisk-1.4.22.1make clean./configuremakemake installmake samples //生成默认配置到/etc/asterisk下asterisk-addons-1.4.7.tar.gz 的安装:tar xzvf asterisk-addons-1.4.7.tar.gzcd asterisk-addons-1.4.7make clean./configuremakemake installcp configs/* /etc/asterisk/asterisk-sounds-1.2.1.tar.gz 的安装:tar xzvf asterisk-sounds-1.2.1.tar.gzcd asterisk-sounds-1.2.1make cleanmake install注意:安装完成后,需要先运行genzaptelconf生成默认的Zap通道的配置信息。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 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) 转下篇。