Installation of FOP2 on separate server

Can FOP be installed on a separate server, and the configuration "pointed" at the Asterisk server to retrieve the status information (who's on a call/who is not)?

I have no need to transfer/park calls and just need to be able to show caller presence/activity.

I've tried using FOP1 that part of PIAF, but the configuration keeps getting overridden by the normal FreePBX usage of adding, removing users and I would like it to be separate if at all possible.


Sorry if this has already been answered, but my searches for this topic have not yielded any previous results.

Thanks

Comments

  • Yes, you can run fop2_server in a different machine

    You will have to modify the autoconfiguration scripts or provide a manual configuration for users / buttons as the default freepbx configuration scripts try to access a local mysql database using credentials stored in /etc/amportal.conf and they also read some asterisk config files in /etc/asterisk.

    You could copy the autoconfiguration scripts to your asterisk server and run them using passwordless ssh from a local script, it is not *that* hard to do but requires some time. Or you can just do a manual configuration.

    You also need to specify the manager host in fop2.cfg and allow connections in /etc/asterisk/manager.conf
  • When you mention, "Or you can just do a manual configuration..." do you mean a manual configuration of the user/buttons to be shown in the website? If so, that is fine, as it is what I was expecting to do anyway. I do not want all the registered users shown, only information for some users that are registered to Asterisk.

    If you are referring to a manual configuration of the files to access the Asterisk PBX, that is fine too, as we have an HA implementation and I would like the FOP2 instance to look at the HA address of the Asterisk server, not one Asterisk server in particular.

    Thank you for the information.
  • I was talking about fop2 users and fop2 button configurations. The stock config will run a script to generate configurations automatically. That script will fail if you do not have FreePBX installed.

    So, you can copy both scripts to your FreePBX setup, run them and capture the output, and then copy those captures into your fop2 server and use those files..

    autoconfig-users-freepbx.sh will output fop2 users configuratinos, and buttonfile=autobuttons.cfg

    autoconfig-buttons-freepbx.sh will output button configurations, if you copy that output to autobuttons.cfg and you have the buttonfile=autobuttons.cfg in fop2.cfg and remove the last #exec line, then you will have a manually configured setup.
  • Hi,

    I just upgraded to version 2.31, as far as the main functionality of fop2 is concern it is working, however two things that I could not figure out how to make it work, the call history and the contacts or the phonebook. They are all blank. Are there any other places that I need to manually configure the fop2? Things that I did manually are the fop2.cfg, both config.php, where I place the values of the database for authentication and connection, and the AMI values for connection to asterisk in the fo2.cfg file. Also the users, buttons etc.
  • You must configure /var/www/html/fop2/config.php (not only /var/www/html/fop2/admin/config.php) to set the mysql parameters.
  • edited May 2016
    I found the culprit, it is the iptables. However it say's "an error has occurred, there are no records found. I attached the screen shot of the error.
  • So it works now by allowing port 3306 for MySQL?

    In that case, I do not think the error you see is wrong. You can enable debug to see more verbose errors, but they are ugly and too technical for end users. So they are hidden on purpose. An error has occurred, indeed, as it could not connect to mysql due to iptables rules on port 3306, and because of that, no records were found.
  • I disabled the iptable service. And the same error I am getting. The contact and recording giving the same error message that "could not create/connect the phonebook table, please verify your mysql credentials in config.php", even though the credentials are correct. I tried enabling the debug, but I could not see where the debug messages, could you tell me where to find the debug messages so that I could check where the problem is?
  • I found the messages, I will post what I will find.
  • You are still having mysql credentials/permissions issues. The mysql user must have create permissions to create the corresponding table. The mysql database must be created by hand (by default it uses the database name "fop2" but you can change that in config.php). So be sure you do have that database created, and that the mysql user is able to create tables.

Sign In or Register to comment.