asterisk workshop 2011
DESCRIPTION
Asterisk Workshop Guide 2011, asterisk 1.8 complete installation on Ubuntu 10.04.2 LTSTRANSCRIPT
![Page 1: Asterisk Workshop 2011](https://reader034.vdocument.in/reader034/viewer/2022051515/54fe3e1b4a7959f4248b4dbf/html5/thumbnails/1.jpg)
AsterConference Jakarta 2011By
Anton Raharja
![Page 2: Asterisk Workshop 2011](https://reader034.vdocument.in/reader034/viewer/2022051515/54fe3e1b4a7959f4248b4dbf/html5/thumbnails/2.jpg)
Basic of Linux Operating System◦ Ubuntu Server preparation and installation
Network card configuration
About Asterisk and DAHDI
![Page 3: Asterisk Workshop 2011](https://reader034.vdocument.in/reader034/viewer/2022051515/54fe3e1b4a7959f4248b4dbf/html5/thumbnails/3.jpg)
Using Ubuntu Server 10.04.2 LTS◦ Install properly for ISO (burn to a CD)◦ Configure correct hostname, username and IP◦ Configure proper disk partitions Use 1 GB for SWAP
Use 10 GB at most for /
Use just about enough for /home
Use the rest of the space for /var
◦ Select nothing but OpenSSH server as a start◦ Prepare development environment
# apt-get update
# apt-get install build-essential linux-headers-`uname –r` libnewt-dev libusb-dev libncurses5-dev libmysqlclient15-dev libxml-dev libmpg123-dev zlib1g-dev
![Page 4: Asterisk Workshop 2011](https://reader034.vdocument.in/reader034/viewer/2022051515/54fe3e1b4a7959f4248b4dbf/html5/thumbnails/4.jpg)
Linux CLI (Command Line Interface)◦ List : ls, lsmod, lsusb, lspci
◦ Process : ps, top
◦ Files : cd, cp, mv, rm, ln
◦ Read : cat, grep, tee, tail, more, less
◦ Editor : vi, mc, mcedit, nano
![Page 5: Asterisk Workshop 2011](https://reader034.vdocument.in/reader034/viewer/2022051515/54fe3e1b4a7959f4248b4dbf/html5/thumbnails/5.jpg)
Use single or multiple network cards
Each may have lots of virtual IPs
Linux treats all IPs, virtual or physical, pretty much the same
Configure proper IP, route and DNS◦ IP configurations in file /etc/network/interfaces
◦ DNS configurations in file /etc/resolv.conf
![Page 6: Asterisk Workshop 2011](https://reader034.vdocument.in/reader034/viewer/2022051515/54fe3e1b4a7959f4248b4dbf/html5/thumbnails/6.jpg)
Asterisk, an IP PBX software◦ Supports multi-protocol: SIP, IAX2, H.323, and
others
◦ Supports multi-codec: G711, G729, H264, and others
◦ Supports various standard PBX features
◦ Supports CTI
◦ Website: http://www.asterisk.org
![Page 7: Asterisk Workshop 2011](https://reader034.vdocument.in/reader034/viewer/2022051515/54fe3e1b4a7959f4248b4dbf/html5/thumbnails/7.jpg)
Digium/Asterisk Hardware Device Interface◦ Open source device interface used to control
Digium and other telephony interface cards
◦ When you need to use voice cards with Asterisk, you need DAHDI. Or vendors drivers
◦ Most vendors used DAHDI or slightly modified DAHDI version
![Page 8: Asterisk Workshop 2011](https://reader034.vdocument.in/reader034/viewer/2022051515/54fe3e1b4a7959f4248b4dbf/html5/thumbnails/8.jpg)
Pre-requisites for DAHDI
Pre-requisites for Asterisk
Asterisk installation from source codes
Basic Asterisk administration
![Page 9: Asterisk Workshop 2011](https://reader034.vdocument.in/reader034/viewer/2022051515/54fe3e1b4a7959f4248b4dbf/html5/thumbnails/9.jpg)
Get dahdi-linux-complete 2.4.1.2 from http://www.asterisk.org
PRI device requires libpri (1.4.11.5), get it also from http://www.asterisk.org
Extract, compile and install libpri first
Extract, compile and install dahdi-linux-complete
Installation process will download firmware files from Internet
![Page 10: Asterisk Workshop 2011](https://reader034.vdocument.in/reader034/viewer/2022051515/54fe3e1b4a7959f4248b4dbf/html5/thumbnails/10.jpg)
Get latest asterisk 1.8.4.3 from http://www.asterisk.org
Extract, compile and install asterisk◦ Sounds are downloaded from installation script
◦ Add-ons are configured from installation script
◦ Installation process will download sound files and some other libraries (iLBC and MP3 if selected) from Internet
![Page 11: Asterisk Workshop 2011](https://reader034.vdocument.in/reader034/viewer/2022051515/54fe3e1b4a7959f4248b4dbf/html5/thumbnails/11.jpg)
LibPRI◦ # tar –zxf libpri-1.4.11.5.tar.gz◦ # cd libpri-1.4.11.5◦ # make && make install
DAHDI Linux Complete◦ # tar –zxf dahdi-linux-complete.-2.4.1.2tar.gz◦ # cd dahdi-linux-complete-2.4.1.2◦ # make◦ # make install◦ # make config
Asterisk◦ # tar –zxf asterisk-1.8.4.3.tar.gz◦ # cd asterisk-1.8.4.3◦ # ./configure◦ # make menuconfig◦ # make◦ # make install◦ # make samples
![Page 12: Asterisk Workshop 2011](https://reader034.vdocument.in/reader034/viewer/2022051515/54fe3e1b4a7959f4248b4dbf/html5/thumbnails/12.jpg)
Asterisk configuration files
Asterisk context
SIP and IAX2 account
![Page 13: Asterisk Workshop 2011](https://reader034.vdocument.in/reader034/viewer/2022051515/54fe3e1b4a7959f4248b4dbf/html5/thumbnails/13.jpg)
Asterisk folders◦ /etc/asterisk
◦ /var/spool/asterisk
◦ /var/log/asterisk
◦ /var/lib/asterisk
◦ /usr/lib/asterisk
Configuration files◦ All configuration files are inside /etc/asterisk
Dialplans : extensions.conf
Accounts : sip.conf, iax.conf
Voicemail : voicemail.conf
![Page 14: Asterisk Workshop 2011](https://reader034.vdocument.in/reader034/viewer/2022051515/54fe3e1b4a7959f4248b4dbf/html5/thumbnails/14.jpg)
Contexts are the heart of asterisk configurations
Context is a grouping label for a set of options
Context may have multiple interpretation, it is depend on where the context reside◦ In sip.conf contexts are accounts◦ In extensions.conf contexts are group of dialplans
Context format:[context]
option=value
option=value
…
…
![Page 15: Asterisk Workshop 2011](https://reader034.vdocument.in/reader034/viewer/2022051515/54fe3e1b4a7959f4248b4dbf/html5/thumbnails/15.jpg)
SIP accounts are configured in sip.conf IAX2 accounts are configured in iax.conf Context format are used to define a peer, a user or a
friend Account type peer are defining trunks, the other end is a
gateway or not a user Account type user are defining the other end is a user
agent (UA). UA will be registered to our asterisk Account type friend are defining both a peer and a user Example:
[voiprakyat]username=10001secret=mypwd123type=peercontext=from-trunk
![Page 16: Asterisk Workshop 2011](https://reader034.vdocument.in/reader034/viewer/2022051515/54fe3e1b4a7959f4248b4dbf/html5/thumbnails/16.jpg)
Dialplan
Asterisk console
Logging and debugging
![Page 17: Asterisk Workshop 2011](https://reader034.vdocument.in/reader034/viewer/2022051515/54fe3e1b4a7959f4248b4dbf/html5/thumbnails/17.jpg)
Configuration file: /etc/asterisk/extensions.conf
Each context is a group of dialplan sets
Format:[context]
exten = extension,priority,command
Example:[from-trunk]
exten = _9X.,1,Dial(DAHDI/g0/${EXTEN:1})
![Page 18: Asterisk Workshop 2011](https://reader034.vdocument.in/reader034/viewer/2022051515/54fe3e1b4a7959f4248b4dbf/html5/thumbnails/18.jpg)
Entering asterisk console:◦ Type on Linux console: asterisk -r
Asterisk console commands:◦ System commands: core stop now core stop when convenient core restart now core restart when convenient Core show channels help
◦ SIP commands: sip show peer <peer/ext. number> sip show user <user/ext. number> sip show peers sip show users sip set debug <options>
![Page 19: Asterisk Workshop 2011](https://reader034.vdocument.in/reader034/viewer/2022051515/54fe3e1b4a7959f4248b4dbf/html5/thumbnails/19.jpg)
Configuration file: /etc/asterisk/logger.conf◦ Remove comment mark in front of ‘full’ line for full
log messages
Log files: /var/log/asterisk
Realtime debugging◦ # tail –f /var/log/asterisk/full | tee x1.log
◦ Save x1.log for later reviews, or send it to experts when you need to
![Page 20: Asterisk Workshop 2011](https://reader034.vdocument.in/reader034/viewer/2022051515/54fe3e1b4a7959f4248b4dbf/html5/thumbnails/20.jpg)
Thank you