freePBX is accessed by clicking the Asterisk link of the main menu, and then clicking the freePBX link.
freePBX will greet you with a welcome screen and a list of menu options on the top. From here you can
access the setup options, system tools, call activity reports, Flash Operator Panel, and the Asterisk
recording interface. Clicking Setup will take you to the setup main page.The main page has a list of options
on the left, which will allow you to administer user accounts, extensions, and general Asterisk settings;
configure dial plans; and set up and control inbound and outbound trunks. See Figure 2.15.
PHPConfig
PHPConfig is a great way to edit configuration files without having to deal with a shell terminal. It allows you
to edit files just like they were in a text editor, but without having to learn how to use a Linux shell. It
provides the best of both worlds. PHPConfig can be accessed by clicking the Asterisk link on the
maintenance home page and then clicking the Config Edit link. Afterward, PHPConfig lists all the files in the
Asterisk configuration directory. Clicking the name of one of these files brings the file up in an edit
window.To the left of the edit window, PHPConfig lists all the sections it reads from that file, allowing you to
quickly jump to and edit the section you wish to work on. When finished editing, click the Update button
below the edit window. PHPConfig will then write the file to disk.The changes are not immediately reflected
in Asterisk though.To reload all the configs, you will need to click the Re-Read Configs link at the top of the
page.This tells Asterisk to perform a “reload” command that will reload all the configuration files. If there are
no errors, PHPConfig will then display “reset succeeded.” See Figure 2.16.
Installing Asterisk from Scratch
Before there were live CDs and distributions, there was source code. Asterisk’s availability of source code
is one of its biggest features, allowing anyone to “poke under the hood,” see the internal workings, and
rewrite portions if needed. Compiling Asterisk from its sources gives you the greatest amount of control as
to what files are installed, and where they are installed. Unneeded options can be removed entirely, allowing
a leaner Asterisk install. However, as always, there is a downside. Compiling anything from source is
intimidating if you aren’t used to doing it. However, it’s terribly once you figure it out.
The Four Horsemen
When compiling Asterisk from source, there are four major pieces to the puzzle: LibPRI, Zaptel, Asterisk-
Addons, and Asterisk. Asterisk is, you guessed it, the PBX itself.This package contains the code for
compiling the PBX and all its modules.You aren’t going to get far compiling Asterisk without this package.
LibPRI is a library for handling the PRI signaling standard.The PRI standard was created by the Bell System
back in the 1970s and is now an ITU standard. LibPRI is a C implementation of the standard.This package
may be required depending on the hardware installed on the system. Asterisk-Addons is a package that
contains certain optional “bells and whistles,” such as an MP3 player so Asterisk can handle sound files
encoded in MP3, and modules for logging calls to a MySQL database. While these modules are completely
optional, they are good to have, especially the MP3 player, and the resources they take up are minimal.
Installing them is recommended. Zaptel is the package that contains the driver and libraries for Asterisk to
talk to Zapata telephony hardware, which are the telephone interface cards discussed earlier. This is a handy
package to install, even if there is no Zaptel hardware on the system, since the conferencing software
requires it for timing purposes.
Asterisk Dependencies
Before you start compiling Asterisk, you must make sure you have all the requirements satisfied. First off is
the compiler. If you don’t have a compiler like GNU C Compiler (gcc) installed, you aren’t going to get very
far compiling the source code. Next, make sure you have the libraries required to compile, otherwise you
will likely have some kind of odd error at compile time. Asterisk has three dependencies: ncurses
(www.gnu.org/software/ncurses/), a library for text-based “graphical” displays; OpenSSL
(www.openssl.org/), an open-source library of the TLS and SSL protocols; and zlib (www.zlib.net/), a data
compression library. Asterisk requires both the library itself and the associated include files.These are
included automatically if you compile from source. However, if you install the libraries from a binary
repository, you will need to include the development packages as well. For instance, you would need to get
both zlib and zlib-devel.
Getting the Code
Links to all of the Asterisk code are available at http://www.asterisk.org. Clicking the Downloads tab will
take you to a page with links to grab all the necessary files.The links to get Asterisk provide options for
downloading either Asterisk 1.2 or Asterisk 1.4 directly, or visiting the source archive. Grabbing Asterisk
directly only downloads the Asterisk package, so you’ll want to download the LibPRI, Zaptel, and
Asterisk- Addons separately.The latest versions of each package should end in -current. Since there are
multiple source archives, it is best to put all of them in a common subdirectory wherever the system’s source
code directory is located (for example: /usr/local/src/asterisk/). See Figure 2.17.
Gentlemen, Start Your Compilers!
Compiling is simpler than one might think. Often, all that’s required is three commands: ./configure, make,
and make install. Once you have these three commands memorized, you’ll do fine.
Compiling LibPRI
The first step is to compile LibPRI.This is required if you have a PRI interface hooked into the system, but optional if you do not. First, expand the archive.
tar xvzf libpri-1.4-current.tar.gz
This will expand the source archive into a directory. At the time of this writing, itis libpri-1.4.0/. After the file
is done expanding, change to the LibPRI directory. cd libpri-1.4.0/
LibPRI doesn’t have a configuration command yet, so the only two steps are to compile it via the make
command, wait until it finishes, and then run make install. It is important to run the make install command as
a root user, otherwise the library will not be installed correctly due to permission errors. Once everything is
done, you can exit the LibPRI directory. cd ../
freePBX will greet you with a welcome screen and a list of menu options on the top. From here you can
access the setup options, system tools, call activity reports, Flash Operator Panel, and the Asterisk
recording interface. Clicking Setup will take you to the setup main page.The main page has a list of options
on the left, which will allow you to administer user accounts, extensions, and general Asterisk settings;
configure dial plans; and set up and control inbound and outbound trunks. See Figure 2.15.
PHPConfig
PHPConfig is a great way to edit configuration files without having to deal with a shell terminal. It allows you
to edit files just like they were in a text editor, but without having to learn how to use a Linux shell. It
provides the best of both worlds. PHPConfig can be accessed by clicking the Asterisk link on the
maintenance home page and then clicking the Config Edit link. Afterward, PHPConfig lists all the files in the
Asterisk configuration directory. Clicking the name of one of these files brings the file up in an edit
window.To the left of the edit window, PHPConfig lists all the sections it reads from that file, allowing you to
quickly jump to and edit the section you wish to work on. When finished editing, click the Update button
below the edit window. PHPConfig will then write the file to disk.The changes are not immediately reflected
in Asterisk though.To reload all the configs, you will need to click the Re-Read Configs link at the top of the
page.This tells Asterisk to perform a “reload” command that will reload all the configuration files. If there are
no errors, PHPConfig will then display “reset succeeded.” See Figure 2.16.
Installing Asterisk from Scratch
Before there were live CDs and distributions, there was source code. Asterisk’s availability of source code
is one of its biggest features, allowing anyone to “poke under the hood,” see the internal workings, and
rewrite portions if needed. Compiling Asterisk from its sources gives you the greatest amount of control as
to what files are installed, and where they are installed. Unneeded options can be removed entirely, allowing
a leaner Asterisk install. However, as always, there is a downside. Compiling anything from source is
intimidating if you aren’t used to doing it. However, it’s terribly once you figure it out.
The Four Horsemen
When compiling Asterisk from source, there are four major pieces to the puzzle: LibPRI, Zaptel, Asterisk-
Addons, and Asterisk. Asterisk is, you guessed it, the PBX itself.This package contains the code for
compiling the PBX and all its modules.You aren’t going to get far compiling Asterisk without this package.
LibPRI is a library for handling the PRI signaling standard.The PRI standard was created by the Bell System
back in the 1970s and is now an ITU standard. LibPRI is a C implementation of the standard.This package
may be required depending on the hardware installed on the system. Asterisk-Addons is a package that
contains certain optional “bells and whistles,” such as an MP3 player so Asterisk can handle sound files
encoded in MP3, and modules for logging calls to a MySQL database. While these modules are completely
optional, they are good to have, especially the MP3 player, and the resources they take up are minimal.
Installing them is recommended. Zaptel is the package that contains the driver and libraries for Asterisk to
talk to Zapata telephony hardware, which are the telephone interface cards discussed earlier. This is a handy
package to install, even if there is no Zaptel hardware on the system, since the conferencing software
requires it for timing purposes.
Asterisk Dependencies
Before you start compiling Asterisk, you must make sure you have all the requirements satisfied. First off is
the compiler. If you don’t have a compiler like GNU C Compiler (gcc) installed, you aren’t going to get very
far compiling the source code. Next, make sure you have the libraries required to compile, otherwise you
will likely have some kind of odd error at compile time. Asterisk has three dependencies: ncurses
(www.gnu.org/software/ncurses/), a library for text-based “graphical” displays; OpenSSL
(www.openssl.org/), an open-source library of the TLS and SSL protocols; and zlib (www.zlib.net/), a data
compression library. Asterisk requires both the library itself and the associated include files.These are
included automatically if you compile from source. However, if you install the libraries from a binary
repository, you will need to include the development packages as well. For instance, you would need to get
both zlib and zlib-devel.
Getting the Code
Links to all of the Asterisk code are available at http://www.asterisk.org. Clicking the Downloads tab will
take you to a page with links to grab all the necessary files.The links to get Asterisk provide options for
downloading either Asterisk 1.2 or Asterisk 1.4 directly, or visiting the source archive. Grabbing Asterisk
directly only downloads the Asterisk package, so you’ll want to download the LibPRI, Zaptel, and
Asterisk- Addons separately.The latest versions of each package should end in -current. Since there are
multiple source archives, it is best to put all of them in a common subdirectory wherever the system’s source
code directory is located (for example: /usr/local/src/asterisk/). See Figure 2.17.
Gentlemen, Start Your Compilers!
Compiling is simpler than one might think. Often, all that’s required is three commands: ./configure, make,
and make install. Once you have these three commands memorized, you’ll do fine.
Compiling LibPRI
The first step is to compile LibPRI.This is required if you have a PRI interface hooked into the system, but optional if you do not. First, expand the archive.
tar xvzf libpri-1.4-current.tar.gz
This will expand the source archive into a directory. At the time of this writing, itis libpri-1.4.0/. After the file
is done expanding, change to the LibPRI directory. cd libpri-1.4.0/
LibPRI doesn’t have a configuration command yet, so the only two steps are to compile it via the make
command, wait until it finishes, and then run make install. It is important to run the make install command as
a root user, otherwise the library will not be installed correctly due to permission errors. Once everything is
done, you can exit the LibPRI directory. cd ../
No comments:
Post a Comment