Remote FOP2 Configuration via FreePBX
My company uses FreePBX to configure FOP2 buttons. I would like to move the FOP2 instance to its own dedicated machine, I know this is possible, but would this mean they would have to configure FOP2 via its own admin panel, or could they still use FreePBX/FOP2 Modules?
Regards,
Regards,
Comments
Be advised that some features, like file based voicemail explorer, won't work if you install FOP2 on a separate machine (you can use odbc based voicemail for that, but FreePBX doe snot use it).
This would help me understand moving my FOP2 as well, because currently I installed FOP2 on the new system, then moved over the webroot + /usr/local/fop2. But I had glitches and I would rather just install fresh + activate new license and import DB/Connect to Remote DB.
When I say glitchy, this is the resulting problem @ the moment. [Can't Revoke License in FOP2] . I think this is because I activated over-top of an already existing but not working fop2.lic. I figured it would just over-write it, and it did, but I need to start fresh and I can't revoke the license. (Sorry to go off topic, but this topic will help me avoid the other again)
As for configurations. I do not know what you did in your current setup/configuration, so I cannot answer properly.
FOP2 configuration can be static text files, or you can run a script that outputs valid configuration data and use that as config. The newer FOP2 version includes a FOP2 Manager that will store every configuration in MySQL, and then it will use a script to retrieve that and generate valid fop2 user and buttons data. So, the fop2.cfg file has only this: #exec autoconfig-users.sh . That script will read MySQL fop2 tables to generate user,groups and plugins data. Then it will load the autobuttons.cfg file that will in its place execute the script autoconfig-buttons.sh, that will produce the buttons configuration data (also by querying mysql).
The FOP2 Manager detects your backend and will query that backend via available means to populate fop2 tables with data. In FreePBX it queries some tables to get configuration. In some other backends it reads some static files, in other it could be mixed between db and static files.
You can very well remove that #exec line and write static user=xxxx lines, or write your own scripts, or whatever. FOP2 and the FOP2 Manger won't create FOP2 users automatically if you add an extension in FreePBX, that is a design choice. You can manipulate fop2 tables by other means if you want, but it is not really recommended (unless you want to auto create users). But be advised that user tables are several and they are interrelated. Look at the mysql query in autoconfig-users.sh to have an idea on how things are done sql wise.
Best regards,
I tried changing the ENGINE value to freepbx as mentioned above and that did not help.
Just to note, I have been using FOP2 installed locally on a FreePBX install for multiple years so I am fairly familiar with it.
Without that, it won't work. Your problem is most probably mysql permissions, and you just need to set correct credentials in /var/www/html/fop2/admin/config.php *and* grant permissions to a user in MySQL, check and recheck that you have created a valid mysql user and that you can connect to mysql from the FOP2 server using the mysql command line client:
mysql -u USERYOUCREATED -p -h IP.OF.ASTERISK
And enter the password you created/granted permissions to. Once you get that working, then replicate that user/pass/ip on the config.php file.
I've now tested and double checked the mysql credentials which do successfully connect. Does USE_FREEPBX_AUTH in config.php need to be set to true or false?
Either way I get errors about creating the various fop2 tables which I would think is the local DB, no?
As for the error creating tables, means your mysql user does not have enough privileges for creating its tables. you should review permission for that user and allow/add the create permission (not only select,insert,update,delete).
Best regards,