Frequently Asked Questions

How can I install FOP2?

The recommended way to install is from your server command line. You can use this command:

sudo wget -O - http://download.fop2.com/install_fop2.sh | bash

How can I upgrade FOP2 to a newer version?

In order to upgrade FOP2 you must have root access to your server command line. From the server command line run the following command:

sudo wget -O - http://download.fop2.com/upgrade_fop2.sh | bash

Your license must be within the yearly period in order to upgrade versions. If your license is older than a year, then you must purchase the annual software maintenance first, apply the annual upgrade code and finally run the above command.


How do I apply they annual maintenance activation code?

When you purchase the annual maintenance, you will receive an email with the activation code. In order to apply the upgrade, run the following

/usr/local/fop2/fop2_server --upgrade

You will be prompted to enter the code. After that your license will be extended, but the new license will not be in effect until you reactivate it with the command:

/usr/local/fop2/fop2_server --reactivate

You can then verify your license details and support expiration with the command:

/usr/local/fop2/fop2_server --test

I forgot my activation code, is there a way to retrieve it?

If you have FOP2 version 2.31.24 or higher and your license is valid, you can get the activation code with this command:

/usr/local/fop2/fop2_server --getinfo

How much does the license cost?

License start at $40 and up depending features. The most capable license (FOP2 Full White Label) costs $100. License is perpetual and includes one year of upgrades. If you need to upgrade after the year passed, you must purchase the annual software maintenance ($20).

Appart from the license, there are some plugins and components that have separate pricing, you will see them on the FOP2 Manager Plugins list, or on our buy page.


Can I use my license in more than one server?

No, you need one license for each server you have. Even if you have a high availability cluster, you need one license for each node on that cluster.

The license allows you to have 5 tenants or 'panel contexts'. This is a way/method to partition one server into issolated contexts/environments. But this does not mean that your license can be used on five different servers. In order to take advantage of the multi tenantcy, you must be using a multi tenant Asterisk backend like Mirta. You can also use or configure panel contexts manually, but that requires deep understanding of FOP2 internals and configuration, you will need to study the installation guide.


I have several licenses, and I lost track of each one. Is there a way to see what I have?

You can use our user portal to see your activated licenses. The portal is available at

https://my.fop2.com

You must log in with the email used at the time of purchase. If it's your first time logging in, follow the reset password link/process to establish your password.


I cannot connect to FOP2

When you open up your browser and point to http://your.server/fop2 it attempts to connect for a long time and finally fails with the message 'System is not available rigth now'.

The most common issue is an incorrect or missing configuration in SSL certificates in /usr/local/fop2/fop2.cfg. Please see this question here

There are other network related issues, we have an interactive troubleshooter that might help you pin point the root cause, please check our knowledgbase and interactive troubleshoter


Unable to connect to FOP2 while using HTTPS/SSL

When you use SSL to connect to your web server, you must configure the FOP2 server to use the same SSL certificates as your web server in order for the browser to allow secure websockets connections. If not, then the browser will refuse negotiation of secure websockets.

So, you must edit your fop2.cfg file and add the proper certificate files. If you use stock FOP2, you can find your fop2.cfg file in /usr/local/fop2. If you installed it via RPM (Issabel, Ombutel), the file is in /etc/asterisk/fop2.

The settings you want to modify are:

  • ssl_certificate_file
  • ssl_certificate_key_file

If you use Letsencrypt SSL certificates, you might need to set them to something similar to this:

ssl_certificate_file=/etc/letsencrypt/live/www.yourdomain.com/fullchain.pem
ssl_certificate_key_file=/etc/letsencrypt/live/www.yourdomain.com/privkey.pem

Most usually letsencrypt and certbot utilities will save the certificates on /etc/letsencrypt/live/www.yourdomain.com so the above settings would be correct (just use the correct domain name instead of yourdomain.com). If you are not sure, you can search for those files on your drive and be sure to set the accordingly on FOP2.

In order to find out which certificates are in use, if you use a Centos based system and Apache web server, you can run this command:

