Hello. I moved an old FreePBX v13 install to v15 via the backup and restore method a while back. Found out today that the Queue Reports module wasn’t properly working anymore. The Agents and Queues section was blank.
Checked the mysql database and found that the asterisk.qxact_calls
table was empty.
However there were log files that existed with data /var/log/asterisk/queue_log*
.
So looked into the CRON jobs under the asterisk
user account as I believe that’s where the jobs run from. I don’t see anything for the qxactreports sync.
[root@pbx]# crontab -u asterisk -e
13 3 * * * /usr/sbin/fwconsole certificates --updateall -q 2>&1 >/dev/null
*/15 * * * * [ -e /etc/asterisk/firewall.enabled ] && touch /var/spool/asterisk/incron/firewall.firewall
0 1 * * * /var/www/html/admin/modules/iotserver/bin/check_license.php 2>&1 >/dev/null
0 2 * * * /var/www/html/admin/modules/iotserver/bin/check_certificates.php 2>&1 >/dev/null
0 4 * * * /var/www/html/admin/modules/iotserver/bin/refresh_tzoffsets.php 2>&1 >/dev/null
*/1 * * * * /var/www/html/admin/modules/iotserver/bin/check_system_settings.sh 2>&1 >/dev/null
@daily /usr/sbin/fwconsole pms mk_dirty > /dev/null 2>&1
@daily [ -x /var/lib/asterisk/bin/freepbx_sipstation_check ] && /var/lib/asterisk/bin/freepbx_sipstation_check 2>&1 > /dev/null
*/15 * * * * [ -e /usr/local/sbin/fwconsole ] && sleep $((RANDOM\%30)) && /usr/local/sbin/fwconsole userman --syncall -q
* * * * * [ -e /usr/sbin/fwconsole ] && sleep $((RANDOM\%30)) && /usr/sbin/fwconsole queuestats --syncall >> /tmp/reader.log 2>&1
59 23 * * 0 /var/lib/asterisk/bin/queue_reset_stats.php --id=2094
59 23 * * 0 /var/lib/asterisk/bin/queue_reset_stats.php --id=2097
59 23 * * 0 /var/lib/asterisk/bin/queue_reset_stats.php --id=2497
* 2 * * * /usr/sbin/fwconsole util cleanplaybackcache -q
42 3 * * 6 [ -e /usr/sbin/fwconsole ] && /usr/sbin/fwconsole ma listonline --sendemail -q > /dev/null 2>&1
42 5 * * 6 [ -e /usr/sbin/fwconsole ] && /usr/sbin/fwconsole ma upgradeall --sendemail -q > /dev/null 2>&1
* * * * * [ -e /usr/sbin/fwconsole ] && sleep $((RANDOM\%30)) && /usr/sbin/fwconsole job --run --quiet 2>&1 > /dev/null
So I then checked using fwconsole and I see the job, which I believe should update every 5 minutes.
[root@pbx ]# fwconsole job --list
+----+----------------------+------------------------+-------------+---------------------+----------------------------------------------------------------------------------------------------------------------------------------+---------+
| ID | Module | Job | Cron | Next Run | Action | Enabled |
+----+----------------------+------------------------+-------------+---------------------+----------------------------------------------------------------------------------------------------------------------------------------+---------+
| 39 | pagingpro | scheduler | * * * * * | 2022-04-01 12:30:00 | Class: FreePBX\modules\Pagingpro\Job | Yes |
| 10 | vqplus_callback_logs | sync | 59 23 * * * | 2022-04-01 23:59:00 | Command: /usr/local/sbin/fwconsole vqplus daemonlog -q 2>&1 > /dev/null | Yes |
| 12 | dashboard | scheduler | * * * * * | 2022-04-01 12:30:00 | Class: FreePBX\modules\Dashboard\Job | Yes |
| 14 | digium_phones | clearcdr | 5 * * * * | 2022-04-01 13:05:00 | Class: FreePBX\modules\Digium_phones\Job | Yes |
| 23 | calendar | sync | * * * * * | 2022-04-01 12:30:00 | Class: FreePBX\modules\Calendar\Job | Yes |
| 24 | firewall | syncIDetection | */5 * * * * | 2022-04-01 12:30:00 | Command: [ -e /usr/sbin/fwconsole ] && /usr/sbin/fwconsole firewall sync | Yes |
| 25 | pms | wu_alert | * * * * * | 2022-04-01 12:30:00 | Class: FreePBX\modules\Pms\Job | Yes |
| 26 | qxact_reports | sync | */5 * * * * | 2022-04-01 12:30:00 | Command: /usr/local/sbin/fwconsole qxactreports --sync -q 2>&1 > /dev/null | Yes |
| 27 | recording_report | clean | 30 22 * * * | 2022-04-01 22:30:00 | Command: /usr/local/sbin/fwconsole recordingreports -s -c | Yes |
| 28 | recording_report | backup | 0 0 1 * * | 2022-05-01 00:00:00 | Command: php /var/lib/asterisk/agi-bin/backuprecordings.php | Yes |
| 29 | restapps | deletesymlinks | 0 1 * * * | 2022-04-02 01:00:00 | Command: /usr/local/sbin/fwconsole phoneapps --deletesymlinks | Yes |
| 30 | sangomaconnect | sync | */5 * * * * | 2022-04-01 12:30:00 | Command: /var/www/html/admin/modules/sangomaconnect/bin/keep_alive.php 2>&1 >/dev/null | Yes |
| 31 | sangomaconnect | checkSSL | 0 2 * * * | 2022-04-02 02:00:00 | Command: /var/www/html/admin/modules/sangomaconnect/bin/check_certificates_sc.php 2>&1 >/dev/null | Yes |
| 32 | sangomaconnect | checkLicense | 0 1 * * * | 2022-04-02 01:00:00 | Command: /var/www/html/admin/modules/sangomaconnect/bin/check_license_sc.php | Yes |
| 33 | sangomaconnect | clean | @daily | 2022-04-02 00:00:00 | Command: /usr/sbin/fwconsole sc cleanGarbageDeviceData 2>&1 > /dev/null | Yes |
| 34 | restapps | cleanReplicatedCDRData | @monthly | 2022-05-01 00:00:00 | Command: /var/www/html/admin/modules/restapps/bin/cleanReplicatedCDRData.php &>/dev/null | Yes |
| 35 | sysadmin | checkportal | @daily | 2022-04-02 00:00:00 | Command: [ -e /var/www/html/admin/modules/sysadmin/bin/check_portal.php ] && /var/www/html/admin/modules/sysadmin/bin/check_portal.php | Yes |
| 36 | sysadmin | ddnsupdate | @daily | 2022-04-02 00:00:00 | Class: FreePBX\modules\Sysadmin\Job\DdnsUpdate | Yes |
| 37 | sysadmin | checkstorage | @hourly | 2022-04-01 13:00:00 | Command: [ -x /var/lib/asterisk/bin/storage.php ] && /var/lib/asterisk/bin/storage.php | Yes |
| 38 | timeconditions | schedtc | * * * * * | 2022-04-01 12:30:00 | Class: FreePBX\modules\Timeconditions\Job | Yes |
| 40 | sysadmin | updatelicense | @daily | 2022-04-02 00:00:00 | Command: [ -x /var/lib/asterisk/agi-bin/update_license.php ] && /var/lib/asterisk/agi-bin/update_license.php --delay | Yes |
+----+----------------------+------------------------+-------------+---------------------+----------------------------------------------------------------------------------------------------------------------------------------+---------+
However that doesn’t seem to be the case as I can see activity in the log files but the queue reports aren’t showing this activity (ie. not being synced to database) and haven’t updated in the past hour since I manually synced and imported the data by running the commands via fwconsole;
fwconsole qxactreports --sync
fwconsole qxactreports --reimport="FILE_LIST" --sync
So it would seem to me that if these commands can sync and import the data then there must be something wrong with the CRON scheduled task. Perhaps it “thinks” it is running but in actuality it isn’t and I could regenerate the CRON job or manually create it?
EDIT: monitoring /var/log/cron I see nothing for the qxactreport command being triggered at the “next run” time that fwconsole says it was supposed to run. So it sure seems to me that fwconsole is simply wrong and the CRON job doesn’t exist.