









Estude fácil! Tem muito documento disponível na Docsity
Ganhe pontos ajudando outros esrudantes ou compre um plano Premium
Esta página não é visível na pré-visualização
Não perca as partes importantes!










Copyright ©2012 Digium, The Asterisk Company
Asterisk is an open source framework for building communications applications. Asterisk turns an ordinary computer into a communications server. Asterisk powers IP PBX systems, VoIP gateways, conference servers and more. It is used by small businesses, large businesses, call centers, carriers and governments worldwide. Asterisk is free and open source. Asterisk is sponsored by Digium, the Asterisk Company. Asterisk is “under the hood” in countless voice communications applications and is capable of interfacing with many traditional Telcom protocols, VoIP protocols, and codecs. Asterisk provides a staggering list of capabilities and features including:
IVR ACD Audio and Video Conferencing Voicemail Call Recording Fax termination CDR
This guide provides step-by-step instructions for compiling and installing Asterisk. Also included are basic instructions on controlling Asterisk via its Command Line Interface, or CLI. Sample Asterisk configuration and SIP soft-phone configuration will also be presented. This will culminate in your ability to dial over the internet using the IAX2 protocol to Digium.
For further reading, a wealth of resources including information on Commercial Support provided by Digium, The Asterisk Company can be found at:
NOTE: Any server accessible from the public Internet should be security hardened, and an Asterisk is no exception. General security best practices are not within the scope of this Quick Start Guide; however you may see Table 2 for default IP ports utilized by Asterisk.
Instructions are provided for the Long Term Support (LTS) version of Asterisk, which is currently 1.8.
Copyright ©2012 Digium, The Asterisk Company
The table below contains the default installation paths for Asterisk component files and libraries. This is not an exhaustive list, only the core components relative to this Quick Start Guide are listed:
Table 1 Default Installation Paths
Path Description /etc/asterisk Configuration files /usr/sbin Location of binary executable /var/log/asterisk message(error) logs and CDR /usr/lib/asterisk/modules Component module libraries
Protocol Port number Transport SIP 5060/5061 TCP/UDP IAX2 4569 UDP MGCP 2727 UDP SCCP 2000 TCP RTP 10,00 – 20,000 UDP Manager 5038 TCP H323 1720 TCP Dundi 4520 UDP Unistim 5000 UDP
Asterisk can run on multiple base architectures including embedded systems and there are no strict requirements on CPU speed or memory size. This document assumes the use of a standard x86 based processor.
Asterisk can run on a number of Operating Systems. Linux is the only officially supported OS, and it is recommended to use a 2.6.25 or higher kernel (although Asterisk will run on 2. kernels). A current and supported release of distributions such as CentOS or Debian is recommended.
An Internet connection is also required.
Copyright ©2012 Digium, The Asterisk Company
The previous command ‘ make samples ’ created sample configuration files in the default directory ‘ /etc/asterisk/ ’. The commands below show how to create backups of some of these files and how to create new simplified configuration for demo or testing purposes.
root@localhost:/user/src/asterisk-1.8.16.0# root@localhost:/etc/asterisk# mv modules.conf modules.conf.sample root@localhost:/etc/asterisk# mv extensions.conf extensions.conf.sample root@localhost:/etc/asterisk# mv sip.conf sip.conf.sample root@localhost:/etc/asterisk# mv iax.conf iax.conf.sample
root@localhost:/usr/src/asterisk-1.8.16.0# ./configure root@localhost:/usr/src/asterisk-1.8.16.0# make root@localhost:/usr/src/asterisk-1.8.16.0# make install root@localhost:/usr/src/asterisk-1.8.16.0# make samples
root@localhost:/usr/src# cd /asterisk-1.8.16. root@localhost:/usr/src/asterisk-1.8.16.0# ./contrib/scripts/install_prereq
Copyright ©2012 Digium, The Asterisk Company
root@localhost:/etc/asterisk# gedit modules.conf
[modules] autoload=no load=pbx_config.so load=chan_sip.so load=chan_iax2.so load=res_rtp_asterisk.so load=app_hangup.so load=app_dial.so load=codec_ulaw.so load=codec_gsm.so
root@localhost:/etc/asterisk# gedit extensions.conf
[default] exten => _.,1,Hangup()
[demo] exten => 2600,1,Dial(IAX2/[email protected]/s@default) same => n,Hangup()
Copyright ©2012 Digium, The Asterisk Company
There are myriad freely available VoIP clients. The soft-phone used in this example, Zoiper, is available for Linux, Windows, and Mac OS. No preference or endorsement is implied. The instructions provided are for Linux only.
root@localhost:/etc/asterisk# cd /usr/src root@localhost:/usr/src# wget http://www.zoiper.com/downloads/free/linux/zoiper219-linux.tar.gz root@localhost:/usr/src# tar – zxvf zoiper219-linux.tar.gz
root@localhost:/usr/src# ./zoiper
Copyright ©2012 Digium, The Asterisk Company
Copyright ©2012 Digium, The Asterisk Company
Copyright ©2012 Digium, The Asterisk Company
Copyright ©2012 Digium, The Asterisk Company
Copyright ©2012 Digium, The Asterisk Company
You are now be able to place a test call. Dial the configured extension ‘ 2600 ’ from the soft- phone. This will dial to a Digium server using the IAX2 protocol and you will hear Digium’s main IVR menu.
You now have a running Asterisk server and a configured phone, as well as sample configuration. The extent of what you can do with Asterisk is only limited by your imagination!
root@localhost:/usr/src# asterisk root@localhost:/usr/src#
Copyright ©2012 Digium, The Asterisk Company
asterisk – x
This will issue a valid CLI command to Asterisk and provide the standard output to the Terminal. This should be immediately followed by the CLI command in quotes e.g. ‘ asterisk –x “sip show peers” ’
core show help
lists valid CLI commands.
core restart now
Immediately restarts Asterisk. You will exit the CLI and be returned to the Linux prompt.
core stop now
Immediately stops Asterisk. You will exit the CLI and be returned to the Linux prompt.
sip show peers
Lists all configured SIP devices. The output includes the account name used for a given device and its IP address.
dialplan show
Displays all of the active (in memory) dialplan. This includes, but is not limited to, the configuration contained in ‘ /etc/asterisk/extensions. conf’.