grep ^SSLCertificate /etc/httpd/conf.d/*

Inspect the output and look for the paramters SSLCertificateFile and SSLCertificateKeyFile, take note on their values and set them on the corresponding entries in fop2.cfg.

AFter the change, restart FOP2 with the command:

service fop2 restart

Can I run FOP2 on a plain Asterisk installation?

Yes. The tarball comes ready to work with many popular backends like Issabel, Thirdlane, Elatix, PBX in a Flash, PBXWare, MiRTA, Ombutel, etc, right out of the box, if you use vanilla asterisk or your custom configuration engine, you can still use FOP2 but you will have to either write the configuration for users and buttons by hand or create a set of autoconfiguration scripts You can also use the FOP2 Manager and tweak the functions-custom.php file to suite your needs.


Why is the action toolbar missing when I log in?

The most common cause for action buttons in the toolbar not showing is because you logged into FOP2 with a user/extension that does not have a corresponding extension button on display. In order for the action toolbar to appear, you must log in with an extension that is also listed in the main extensions box. If there is no matching button for the extension your are loggin in as, then the toolbar won't be displayed as FOP2 will not be able to figure out the device to use for performing actions. If you are using the free version you must have to log in with an extension that is part of the first 15 buttons displayed on screen. If that extension is not visible because of the 15 buttons license limit, you can reorder or disable buttons to make it appear in that list (you can do so from the FOP2 Manager, in the Buttons section).


Is there a way to display only one line per extension?

Yes. You have to edit /var/www/htmlfop2/js/presence.js and set the variable showLines to 1. Take into account that if an extension receives more than one call at a time, you might end up with a busy button with line 1 inactive because the action happens on line 2. It is not recommended to hide line 2. You can also increase the number of lines to any number. That value is global, so it applies to every extension button on display.


How to revoke a license?

The command to revoke the license is:

/usr/local/fop2/fop2_server --revoke

If you get an "Unable to contact registration server" error evenf if you are positive internet access is allowed, you might want to pass another parameter to the above:

/usr/local/fop2/fop2_server --revoke --rp=http

One you enter the command, it will ask you to type your license activation code. If your license is valid and matches the code, it will be revoked from the server, and the same activation code can then be reused on the same or different server


How to register a license?

The command to register the license is:

/usr/local/fop2/fop2_server --register

If you get an "Unable to contact registration server" error evenf if you are positive internet access is allowed, you might want to pass another parameter to the above:

/usr/local/fop2/fop2_server --register --rp=http

You will be prompted for your license activation code. Once entered and if available for registration, the license file will be retrieved. You must restart the fop2 server for the license to take effect with the coammand:

systemctl restart fop2

How do I change the language?

Since FOP2 version 2.20, you only set the language in /var/www/html/fop2/js/presence.js file, or for individual users by opening the user preference in the FOP2 GUI.

In previous FOP2 versions you have to edit /usr/local/fop2/fop2.cfg and set the language parameter on the server. On the client you need to include the correct .js language file in index.html, and finally set the language for the visual directory in /var/www/html/fop2/config.php. Also you might need to translate or put whatever you want in the /var/www/html/fop2/js/presence.js file.


Does FOP2 show parked calls?

Parking is supported since version 2.10. In most supported backends it will be configured automagically, for vanilla Asterisk installs or unsupported backends it is not difficult to make it work, see the README file for instructions on setting it up.


Where are FOP2 initiated recordings stored?

They are stored in the standard asterisk monitor directory: /var/spool/asterisk/monitor. Since FOP version 2.20 it is possible to specify a script to run after a recording is finished, we have included a sample script (tovoicemail.pl) that will sent the recording as a voicemail file. Please read the sample fop2.cfg file for details.


What permissions are needed in asterisk's manager.conf?

You need at least system,call,command,agent,user,originate in asterisk's manager.conf file for the FOP2 user. In the latest tribox you might also need the "hud" permission or just use "all"


I cannot install plugins on VitalPBX after an upgrade

VitalPBX has a special directory layout. Plugins are stored in /var/lib/fop2/plugins . You must edit the FOP2 Manager config.php file located in /usr/share/fop2/www/admin and uncomment the $PLUGIN_DIR setting and set it to the correct value:

$PLUGIN_DIR="/var/lib/fop2/plugins";   

How do I track DND state?

In order to get DND and CF synchronization between FOP2 and any backend that uses DND and CF astdb entries, some dialplan macros need to be updated. Since version 2.24 there is a script included that will do the hard work for you, all that is needed is run the following command:

/usr/local/fop2/generate_override_context.pl -w

Can I popup an arbitrary URL when a call comes in?

Yes. When your phone rings you will get a call notification. Via ajax the notification will trigger a request to the server to the script checkdir.php. You can modify that script to insert your own javascript code. At the very top there is a function named custom_popup() that will get 4 parameters: caller id number, caller id name or phonebook name,queue name if any and extension number. You can uncomment the sample function to fire a popup to google.com searching for the contact name. Eg:

function custom_popup($clidnum,$name,$fromqueue,$exten) {
   // Here you can fire your own popups or do whatever you want
   // Uncomment this block to fire a popup to google.com

   header("Content-type: text/javascript");
   echo "window.open('http://www.google.com/search?q=$name')";

}

I have the white label version, but I still see FOP2 on the application title. How can I change that?

There are a couple of files you need to edit to change the application title. For the FOP2 page title:

  • /var/www/html/fop2/js/presence.js
var applicationTitle = 'Flash Operator Panel 2';

For the FOP2 Manager title:

  • /var/www/html/fop2/admin/config.php
$APPNAME          = "Panel Manager";
$LOGONAME         = "<span style='font-weight:bold; color:#000;'>Panel</span> <span style='color:#4EB855'>Manager</span>";
$LOGO             = "images/fop2managerlogo.png";

You can not only change the name, but also the typography logo and image.

Finally, if you want to change the logo/image at the login box, you can do so by customizing themes. In order to write your own custom theme, you must create this file:

  • /var/www/html/fop2/css/custom_theme/theme.css

In that file you can write any css rules you want.

So open it up in your favorite text editor and add/create this block:

.logo {
    width: 128px;
    height: 128px;
    background: url(//some.server/path/to/your/logo.png) no-repeat;
    background-size: 120%;
}

Trying to run fop2_server in Rocky Linux 8 produces a Segmentation Fault

For FOP2 to work correctly on that distribution, the package libnsl must be installed. Run this command to install on your system.

yum -y install libnsl

After the installation FOP2 should start correctly.


When I try to run fop2_server it does not do anything at all.

Since version 2.27 this is not needed anymore as the scripts already include that modification.

fop2_server requires the /tmp directory to allow execution. Some systems mount the /tmp directory with the noexec option for security reasons. In that case you need to create a special temp directory for FOP2 and modify the init script to export an environment variable so it uses that directory. So, you can create a temp directory:

mkdir /usr/local/fop2/temp

And then modify the init script by adding the highlighted line:

case "$1" in
  start)
        echo -n "Starting Flash Operator Panel 2: "
        export PAR_GLOBAL_TMPDIR=/usr/local/fop2/temp
        daemon $DAEMON $OPTIONS

Why do I get the error "SQLSATE[HY000]: General error: 8 attempt to write a readonly database" when trying to save settings via FOP2 Manager?

FOP2 settings database is stored by default in the file /usr/local/fop2/fop2settings.db . There are some things to check to ensure that the web server application is able to write on such file:

  • Check file ownership. It should be owned by the same user the web server is running as. Assuming your web server run as user "apache", you can change permissions with the command

chown apache /usr/local/fop2/fop2settings.db

  • If you have SELinux enabled, you will need to either disable it or configure it to allow write to that file from a web application, you can use these commands to do so:

To allow httpd to write to the /usr/local/fop2 directory:

chcon -R -t httpd_sys_rw_content_t /usr/local/fop2

To make the changes persistant:

semanage fcontext -a -t httpd_sys_rw_content_t "/usr/local/fop2(/.*)?"

When I try to download voicemail or recordings I get a "no way" message?

If you have SELinux enabled, fop2 php sessions might not work. You will need to disable selinux or enabling some special permissions for it:

setsebool -P telepathy_tcp_connect_generic_network_ports 1
setsebool -P httpd_can_network_connect 1
setsebool -P allow_user_mysql_connect 1
setsebool -P httpd_can_network_connect_db 1

FOP2 segfaults when I try to register my license

In you experience a Segmentation Fault when you run /usr/local/fop2/fop2_server --register , try installing an OpenSSL compatibility library in your distro:

yum install openssl098e

That will probably fix your issue. As an alternative, you can skip using ssl at registration time by passing the --rp parameter, like:

/usr/local/fop2/fop2_server --register --rp=http

I try to log in, and it rejects me every time

If you use the automatic configuration from FOP2 Manager, you can see the list of extensions and passwords that FOP2 will accept by running the following command on the server:

From version 2.28 onwards:

/usr/local/fop2/autoconfig-users.sh

If you modified fop2.cfg to use manual configuration, be absolutely sure that you comment the #exec line. Notice that # is not a comment character, you should comment with a ; character (;#exec autoconfig-users.sh). If you fail to do so, the automatic config will kick in anyaways and it will override any manual config you do, and check too that you have defined a buttonfile and that the buttonfile exists and contains at least some buttons.


When I try to login after entering my credentials it waits forever and times out

If you use international characters in your configs, be sure to save the button config file as utf-8. That should take care of the problem. You should also open/redirect connections to port TCP/4445.


Can I use international characters as button labels?

Yes, but be sure to save the buttonfile as utf-8. If you fail to do so you might have troubles login in.


I installed the IVR Flow plugin but when I dial the extension assigned to the IVR I created it fails

In order for the IVR dialplan to be generated, you must be sure that the included dialplan.php file on the plugin has execute permissions. You can run the following to set the execute permittions bits to it

chmod a+x /var/www/html/fop2/admin/plugins/ivrflow/menu/dialplan.php

During the plugin installation, a new line is added to extensions_custom.conf (a file that is part of FreePBX and Issabel systems). Be sure you have it there. If you use another system, you might need to add the line on the corresponding dialplan configuration file for your Asterisk distro:

#exec "php /var/www/html/fop2/admin/plugins/ivrflow/menu/dialplan.php"

If you already have the #exec line, there is no need to modify it. Take into account that #exec is a command, it is not a comment. Do not remove the # sign, if you do it will generate a syntax error and the IVR dialplan won't be generated.


I have a multi tenant environment, how does licensing work?

You need only one license per server to unlock the full FOP2 potential. If you use a multi tenant system, the license allows up to 5 tenants (panel contexts). If you need to increase the number of tenants, you can add more by purchasing the appropiate extension pack.

A tenant is a way to compartiment one server into multiple different PBXs. Most configuration backends like Issabel, Trixbox, etc, are single tenant, so you do not have to be concerned about the 5 allowed tenants (as the system uses just 1).

Some of the supported multi tenant backends are: MiRTA PBX, Thridlane and PBXWare


What are the differences between FOP 1 and FOP 2?

Several. In FOP 1 you use drag and drop to perform actions. In FOP 2 you use only clicks, so its easier to control with touchscreens. FOP 1 has limited screen space, so the number of buttons to display depends on the size you choose for the buttons; this method imposes a practical limit of about 140 buttons per screen. In the other hand, FOP 2 does not use flash for the display but regular html, so there is no limit on the number of buttons to display, you will be able to scroll down to show any number of buttons, and with the Filter option it is easy to look for a particular extension if you have dozens of buttons.

FOP 1 uses flash and a custom style configuration for changing the aspect, FOP 2 uses html and css so it is easier to modify the style. FOP 1 supports click 2 dial but you need to code in javascript/php in order to use the feature, while FOP 2 includes a Dial box by default that lets you type any number, sip contact or .tel domain to perform dialing. FOP 1 does not know about users, if you know the security code you can transfer any call to any place, while in FOP 2 there is a user authentication system with fine grained permissions.

This is just a basic list of differences, but you might get the idea. Your best bet is to try it out and experience it yourself.


Can I run FOP and FOP2 at the same time?

Yes. But as both applications listen to port 4445 by default you will have to configure the listen port on one of them to something else. We recommend to change FOP 1 listen port to 4444 and let FOP2 use port 4445. You can change FOP 1 listen port by editing op_server.cfg and changing the line that reads:

;listen_port=4445

to:

listen_port=4444

And then restart FOP 1 for the change to take effect.


How to replace the FOP link in Elastix/Trixbox to FOP2?

You can do it by means of modifying your apache configuration file. In Centos the file is located in /etc/httpd/conf/httpd.conf. In Debian it is located in /etc/apache2/sites-available/default. For other distros you can check apache wiki. In this file add the following line:

alias /panel/ "/var/www/html/fop2/"

Finally, you will then need to copy the index.html file to index_amp.php:

cp /var/www/html/fop2/index.html /var/www/html/fop2/index_amp.php

After the changes, reload Apache. From then one, all requests to /panel will be redirected to your FOP2 install.


I have reset FOP1 to run on port 4444 but extensions in FOP1 flash red

Be sure to resetart FOP1 so the config change is applied. (Easiest way is to reboot, harder way is to selectively kill or restart FOP1 and be sure to start FOP2). Verify that FOP1 and FOP2 are running under different ports. Use netstat -an to verify 4444 and 4445 are listening. Also, PIAF installations have tcp port 4445 open so 4444 needs to be open as well. Use webmin to open port 4445.