Asterisk安装与配置
《Asterisk 使用资料》
![《Asterisk 使用资料》](https://img.taocdn.com/s3/m/9e22250ac281e53a5802ff8e.png)
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的源代码文件中迷失了方向,不知所措。
FreePBX Asterisk服务器搭建
![FreePBX Asterisk服务器搭建](https://img.taocdn.com/s3/m/cf6901e5770bf78a6529546e.png)
服务器的安装
所有步骤参考
有以下几点需要注意
∙在开始安装之前,使用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,mysql,freepbx完整安装手册
![asterisk,mysql,freepbx完整安装手册](https://img.taocdn.com/s3/m/ba8ad5667ed5360cba1aa8114431b90d6c858912.png)
1 Install Asterisk server1.1 Install CentOS 5.3Description :CentOS is an Enterprise-class Linux Distribution derived from sources freely provided to the public by a prominent North American Enterprise Linux vendor. CentOS conforms fully with the upstream vendors redistribution policy and aims to be 100% binary compatible.●Need install Web Server , Mail Server , MySQL Database , Development Tools●Enable Web server, Mail server, MySql Database, Development tools.●Disable firewall, SElinux.●Config your network, make sure you can connect to the internet.1.2 Update your system#yum -y update1.3 Install dependencies and extra packages# yum 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-devel audiofile-devel libogg-devel openssl-devel mysql-devel zlib-devel perl-DateManip sendmail-cf1.4 Install lame-3.97Description :LAME is an educational tool to be used for learning about MP3 encoding. The goal of the LAME project is to use the open source model to improve the psycho acoustics, noise shapingand speed of MP3. LAME is not for everyone - it is distributed as source code only and requires the ability to use a C compiler. However, many popular ripping and encoding programs include the LAME encoding engine.# cd /usr/src# wget /sourceforge/lame/lame-3.97.tar.gz# tar zxvf lame-3.97.tar.gz# cd lame-3.97# ./configure# make# make install1.5 Install libpriDescription :libpri is a C implementation of the Primary Rate ISDN specification. It wasbased on the Bellcore specification SR-NWT-002343 for National ISDN. As ofMay 12, 2001, it has been tested work with NI-2, Nortel DMS-100, andLucent 5E Custom protocols on switches from Nortel and Lucent.# cd /usr/src# wget /pub/libpri/libpri-1.4-current.tar.gz# tar zxvf libpri-1.4-current.tar.gz# cd libpri-1.4.10/# make# make install1.6 Install mpg123The mpg123 is make for the “music on hold” module to up custom *.mp3 or *.wav file to PBX.#tar xvf mpg123-1.9.0.tar.bz2#./configure#make#make install1.7 Install Dahdi / Dahdi-toolsDescription :Dahdi is a short for ZAPata TELephony.This packet is the drive of the Digital Cards<E.G. TMD400P># cd /usr/src# download dahdi-linux-current.tar.gz dahdi-tools-current.tar.gz# tar zxvf dahdi-linux-2.2.0.2# cd zaptel-1.4.12.1# make# make install# cd .# . tar zxvf dahdi-tools-current.tar.gz# ./configure# make# make install# make config/etc/init.d/dahdi start# echo "/etc/init.d/dahdi start" >> /etc/rc.d/rc.local# dahdi_genconf //check the TDM400P board automatic#copy dahdi_channels.conf content to chan_dahdi.conf# dahdi_cfg –vv1.8 Install asterisk1.7.1 Install asterisk-1.6.1.4Description :Asterisk is the world's leading open source PBXi, telephony engine, and telephony applications toolkit. Offering flexibility unheard of in the world of proprietary communications, Asterisk empowers developers and integrators to create advanced communication solutions...for free.# cd /usr/src# useradd -c "Asterisk PBX" -d /var/lib/asterisk asterisk# mkdir /var/run/asterisk# mkdir /var/log/asterisk# chown -R asterisk:asterisk /var/run/asterisk# chown -R asterisk:asterisk /var/log/asterisk# chown -R asterisk:asterisk /var/lib/php/session/# sed -i "s/User apache/User asterisk/" /etc/httpd/conf/httpd.conf# sed -i "s/Group apache/Group asterisk/" /etc/httpd/conf/httpd.conf# sed -i "s/AllowOverride None/AllowOverride All/" /etc/httpd/conf/httpd.conf# download asterisk-1.6.1.4.tar.gz# tar zxvf asterisk/asterisk-1.6.1.4.tar.gz# cd asterisk-1.6.1.4# ./configure# make# make install# make samples# make config1.7.2 Install asterisk-addons-1.6.1.1Description :This package contains additional modules for Asterisk which are, for one reasonor another, not included in the normal base distribution. Many of thesemodules are experimental.# cd /usr/src# download asterisk-addons-1.6.1-current.tar.gz# tar zxvf asterisk-addons-1.6.1-current.tar.gz# cd asterisk-addons-1.6.1.1# ./configure# make# make install# make samples1.7.3 Install asterisk-soundsDescription :This packet is not for hardware dependency. It’s just the necessary packet (Include many sound file) for asterisk server.Download the packet asterisk-sounds-1.2.1.tar.gz# cd /usr/src# tar zxvf asterisk-sounds-1.2.1.tar.gz# cd asterisk-sounds-1.2.1# make install1.9 Install FreePBXDescription :FreePBX is for both developers and people searching for a Business Phone System (or a really fancy home one).# cd /usr/src# wget /sourceforge/amportal/freepbx-2.3.1.tar.gz# tar zxvf freepbx-2.5.0.tar.gz# cd freepbx-2.5.0# service httpd start# service mysqld start# chkconfig httpd on# chkconfig mysqld on1.9.1 Config MySql# mysqladmin create asterisk# mysqladmin create asteriskcdrdb# mysql asterisk < SQL/newinstall.sql# mysql asteriskcdrdb < SQL/cdr_mysql_table.sql# mysql# GRANT ALL PRIVILEGES ON asteriskcdrdb.* TO asteriskuser@localhost IDENTIFIED BY 'occvoip';# GRANT ALL PRIVILEGES ON asterisk.* TO asteriskuser@localhost IDENTIFIED BY 'occvoip';# mysqladmin -u root password 'occvoip'1.9.2 Install freepbx# vi /etc/asterisk/asterisk.conf++++++++++++++++++++++++++++++++Modify [directories](!) ==> [directories]Modify /var/run ==> /var/run/asterisk++++++++++++++++++++++++++++++++# cd /usr/src/freepbx-2.5.0# ./start_asterisk start# ./install_amp --username=asteriskuser --password=occvoip# echo /usr/local/sbin/amportal start >> /etc/rc.localOpen browser to http://ipaddressofpbx#Click the FreePBX Administration to config the FreePBX. Then click Apply configuration changes.Download modules.: click Module Admin to download this modules: Feature codeVoicemailPhonebook Directory toolPhonebookSpeed dialDay night modeIVRFollow meRing groupCall ForwardCall WaitingCallbackConferencesDo-Not-Disturb (DND)Info ServicesannouncementMisc ApplicationsMisc DestinationsMusic on HoldPIN SetsParking lotAsterisk Info toolCustom Applications tool# reboot1.10 Open browser to http://ipaddressofpbxClick the FreePBX Administration to config the FreePBX.以下是附加文档,不需要的朋友下载后删除,谢谢顶岗实习总结专题13篇第一篇:顶岗实习总结为了进一步巩固理论知识,将理论与实践有机地结合起来,按照学校的计划要求,本人进行了为期个月的顶岗实习。
asterisk+freepbx+astercrm的安装----lamp rpm安装
![asterisk+freepbx+astercrm的安装----lamp rpm安装](https://img.taocdn.com/s3/m/6dbecd69783e0912a2162aa1.png)
Linux下安装呼叫中心服务器(ASTERISK+FreePBX)一、环境要求:操作系统:centos 5.0以上(以最小化形式安装)Linux内核版本:2.6.22Asterisk版本:asterisk V.1.6.2.18FreePBX版本:FreePBX:2.9.0以rpm方式安装好的LAMP环境以root身份登录二、所需软件包/pub/telephony/asterisk/asterisk-1.6.2.1 8.tar.gz/freepbx-2.9.0.tar.gz三、安装步骤1、Lamp的安装下载所有软件包到/usr/local/src路径配置yum源,安装相关软件yum –y updateyum install –y httpd http-devel mysql mysql-devel mysql-server php php-devel php-mysqlyum install php5 php5-cli php5-mysql php-pear libapache2-mod-php5 php5-curl php5-gd php-dbyum install php php-mysql php-common php-gd php-mbstring php-mcrypt php-devel php-xmlyum install e2fsprogs-devel keyutils-libs-devel krb5-devel libogg libselinux-devel libsepol-devel libxml2-devel libtiff-devel gmpphp-pear php-pear-DB php-gd php-mysql php-pdo kernel-devel ncurses-devel audiofile-devel libogg-devel openssl-devel mysql-devel zlib-develperl-DateManip sendmail-cf soxyum install gcc gcc-c++ wget bison mysql-devel mysql-server php php-mysql php-pear php-pear-DB php-mbstring nano tftp-server httpd makencurses-devel libtermcap-devel sendmail sendmail-cf caching-nameserver sox newt-devel libxml2-devel libtiff-devel php-gd audiofile-develgtk2-devel subversion kernel-develyum install festival festival-devyum install ncurses-base ncurses-bin ncurses-term libncurses5 libncursesw5 libncurses5-dev libncursesw5-devyum install zlib1g zlib1g-devyum install bison bison-docyum install install libxml2 libxml2-devyum install libtiff4 libtiff4-devyum install libasound2 libgsm1 libltdl3 libpq4 libspeex1 libsqlite0 libtonezone1 libaudiofile0 libaudiofile-devyum install libnet-telnet-perl mime-construct libipc-signal-perl libmime-types-perl libproc-waitstat-perlmkdir /var/lib/mysqlchown –R mysql:mysql /var/lib/mysql/etc/init.d/httpd startchkconfig –level 35 httpd onmysql_install_dbchown –R mysql.mysql /var/lib/mysql/etc/init.d/mysqld startchkconfig –level 35 mysqld onmysqladmin –uroot password 123456 \\设置mysql密码为123456 cp /usr/share/doc/mysql-server-5.0.22/f /etc/f /etc/init.d/httpd restartvim /var/www/html/index.php测试一下:测试php连接apache : <? phpinfo(); ?>测试php连接mysql : vim /var/www/html/aaa.php<?php$link=mysql_connect("localhost","root","123456");if(!$link) echo "FAILD!";else echo "OK!";?>访问下即可。
标准ERP配置Asterisk服务器使用指南说明书
![标准ERP配置Asterisk服务器使用指南说明书](https://img.taocdn.com/s3/m/3dc077730a4c2e3f5727a5e9856a561253d32174.png)
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安装及配置](https://img.taocdn.com/s3/m/3690fe204b35eefdc8d33343.png)
Asterisk安装及配置
Asterisk配置
Created by Revised by
刘翔宇
Created Date Revised Date
2008-11-19
1 Asterisk配置 红色字体表示需要用户自行更改的,黑色字体表示可以直接使用的 配置文件在 /etc/asterisk/ 目录下 ① Zapata.conf配置 该文件并不会自动创建,需要手动增加 文件内容见附录2 ② SIP.conf 该文件描述了用户及其权限 ; SIP Configuration example for Asterisk [general] context=from-internal ; 默认的呼入处理的Context allowoverlap=no ; Disable overlap dialing support. (Default is yes) bindport=5060 ; UDP Port to bind to (SIP standard port is 5060) bindaddr=0.0.0.0 ; IP address to bind to (0.0.0.0 binds to all) srvlookup=yes ; Enable DNS SRV lookups on outbound calls [6001] type=friend secret=6001 qualify=yes nat=no host=dynamic canreinvite=no context=from-internal ③ IAX.conf 描述了IAX2协议的用户配置 [general] disallow=all allow=ulaw allow=alaw allow=gsm mailboxdetail=yes tos=ef
Asterisk系统的安装与配置
![Asterisk系统的安装与配置](https://img.taocdn.com/s3/m/4f5c8751312b3169a451a49c.png)
Asterisk系统的安装与配置一、安装包装备asterisk1.8.7.1.tar.gzdahdi-linux-complete-2.6.1+2.6.1.tar.gzdahdi是Asterisk管理硬件的插件(中间件)二、安装dahdi 安装时需要下载东西,所以需要互联网1.tar zxvf dahdi-linux-complete-2.6.1+2.6.1.tar.gz2.cd dahdi-linux-complete-2.6.1+2.6.13.make all4.make install5.make config ;生成启动脚本/etc/init.d/dahdi6./etc/init.d/dahdi restart ;启动dahdi7.chkconfig dahdi on ;检查编译DAHDI时CONFLICTING TYPES FOR ‘BOOL’解决办法,google上面有,说是linux版本宏引起的。
三、安装asterisk1.tar zxvf asterisk1.8.7.1.tar.gz2.cd asterisk1.8.7.13../configure --build=i3864.;指定安装路径 ./configure --prefix=/usr/local5.make menuselect ;在配置界面选中meete应用6.make ;编译7.make install 安装Asterisk8.make samples ;安装配置文件模版/etc/asterisk下9.make progdocs ;安装Asterisk程序文档10.asterisk 启动四、配置SIP通道默认语言 /etc/asterisk/sip.conf[general]language=cn/enbindaddr=0.0.0.0 服务器IP五、配置基本SIP账户 /etc/asterisk/sip.conf1.CLI命令sip show userssip show peerssip show settingssip set debug on/offsip reload2.分机号码模板[SIPPHONE](!)type=friend 呼入呼出均可host=dynamic 分机号注册时获取contex=geeyavoip ; 分机号呼入时使用的上下文extensions.conf中的上下文nat=no 不支持natqualify=20003.使用号码模板定义分机号[301](SIPPHONE) ;继承SIPPHONE模板username=301accountcode=301directrtpsetup=yes aster工作在proxy,不修改sdp实现rtp透传;secret=301 ;无需密码则注释掉这句;directmidia=yes 媒体穿越nat NAT=yes;canreinvite = yes 与上面一行等效的to disable re-invites if you had NAT=yes六、配置电话会议室 /etc/asterisk/meete.conf[rooms] ;会议室号将作为拨号计划中 meetme参数conf => 1001 ;定义会议室号1001,无密码conf => 1002,918 ;定义会议室密码为918备注:拨号计划中调用meetme函数时,将进入会议桥,如需要密码,系统将提示输入会议室密码。
Asterisk安装和配置
![Asterisk安装和配置](https://img.taocdn.com/s3/m/5bceea2e52d380eb62946de4.png)
1.安裝所需套件yum install gcc gcc-c++ kernel-devel zlib zlib-devel openssl openssl-devel2.下载asterisk、libpri、zaptelcd /usr/local/src/wgetwgetwget3.安装zapteltar -zxvf zaptel-.1.tar.gzcd /usr/local/src/zaptel-.1./configuremakemake installmodprobe zaptel4.安装libpritar -zxvf libpri-.tar.gzcd /usr/local/src/libpri-makemake install5.安装asterisktar -zxvf asterisk-.tar.gzcd /usr/local/src/asterisk-./configuremakemake installmake samplesasterisk -vvvc6.分机配置vim /etc/asterisk/sip.confSIP分机常用参数配置:[101] ;SIP分机注册账号callerid=ABC ;分机显示名称(可不设定)username=101 ;SIP再注册时要使用的账号(可不设定)type=friend ;连线的模式,一般话机设成friendsecret=101 ;分机注册密码qualify=yes ;验证模式,只有在type=peer时生效(可不设定)nat=yes ;是否在NAT下host=dynamic ;搜寻Client的模式,dynamic由话机主动去注册或者输入Hostname、IP由SIP Server去连线dtmfmode=rfc2833 ;按键信号模式,预设为rfc2833context=internal ;设定要用extensions.conf哪一组的动作canreinvite=no ;分机直通或由SIP连接callgroup=0 ;定义群组,可利用于群组广播....等(可不设定)pickupgroup=0 ;定义代接群组(可不设定)[102]username=102type=friendsecret=102qualify=yesnat=yeshost=dynamicdtmfmode=rfc2833context=internalcanreinvite=no7.设定接通动作vim /etc/asterisk/extensions.conf最后面加放设定[internal]exten => _X.,1,Dial(SIP/${EXTEN}|30) exten => _X.,n,Hangup()说明:_:代表开头X:代表0-9.:代表任意长度的字元_X.:电话以数字开始不限制长度Dial:接通SIP:线路模式SIP协议${EXTEN}:收到的号码30:只振玲等待30秒Hangup:挂断8.设定远端管理账号(依需求设定)vim /etc/asterisk/manager.confenabled = yes最后面增加[admin] secret=admin deny=.0/0.0.0.0 permit=127.0.0.1/255.255.255.0 read = system,call,log,verbose,command,agent,user write =system,call,log,verbose,command,agent,user用telnet localhost 5038到asterisk的管理界面出现Asterisk Call Manager/1.0输入action: login <enter>username: admin <enter>secret: admin <enter><e。
Asterisk安装
![Asterisk安装](https://img.taocdn.com/s3/m/cefa4edb84254b35eefd34fb.png)
work or play with MySQL more productive. There you can also find
information about mailing lists for MySQL discussion.
ln -s /opt/lampp/lampp K01lampp
安装
安装安装
安装Apache日志截断
日志截断日志截断
日志截断 # cd /usr/local/src
# wget /env/cronolog-1.6.2.tar.gz
files in the Docs directory.
Thank you for choosing MySQL!
编译
#make
安装
#make install
配置
# useradd mysql //添加 mysql 用户
# cd /program/mysql
# ./configure --prefix=/program/mysql --localstatedir=/var/lib/mysql --with-comment=Source
--with-server-suffix=-Community --with-mysqld-user=mysql --without-debug --with-big-tables
安装安装
安装Asterisk
检查是否安装成功
检查是否安装成功检查是否安装成功
检查是否安装成功 使用命令:asterisk –vvvvvvvvc启动asterisk服务,若已启动,则使用命令:asterisk –r进行
一步一步安装asteriskfreepbx
![一步一步安装asteriskfreepbx](https://img.taocdn.com/s3/m/92139a290242a8956aece40a.png)
一步一步安装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安装的全过程。
Asterisk安装指南
![Asterisk安装指南](https://img.taocdn.com/s3/m/9ce5712e453610661ed9f4cd.png)
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复制到这里,注意设置对应权限。
centos6安装asterisk(TDM400P+WIFIPhone)
![centos6安装asterisk(TDM400P+WIFIPhone)](https://img.taocdn.com/s3/m/a1b6dc6e814d2b160b4e767f5acfa1c7aa008281.png)
centos6安装asterisk(TDM400P+WIFIPhone)TDM400P是Digium公司出品的4端口模拟语音卡,电脑加上卡之后就能实现模拟语音网关的功能。
此卡在国内山寨的很多,taobao上到处都是。
asterisk则是一个免费开源的sip服务器。
最近在taobao山买了一块山寨卡,参考了网上众多的资料之后。
配合asterisk实现了模拟线和wifi手机之间的通话功能。
硬件安装买来的TDM400P是带2个FXO端口,2个FXS端口的。
黄色的模块是FXS模块。
黑色的模块是FXO模块。
这些模块其实都是可以拆卸的,可以灵活组合。
FXS的S就是station的意思。
表示一个站点,其实就电话机。
简称S口。
FXO的O就是Office的意思。
表示一个局端,相当于电话局给你提供的端口。
简称O口。
所以O口出来的线是要插到电话机上的。
S口是用来替换电话机的。
不要接错哦。
卡的右下角还有个4芯的D型电源插口,记得在安装卡的时候顺手把电源给接上。
否则是听不到拨号音的。
另外TDM400P这块卡只支持PCI2.2以上规格的插槽(只要不是特别老的主板,应该不会有问题)。
软件安装在centos下有2种方式可以安装:A.rpm包安装先添加Asterisk和Digium的Repositories# vi /etc/yum.repos.d/CentOS-Asterisk.repo[asterisk-tested]name=CentOS-$releasever - Asterisk - Testedbaseurl=/centos/$releasever/tested/$ basearch/enabled=0gpgcheck=0#gpgkey=/RPM-GPG-KEY-Digium[asterisk-current]name=CentOS-$releasever - Asterisk - Currentbaseurl=/centos/$releasever/current/ $basearch/enabled=1gpgcheck=0/admin/post.php?id=13 &upd=1#gpgkey=/RPM-GPG-KEY-Digium# vi /etc/yum.repos.d/CentOS-Digium.repo[digium-tested]name=CentOS-$releasever - Digium - Testedbaseurl=/centos/$releasever/tested/$ basearch/enabled=0/admin/post.php?id=13&u pd=1gpgcheck=0#gpgkey=/RPM-GPG-KEY-Digium[digium-current]name=CentOS-$releasever - Digium -Currentbaseurl=/centos/$releasever/current/$basearch/enabled=1gpgcheck=0#gpgkey=/RPM-GPG-KEY-Digium执行命令安装# yum install dahdi-linux dahdi-tools asterisk16 asterisk16-configs# chkconfig asterisk on用这种方法安装目前只能安装到asterisk1.6版。
Asterisk pbx系统安装配置手册 1.0
![Asterisk pbx系统安装配置手册 1.0](https://img.taocdn.com/s3/m/8fb0c1fc770bf78a6529549e.png)
Asterisk pbx系统安装配置手册1.0一:系统及安装包选择1.1操作系统: CentOS。
必须选上mysql相关的所有选项,其他的按照默认即可。
由于安装asterisk-addons中需要使用mysqlclient,需要另外安装一个mysql-devel-5.0.37-2.fc7.i386.rpm,否则会有无法找到mysql.h的错误。
安装方法:rpm -ivh mysql-devel-5.0.37-2.fc7.i386.rpm.至此,系统平台搭建完毕,基于此系统下,以后的编译一般不会有问题。
1.2 asterisk相关包主程序: asterisk-1.4.11会议定时相关: zapatel-1.4.5.1以及 asterisk-addons-1.4.2,asterisk-sounds-1.2.1,asteriskgui,astbill-0.9.22.1.2.1 zaptel-1.4.5.1安装Zaptel的安装必须在主程序之前,这样在编译主程序的时候就能够找到ztdummy,才能够选择编译会议相关功能。
进入zaptel目录:-Make clean-./configure-Make menuselect这里记得选上Kernel Modules中的全部选项,其他的采用默认选项。
-make-make install.1.2.2 asterisk-1.4.11安装进入asterisk目录:-make clean-./configure-make menuselectApplication中的全部选中,Dialplan Functions除odbc相关其他能选的全部选上,其余默认。
-make-make install-make samplesAsterisk-addons和asterisk-sounds的安装基本差不多。
1.2.3 asteriskgui 安装/svn/asterisk-gui/trunk gui源码获取。
Asterisk配置文件说明
![Asterisk配置文件说明](https://img.taocdn.com/s3/m/b12502bc960590c69ec3760f.png)
关于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安装调试文档
![asterisk安装调试文档](https://img.taocdn.com/s3/m/aa4411196c175f0e7cd137d4.png)
Asterisk安装:安装命令: yum instll asterisk这个命令安装的普通的release版本如果需要调试:到SVN下载asterisk-1.8.8.1上传到虚拟机上执行./configure --配置makefile文件Make --编译asteriskMake install --安装asteriskAsterisk一般配置用户配置:用户是在数据库中配置的相关配置文件:1.extconfig.conf,配置用户数据来源sipusers => mysql,global,soc_pbx_users;sippeers => mysql,general,soc_pbx_users;mysql:固定,是指用户加载方式general:对接res_mysql.conf的数据库连接配置soc_pbx_users:用户所在的表2.res_mysql.conf配置数据库连接串[general]dbhost = 10.1.18.105数据库地址dbname = asterisk 数据库表空间dbuser = asterisk 数据库用户名dbpass = asterisk 数据库密码dbport = 3306 数据库端口话单配置: 如不需要话单,可以不配置该项配置文件:cdr_mysql.conf配置项:[general] 和extconfig.conf中配置对应dbhost = 10.1.18.105数据库地址dbname = asterisk 数据库表空间dbuser = asterisk 数据库用户名dbpass = asterisk 数据库密码dbport = 3306 数据库端口[produre] 标志调用存储过程配置项produrename=p_insert_record存储过程名次paraNum=7 存储过程参数paraname1=src 下面是存储过程参数列表,值需要对应cdr的关键字paraname2=dstparaname3=dcontextparaname4=clidparaname5=channelparaname6=dstchannel拨号方案配置:[default-test] --对应USER表中的context字段exten => _XXX.,1,Set(CALLFILENAME=${CALLERID(num)}_${EXTEN}_${UNIQUEID})exten => _XXX.,n,Dial(SIP/${EXTEN},10,m)exten => _XXX.,n,Hangup()运行命令: service asterisk start 开始Service asterisk stop 停止Service asterisk restart 重启调试步骤:1.执行gdb asterisk2.由于涉及到动态库调用,在asterisk主程序中可能没有涉及到所需要调试的代码,所以需要先预先找到所涉及的代码路径,代码文件名称,需要断点的行数执行 b chan_sip.c:20333 b 是break简称chan_sip.c文件名20333行号可能会提示:No source file named chan_sip.c.Make breakpoint pending on future shared library load? (y or [n])选y执行info break可以看到当前断点列表,如下Num Type Disp Enb Address What1 breakpoint keep y <PENDING> chan_sip.c:203333.运行程序Run -vvvvvvvvg -vvvvvvg是程序运行阐述4.使用软终端调用服务,确保调用流程可以走到所设立的断点处Gdb命令N单步执行C 执行到下一个断点,如果只有一个断点,直接走完liucS 进入到函数中执行Bt 查看进程调用堆栈,可以直观的看到程序调用路径P变量名限制变量的值一.ASTERISK各个模块功能介绍:内核模块内部核心由以下六个部分组成:PBX交换核心模块(PBX Switching Core)、调度和I/O管理模块(Scheduler and I/O Manager)、应用调用模块(Application Launcher)、编解码转换模块(Codec Translator)、动态模块加载器模块(Dynamic Module Loader)和CDR生成模块(CDR Core)。
asterisk下安装H323
![asterisk下安装H323](https://img.taocdn.com/s3/m/ce7e16addd3383c4bb4cd225.png)
asterisk下安装H323最好把需要解压得文件放在/usr/src下面1、下载安装OpenH323及支持库PwLib/sourceforge/openh323/pwlib-v1_9_0-src-tar.gztar zxvf pwlib-v1_9_0-src-tar.gzcd pwlib_v1_9_0/./configuremakemake installmake opt/sourceforge/openh323/openh323-v1_17_1-src-tar.gz tar zxvf openh323-v1_17_1-src-tar.gzcd openh323_v1_17_1/./configuremakemake opt2、编译安装Asterisk H.323 channel设置环境变量PWLIBDIR=/usr/src/pwlib_v1_9_0(根据你的这个目录下的pwlib的文件夹名字而定)export PWLIBDIROPENH323DIR=/usr/src/openh323_v1_17_1/(根据你的这个目录下的openh323的文件夹名字而定)export OPENH323DIRLD_LIBRARY_PATH=$PWLIBDIR/lib:$OPENH323DIR/libexport LD_LIBRARY_PATH (此步至关重要,在linux 2.4 中可以不用这一步,但是在linux.2.6中,必须要这一步。
不然ASTERISK 不能启动。
)编译安装cd /usr/src/asterisk-1.2.6(根据你的asterisk文件夹名而定)/chnnels/h323/makemake optcd ..cd ..make install3、安装后步骤把生成的库复制到全局cp /usr/local/lib/* /usr/lib确定channel是否存在,检验安装是否成功ldd /usr/lib/asterisk/modules/chan_h323.so(如果找到了chan_h323.so并且运行则表示成功,如未找到,这表示安装过程出现了问题)4、配置(1)修改extension.conf(2)vi /etc/asterisk/extension.conf在[default]节添加:exten => _1XXX,1,Dial(H323/${EXTEN}) <========这里_1XXX和下面的_1XXX可以替换为你自己想用的号码段,并在稍后h323.conf的设置中注意号码段的命名exten => _1XXX,3,Hangup;假设我们用的号码是以1为起始的四位号码(3)复制h323.conf(4)cp/usr/src/asterisk-1.2.6/chnnels/h323/h323.conf.sample /etc/asterisk/h323.conf(注意,第一个asterisk目录的名字根据你的asterisk名字而定,第二个asterisk的名字则是默认) (3) 修改h323.confvi /etc/asterisk/h323.conf文件最后加上:[1999] <======参考extensions.conf中定义改成自己想用号码type=friendusername=1999host=<你的本机ip,否则在运行asterisk的时候会出错> context=default在[general]修改:加上disallow=all注释去掉allow=all注释5、 启动asteriskasterisk –vvvvvvvvvcg搞定。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
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
注:很多包在安装光盘中都有,不需要再下载。
2、Asterisk安装步骤
#
cd /usr/src/asterisk-version ;进入源代码目录
#
make clean ;清理生成的文件
Asterisk安装与配置
1、安装Asterisk依赖包清单
包--依赖关系
gcc--libpri, zaptel, asterisk
ncurses-devel--munuselect
libtermcap-devel--asterisk
kernel-devel--zaptel
在拨号方案中加入语音邮箱
extensions.conf:
[test]
exten
=> 1001,1,Dial(SIP/1001)
exten
=> 1001,2,VoiceMial(1001)
为用户定义邮箱
sip.conf:
[1001]
mailbox
= 1001@test
重新加载配置后,客户端X-Lite界面上就会出现一个信封的标志,表示语音邮箱设置成功。
需要添一下邮箱。
Asterisk
与
Aaya
通话可参考
/2008/04/howto-connect-avaya-to-asterisk.html
注:建议使用Default项,使用其它项会出现问题,导致拨不出去。
5、Astersk管理
登录到Astersk服务器运行控制台:
astersk -crvvv
查看登录用户
: sip shwo
peers
查看详细记录:
sip show
peer 1001
重新加载拨号方案:dialplan
reload
重新加载SIP方案:sip
reload
6、语音邮箱简易设置
注册语音邮箱,在voicemail.conf中添加用户的语音邮箱和密码
voicemail.conf:
[test]
1001
#
./configure ቤተ መጻሕፍቲ ባይዱ ;配置
#
make menuselect ;选择要安装的模块
#
make install ;安装Asterisk
sip.conf
[general]
allowoverlap=no
bindport=5060
bindaddr=0.0.0.0
srvlookup=yes
qualify=yes
context=test
[1001]
type=friend
secret=test
host=dynamic
[1002]
type=friend
secret=test
host=dynamic
extensions.conf
添加:
[test]
exten
=> 1001,1,Dial(SIP/1001)
exten
=> 1002,1,Dial(SIP/1002)
4、客户端配置(X-Lite)
MENU
-> System Settings -> SIP Proxy -> Default
7、其它
按照上面的配置,软电话应该就可以通话了。
X-Lite是多平台的客户端,包括Windows、Linux、Mac。下载地址:
/x-lite.html