Thanks for your response. I do follow the correct upgrade procedure, though I didn't realize I was running a Master version. I did get my CDR to report accurately by following these steps:
FusionPBX CDR Not Updating: Troubleshooting & Recovery Checklist
1. Confirm XML CDR Module is Enabled
- Go to Advanced → Modules in FusionPBX.
- Ensure XML CDR is enabled and running.
2. Check for XML CDR Files
- On your server, look in /var/log/freeswitch/xml_cdr/.
- If XML files are accumulating here, it means calls are being logged but not imported into the database.
3. Verify the CDR Import Cron Job
- Run crontab -l and check for:
* * * * * /usr/bin/php /var/www/fusionpbx/app/xml_cdr/xml_cdr_import.php 300
If missing, add the line above * * * * * /usr/bin/php/var/www/fusionpbx/app/xml_cdr/xml_cdr_import.php 300
To do this, check “
How to Add the CDR Import Cron Job” at the bottom of this document.
4. Run the Database Schema Upgrade
- In FusionPBX, go to Advanced → Upgrade.
- Click Schema and App Defaults to apply necessary database updates after any upgrade.
5. Reload XML and Restart the XML CDR Module
Command Line:
fs_cli -x 'reloadxml'
fs_cli -x 'reload mod_xml_cdr'
- Or restart FreeSWITCH if needed.
6. Manually Run the Import Script
- To trigger import immediately, run:
Command Line:
php /var/www/fusionpbx/app/xml_cdr/xml_cdr_import.php 300
- Check if CDRs now appear in the FusionPBX interface.
7. Check Permissions
- Ensure the web server user (often www-data) owns and has read/write access to /var/log/freeswitch/xml_cdr/ and its files.
8. Check Logs for Errors
- If issues persist, check /var/log/php_errors.log, /var/log/apache2/error.log, and FusionPBX logs for clues.
How to Add the CDR Import Cron Job
- Open your terminal.
- Edit your crontab by typing:
Command Line:
crontab -e
This command opens your personal cron schedule in a text editor
2478.
- Go to the bottom of the file and add this line:
Command Line:
* * * * * /usr/bin/php /var/www/fusionpbx/app/xml_cdr/xml_cdr_import.php 300
(Make sure the path to php and the script matches your system. If your PHP is somewhere else, adjust the path accordingly.)
- Save and exit the editor.
- For nano: Press Ctrl+O (to write out), then Enter, then Ctrl+X (to exit).
- For vi/vim: Press Esc, type :wq, then press Enter.
5. The cron job is now scheduled and will run every minute.