Installing Asterisk Carl Davis Chief Architect Stellar System








![Building Zaptel • cd /usr/src/zaptel-* • make clean [root@stellar zaptel-1. 2. 2]# make clean Building Zaptel • cd /usr/src/zaptel-* • make clean [root@stellar zaptel-1. 2. 2]# make clean](https://slidetodoc.com/presentation_image_h2/d41c4e02fca835e06503a03ae9a6cdc6/image-9.jpg)
![Building libpri • • cd /usr/src/libpri-* make clean • • [root@stellar zaptel-1. 2. 2]# Building libpri • • cd /usr/src/libpri-* make clean • • [root@stellar zaptel-1. 2. 2]#](https://slidetodoc.com/presentation_image_h2/d41c4e02fca835e06503a03ae9a6cdc6/image-10.jpg)




![Starting Asterisk • [root@stellar asterisk-1. 2. 2]# asterisk -vvvc == Parsing '/etc/asterisk. conf': Found Starting Asterisk • [root@stellar asterisk-1. 2. 2]# asterisk -vvvc == Parsing '/etc/asterisk. conf': Found](https://slidetodoc.com/presentation_image_h2/d41c4e02fca835e06503a03ae9a6cdc6/image-15.jpg)



- Slides: 18
Installing Asterisk Carl Davis Chief Architect, Stellar System Technologies Alex Vishnev Chief Technical Officer, ACN
PREREQUISITES • Asterisk distribution – asterisk-1. 2. 3. tar provides SIP based Vo. IP • Zaptel library – zaptel-1. 2. 2. tar Digium hardware support • PRI library – libpri-1. 2. 2. tar supports ISDN PRI interfaces • Asterisk Sounds distribution – asterisk sounds 1. 1. 1. tar provides professionally recorded prompts for use in your asterisk system.
PREREQUISITES • Linux distribution – Red. Hat Fedora Core (used in this presentation) – Debian – Su. SE – Gentoo – Slackware – Free. BSD – And many more…
PREREQUISITES • • GNU Compiler Collection (GCC), v 3. 0 or higher Make and bison – comes with most systems C library headers – glibc-devel package Curses graphics library – ncurses-devel package Secure Socket library – openssl-devel Zlib Compression library – zlib-devel Newt Windowing Toolkit – libnewt-devel for use with zttool and ztcfg, very useful utilities • Doxygen documentation tool - doxygen
PREREQUISITES • Root login permissions • Local or remote terminal console – telnet sessions work fine as long as the server allows root login from a telnet session. • General Knowledge of Linux commands – tar, vi, emacs, pico, etc, ftp and other administrative commands
PREREQUISITES • Now, with all that said, you really don’t need knowledge of all that. Get the book “Asterisk: The Future of Telephony” from asteriskdocs. org, go to chapter 3 and type in each thing they have written. When you get into trouble, go to the Asterisk wiki at voipinfo. org. You haven’t done anything that someone else hasn’t already done. If you have, try for a prize . Ready to Start?
Obtaining the Source Code • • FTP from asterisk. org These generally resolve to ftp. digium. com Mirror sites are available Current stable version of Asterisk is 1. 2. 3(01/26/2006) Asterisk 2. 0 is in beta The transfer supplies “tarballs”, tar. gz files containing source archives Refer to asterisk. org for source code access via the Subversion source control system
Extracting the Source Code • • • Copy the tar. gz archives into /usr/src Change directory to /usr/src Extract the source code from the archives – tar zxvf zaptel-*. tar. gz – tar zxvf libpri-*. tar. gz – tar zxvf asterisk-*. tar. gz • The files will be extracted into their respective directories.
Building Zaptel • cd /usr/src/zaptel-* • make clean [root@stellar zaptel-1. 2. 2]# make clean – rm -f torisatool makefw tor 2 fw. h radfw. h – rm -f ztcfg torisatool makefw ztmonitor ztspeed zttool zttest fxotune – rm -f *. o ztcfg tzdriver sethdlc-new • make [root@stellar zaptel-1. 2. 2]# make – cc -I. -O 4 -g -Wall -DBUILDING_TONEZONE -DSTANDALONE_ZAPATA DZAPTEL_CONFIG="/etc/zaptel. conf" -c -o gendigits. c – cc -o gendigits. o -lm –. /gendigits – ZAPTELVERSION="" build_tools/make_version_h > version. h. tmp – if cmp -s version. h. tmp version. h ; then echo; else – mv version. h. tmp version. h ; • make install
Building libpri • • cd /usr/src/libpri-* make clean • • [root@stellar zaptel-1. 2. 2]# cd. . /libpri-* [root@stellar libpri-1. 2. 2]# make clean – – rm -f *. o *. so *. lo *. so. 1. 0 rm -f testprilib libpri. a libpri. so. 1. 0 rm -f pritest pridump rm -f. depend • make – – – – CC=gcc -prototypes -Wmissing -prototypes -g `ls CC=gcc. /mkdep -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes `ls *. c` gcc -Wall -Werror -prototypes -Wmissing -prototypes -g -c -o copy_string. c -Werror -Wstrict-prototypes -Wmissing-prototypes gcc -Wall -Werror -prototypes -Wmissing -prototypes -g -c -o pri. c -Werror -Wstrict-prototypes -Wmissing-prototypes gcc -Wall -Werror -prototypes -Wmissing -prototypes -g -c -o q 921. c -Werror -Wstrict-prototypes -Wmissing-prototypes gcc -Wall -Werror -prototypes -Wmissing -prototypes -g -c -o prisched. c -Werror -Wstrict-prototypes -Wmissing-prototypes gcc -Wall -Werror -prototypes -Wmissing -prototypes -g -c -o q 931. c -Werror -Wstrict-prototypes -Wmissing-prototypes gcc -Wall -Werror -prototypes -Wmissing -prototypes -g -c -o pri_facility. c -Werror -Wstrict-prototypes -Wmissing-prototypes ar rcs libpri. a copy_string. o pri. o q 921. o prisched. o q 931. o pri_facility. o CC=gcc -prototypes -Wmissing -prototypes -g `ls CC=gcc. /mkdep -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes `ls *. c` gcc -Wall -Werror -prototypes -Wmissing -prototypes -g -c -o copy_string. c -Werror -Wstrict-prototypes -Wmissing-prototypes gcc -Wall -Werror -prototypes -Wmissing -prototypes -g -c -o pri. c -Werror -Wstrict-prototypes -Wmissing-prototypes gcc -Wall -Werror -prototypes -Wmissing -prototypes -g -c -o q 921. c -Werror -Wstrict-prototypes -Wmissing-prototypes gcc -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes -g -c -o prisched. c gcc -Wall -Werror -prototypes -Wmissing -prototypes -g -c -o q 931. c -Werror -Wstrict-prototypes -Wmissing-prototypes gcc -Wall -Werror -prototypes -Wmissing -prototypes -g -c -o pri_facility. c -Werror -Wstrict-prototypes -Wmissing-prototypes ar rcs libpri. a copy_string. o pri. o q 921. o prisched. o q 931. o pri_facility. o • make install
Building Asterisk • • cd /usr/src/asterisk-* make clean make install
Installing Asterisk • • • • • • +---- Asterisk Installation Complete ---------------+ + YOU MUST READ THE SECURITY DOCUMENT + + Asterisk has successfully been installed. + + If you would like to install the sample + + configuration files (overwriting any + + existing config files), run: + + make samples + +--------- or --------------------------+ + You can go ahead and install the asterisk + + program documentation now or later run: + + make progdocs + + **Note** This requires that you have + + doxygen installed on your local system + +-------------------------------------+
Installing Asterisk • make samples – Installs the sample configuration files in the /etc/asterisk directory • make progdocs – Installs the Asterisk program documentation. This uses doxygen to generate the documentation from the source and some areas are documented better than others • make config – Configures the Linux system to execute Asterisk automatically on system startup
Commonly Used CLI Options • -c – Console. This allows you to connect to the Asterisk CLI. Example: asterisk -c • -v – Verbosity. This is used to set the amount of output for CLI debugging. Example: asterisk –vc or asterisk -vvvvvvc • -r – Remote. This is used to reconnect remotely to an already running Asterisk process. Example: asterisk -vr
Starting Asterisk • [root@stellar asterisk-1. 2. 2]# asterisk -vvvc == Parsing '/etc/asterisk. conf': Found == Parsing '/etc/asterisk/extconfig. conf': Found Asterisk 1. 2. 2, Copyright (C) 1999 - 2006 Digium, Inc. and others Created by Mark Spencer <markster@digium. com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'show license' for details. ================================ == Parsing '/etc/asterisk/logger. conf': Found Asterisk Event Logger Started /var/log/asterisk/event_log == Parsing '/etc/asterisk/dnsmgr. conf': Found Asterisk Dynamic Loader loading preload modules: == Parsing '/etc/asterisk/modules. conf': Found == Manager registered action Ping == Manager registered action Events == Manager registered action Logoff == Manager registered action Hangup Asterisk Ready.
Getting Help • *CLI> help ! Execute a shell command abort halt Cancel a running halt add extension Add new extension into context add ignorepat Add new ignore pattern add queue member Add a channel to a specified queue ael debug contexts Enable AEL contexts debug ael debug macros Enable AEL macros debug …
Starting Asterisk Service Re-Attaching to Asterisk Console If you ran the make config command earlier or manually copied the initialization scripts, use them to start Asterisk. Otherwise, run the executable from /usr/sbin. • • [root@stellar asterisk-1. 2. 2]# /etc/rc. d/init. d/asterisk start Starting asterisk: [ OK ] [root@stellar asterisk-1. 2. 2]# asterisk -vvvr == Parsing '/etc/asterisk. conf': Found == Parsing '/etc/asterisk/extconfig. conf': Found Asterisk 1. 2. 2, Copyright (C) 1999 - 2006 Digium, Inc. and others. Created by Mark Spencer <markster@digium. com> Asterisk comes with ABSOLUTELY NO WARRANTY; type 'show warranty' for details. This is free software, with components licensed under the GNU General Public License version 2 and other licenses; you are welcome to redistribute it under certain conditions. Type 'show license' for details. ============================= Connected to Asterisk 1. 2. 2 currently running on stellar (pid = 20077) remote UNIX connection Verbosity is at least 3 stellar*CLI>
Q&A • Alex Vishnev • Chief Technical Officer, Vo. IP • 13620 Reese Blvd. Ste. 400 • Huntersville, NC 28078 • Office (704) 632 -3682 • Mobile (704) 778 -7260 • Fax (704) 947 -7112 • Email avishnev@acninc. com • Website http: //www. acninc. com • • Carl Davis Chief Architect Stellar System Technologies 35 Pinecrest Dr. Rochester, NY 14617 -2221 (585) 317 -4170 Email carl_davis@stellarsystech. co m • Website http: //www. stellarsystech. co m