Installation


Installing from tarball

If you install from tarball be sure to download the one corresponding to your platform. Just as a quick reminder: Trixbox, Elastix, PBX in a Flash and AsteriskNow are all based on Centos. To find out if your current install is 32 or 64 bits you can run the command:

#> uname -a

If the output contains the strings i386 or i686, your need the 32 bits version. If not, you need the 64 bit version.

Then proceed to download the package from our servers.

After downloading the proper package, you will have to extract it with the command (the filename might change depending on the version you downloaded):

#> tar zxvf fop2-2.24-centos5-i386.tgz

Change to the extracted FOP2 directory:

#> cd fop2

For the sake of simplicity, included in the tarball there is a Makefile that can install the files for you, just type:

#> make install

The installation will copy the server files under /usr/local/fop2 and the web pages under /var/www/html/fop2, /var/www/fop2 or /srv/www/htdocs/fop2 depending on your distribution. It will also copy an init script for you.

Important: Non FreePBX Installs

The install will not create the mysql database needed for the visual phonebook feature. You must know the mysql root password in order to create the database, as instructed here. If you do not know the mysql root password you won't be able to use the phonebook feature. If you do not know what your mysql root password is, you might want to try with default passwords like passw0rd, eLaStIx.2oo7 or just an empty password.

If you are using a FreePBX based distro like Trixbox, Elastix, PIAF, etc, you do not need to worry about creating databases when installing FOP 2.22 or higher, because since that version the FreePBX database and credentials are used to store the fop2 data/tables.

In any case, the phonebook is not a mandatory feature, you can have a fully working fop2 for monitoring and performing transfers without using the phonebook at all.

FreePBX integration

For a complete FreePBX integration experience, we supply a script that will update your dialplan by modifying your current extensions_override_freepbx.conf and create a new file named extensions_override_fop2.conf with the needed modifications.

What this script does is to write some dialplans that will override the FreePBX defaults to integrate the FOP2 presence box with the DND FreePBX featurecode, and the CallForward FreePBX Feature Codes with the CF note for FOP2 Buttons.

The script is located in /usr/local/fop2/generate_override_contexts.pl

You can execute it with the -write command line option to alter your dialplan directly, or perform a dry run by using the -print option:

#> /usr/local/fop2/generate_override_contexts.pl -write

The above command will try to do all the work for you. As it is an automated script, and the world is large and mostly unexplored, it might fail. In that case you can restore your original file that is saved with the name /etc/asteirsk/extensions_override_freepbx.conf.bak

You do not need to do this if you are not using FreePBX. Even if you do use FreePBX, it is also an optional step for integrating FreePBX DND and CF features with the FOP2 user interface.



Visual Phonebook

Important: FreePBX Installs

Since FOP version 2.22 the visual phonebook tables will be created automatically for you, there is no need to create a new database or edit the config.php file, so you can skip this step.

Installation instructions for the visual phonebook are available here. You can have a fully working FOP2 without the phonebook, so you can set this up after performing the base installation and verify it is working ok.


Manager Credentials

Before starting the service, some basic configuration is required in fop2.cfg and probably in /etc/asterisk/manager.conf, because the FOP2 daemon connects via TCP to the Asterisk Manager Interface (AMI) using a username and secret. The basic daemon config is covered here.

Once that the files are in place and the manager credentials configured you will have to start the service. There are a number of ways to do that. The best way is to use a proper init script for your distribution, another way is to start it from /etc/rc.local.

You can always check if the manager credentials are correctly configured, and also verify if your license is ok, by running the command:

#> /usr/local/fop2/fop2_server --test

Avoiding Conflicts with FOP(1)

If you have the regular FOP installed and running, you will need to change the configuration for it a little bit, or disable it altogether if you do not plan to use it anymore.

To change FOP(1) configuration so you can have both versions running, edit the file op_server.cfg file that is installed in /var/www/html/panel in a regular FreePBX installation, and change the line that says:

;listen_port=4445

to:

listen_port=4444

To disable FOP(1) comletely, you can edit /etc/amportal.conf and set FOPRUN=false. Then stop your currently running FOP process with the command:

/usr/sbin/amportal stop_fop

Copy files by hand

You should only do this if you opt for not running the make command as instructed earlier. If you typed "make" and it finished with "Done!" then skip this step.

You can also opt to install the files manually instead of running "make", and place them to suitable locations on your hard disk. For example, you can move the daemon files and configurations to /usr/local, and the web pages to a directory inside your webserver web root:

#> mv server /usr/local/fop2
#> mv html /var/www/html/fop2

That's it!