Ongoing Issue With CDR

mc6650

Member
Apr 8, 2019
128
7
18
62
Hello
I have an ongoing issue with the CDR. The last record showing is from 26 Mar 2025. I have made other calls after that date, however they're not showing up. I believe this a bug that has been reported. I'm running version 5.4.3. How can I correct this issue and is there a fix for it or will I have to resort to correcting something every time I do an upgrade? By that I mean if someone tells me how to correct the issue, will the CDR fail the next time I do an upgrade? Thanks in advance for any help that can be provide.
June 9, 2025 - CDR Issue.jpg
 
Try FS PBX. We thoroughly test everything before updates come out. We haven't had an issue with updates in many years. Our users aren't afraid to perform updates. And hour CDR details with time line are on the next level. And it's free to use.

Untitled design.jpg
 
Thanks for the recommendation. I would like to stay with FusionPBX and correct the issue with the CDR. Does anyone have an idea how this can be done?
 
  • Like
Reactions: markjcrane
I do not know of any proven correlation that would exclude you from updating FusionPBX and that would stop the CDRs from updating. Run every FusionPBX update option 1 at a time in successsion. Do not skip any upgrade options. If you watch the changes in github you will notice there have been multiple improvements to the cdr application in the past 2 weeks.

Make sure your crontab is executing the CDR imports, or better still, restart the CDR service, which performs CDR imports nearly instantly instead of every minute with the crontab CDR imports. Restarting the service fixed my cdr importing issue.

If the issue persists submit a ticket to fusionpbx.
 
Hi,


We are experiencing issues with the CDRs after updating FusionPBX to the latest version (5.3.8). As shown in the attached screenshot, some calls that were answered by agents are incorrectly marked as "Failed." In other cases, answered calls are being shown as "Missed."


This issue is affecting our live customers, and we are receiving complaints. Please advise on how we can resolve this as soon as possible.

1749639682049.png

1749639613416.png


1749638635013.png
 
@whut

You are using FusionPBX 5.4.3 which is Master version. This comes with rolling updates and bugs do come with it.
It is designed as testing platform.
As someone recommended, always run all within update - upgrade, then schema, then App defaults, then menu/permission.
I caught few bugs by running those, even though they might not be needed.
Always go to SIP Status and clear cache, reload and rescan.

If you want stable release for production, use the current 5.3.8.

The 5.4 branch will be released soon as current/stable.

As for FS PBX, last time I checked they were running it on 5.1.x version which is outdated and one reason why I'm reluctant about it.
The newer release of FS PBX does have all-in-one install, which is easier for many. Haven't checked it out yet.
 
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

  • On your server, run:
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

  1. Open your terminal.
  2. Edit your crontab by typing:
Command Line:

crontab -e

This command opens your personal cron schedule in a text editor2478.

  1. 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.)

  1. 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.
 
  • Like
Reactions: markjcrane
@whut @NVGcom FS PBX used to be based on FusionPBX 5.1, but it has evolved since then, and there is very little FusionPBX left in it. FS PBX is stable and backward compatible. Any updates are installed as one command, and all background processes are refreshed and updated automatically. So there is no guessing work. Installation is one command too. The database structure is kept as close to the original FusionPBX as possible, so it's an easy migration. We do these every day for our clients.