Hi
I am in the process of moving to Rocky Linux from CentOS. Looks like FOP2 is not supported.
I have been able to bypass and fix some errors but now I in need of a systemd services to start and stop fop2.
As advise or assistance will be appriciated?
Faqterson
Posts
-
Rocky Linux 9 support - PHP8 - Systemd service -
Admin panel blank after installationI am moving to Rocky Linux and having the same problem. I was able to bypass the error by just doing a return in the function.
function load_tables() {
return;
if (is_array($this->cache_translations) &&
is_array($this->table_originals) &&
is_array($this->table_translations))
return;- Looks like all these arrays are empty and I can't figure out why, yet.
Since Rocky Linux is running php 8, I started finding more and more problems. Arrays using { brackets and not [
I changed /var/www/html/fop2/admin/parsecsv.lib.php
$ch = $data[$i];
I then had a problem with buttons page after login:
/var/www/html/fop2/admin/menu.php
-- if(count($extramenu[basename(SELF)][$arrdata['name']])>0) { - Looks like all these arrays are empty and I can't figure out why, yet.
-
Button Label not UpdatingI found an alternative way to update the label with our restarting the server.
Sytemctl stop fop2
Systemctl restart httpd
Sytemctl start fop2 -
Button Label not UpdatingI can confirm that with a server hard reset/reboot it resolves the button name.
Can I ask for more information related to this problem and if an update is coming to resolve this? -
Button Label not UpdatingEven more strange now. The name reflects correctly when the agent logs onto a queue on the queue panel but the extension button still has the old name.
-
Button Label not UpdatingI have updated a label on the buttons page and reloaded the panel.
When I check the database the fop2buttons table is updated with the new name but the panel itself doesn't reflect it:
select * from fop2buttons where device = 'PJSIP/0132';
+------+------------+---------+-----------+-----------+------------+---------+---------------------------+-------+-------+-------+------------+---------+---------+--------------+------------------+-------------+------------+----------+-------------+------+----------------+--------------+--------+----------+--------------------+------------------------------------------------+--------------+--------------+
| id | context_id | exclude | sortorder | type | device | privacy | label | group | exten | email | context | mailbox | channel | queuechannel | originatechannel | customastdb | spyoptions | external | accountcode | tags | extenvoicemail | queuecontext | server | cssclass | originatevariables | autoanswerheader | sip_username | sip_password |
+------+------------+---------+-----------+-----------+------------+---------+---------------------------+-------+-------+-------+------------+---------+---------+--------------+------------------+-------------+------------+----------+-------------+------+----------------+--------------+--------+----------+--------------------+------------------------------------------------+--------------+--------------+
| 1661 | 0 | 0 | 369 | extension | PJSIP/0132 | NULL | Siphamandla Radebe <0132> | | 0132 | | extensions | 0132 | | | | CF/0132 | | | | | | | | | NULL | __SIPADDHEADER51=Call-Info: answer-after=0.001 | | |
+------+------------+---------+-----------+-----------+------------+---------+---------------------------+-------+-------+-------+------------+---------+---------+--------------+------------------+-------------+------------+----------+-------------+------+----------------+--------------+--------+----------+--------------------+------------------------------------------------+--------------+--------------+

-
Fop2 Realtime PBX supportI run my own Asterisk PBX software and make use of Realtime databases.
I have created the engine code to create my buttons from the realtime tables. I hope its useful to other users.
/var/www/html/fop2/admin/functions.php
....
} else if($config_engine == 'realtime') {
$return = realtime_check_extension_usage();
...../var/www/html/fop2/admin/functions-realtime.php
<?php
function realtime_populate_contexts_from_tenants() {
$panelcontexts[0]='GENERAL';
return $panelcontexts;
}
// Same as functions-astdb but querying the asterisk database for sip peers and voicemail tables
function realtime_check_extension_usage() {
global $db, $astman, $conf;
$extenlist = array();$dbtablesip = "asterisk.ps_endpoints AS ps_endpoints"; $dbtableiax = "asterisk.iaxfriends AS iaxfriends"; $dbtablevoicemail = "asterisk.voicemail AS voicemail"; $dbtablequeues = "asterisk.queues AS queues"; // Extensions $fields= "CONCAT('PJSIP/',ps_endpoints.id) as dial,ps_endpoints.id as extension,ps_endpoints.context as context,callerid as name,ps_endpoints.id as mailbox,voicemail.password as vmpin,email"; $results = $db->select($fields,$dbtablesip,"LEFT JOIN $dbtablevoicemail on ps_endpoints.id=voicemail.mailbox","","","",""); if(is_array($results)) { $trunkcount=0; foreach ($results as $result) { if(preg_match("/[,&]/",$result['dial'])) { $partes = preg_split("/[,&]/",$result['dial']); $result['dial']=$partes[0]; } $thisexten = $result['extension']; $vmpin = $result['vmpin']; $vmemail = $result['email']; $data = array(); $data['name'] = $result['name']; $data['channel'] = $result['dial']; $data['mailbox'] = $result['mailbox']; if( $result['name'] != "") { $data['type']='extension'; $data['exten'] = $thisexten; } else { $trunkcount++; $data['type']='trunk'; $data['exten']=$thisexten; } $data['context'] = $result['context']; $data['vmpin'] = $vmpin; $data['email'] = $vmemail; $data['customastdb'] = 'CF/'.$thisexten; $data['context_id'] = 0; $extenlist[$data['channel']] = $data; } } //IAX2 $fields= "CONCAT('IAX2/',name) as dial,name,context"; $results = $db->select($fields,$dbtableiax); if(is_array($results)) { $trunkcount=0; foreach ($results as $result) { if(preg_match("/[,&]/",$result['dial'])) { $partes = preg_split("/[,&]/",$result['dial']); $result['dial']=$partes[0]; } $thisexten = $result['name']; $vmpin = ""; $vmemail = ""; $data = array(); $data['name'] = $result['name']; $data['channel'] = $result['dial']; $data['mailbox'] = ""; $trunkcount++; $data['type']='trunk'; $data['exten']=$thisexten; $data['context'] = $result['context']; $data['vmpin'] = $vmpin; $data['email'] = $vmemail; $data['customastdb'] = 'CF/'.$thisexten; $data['context_id'] = 0; $extenlist[$data['channel']] = $data; } } // Queues $fields= "name"; $results = $db->select($fields,$dbtablequeues,"","","","",""); if(is_array($results)) { foreach ($results as $result) { $thisexten = $result['name']; $data = array(); $data['channel'] = "QUEUE/$thisexten"; $data['type'] = "queue"; $data['context'] = "queue-$thisexten"; $data['name'] = $thisexten; $data['exten'] = $thisexten; $data['context_id'] = 0; $extenlist[$data['channel']] = $data; } } return $extenlist; }