Problems with call details records(CDR)

medeiros

New Member
Dec 2, 2025
7
0
1
19
Good morning,

I have the following problem, my server is working perfectly, calls, etc., but when I receive or make calls, they take a long time to go through and sometimes they don't even go through in the CDR, I have already updated the schema, but the problem has not been resolved, can anyone help me?
 
Open xml_cdr.conf.xml file with this command
nano /etc/freeswitch/autoload_configs/xml_cdr.conf.xml
Comment out the following line if it's not already. To do this wrap <!-- at the beginning of this line and --> at the end
Then run the following command
fs_cli -x "reload mod_xml_cdr"
New calls will be saved to the file system then use this command
crontab -e
Add this line will load the call detail records from the file system.
* * * * * cd /var/www/fusionpbx; /usr/bin/php /var/www/fusionpbx/app/xml_cdr/xml_cdr_import.php 200 >/dev/null 2>&1

FusionPBX 5.4 and higher use a service called xml_cdr instead of this cron job.
 
My file is already commented, and my cron is configured like this, would just changing the cron solve the problem?

* * * * * /usr/bin/php /var/www/fusionpbx/app/xml_cdr/xml_cdr_import.php 300
 
root@pabx:/home/ubuntu# tail -f /var/log/cronpabx.log
#1 /var/www/fusionpbx/app/xml_cdr/xml_cdr_import.php(58): xml_cdr->read_files()
#2 {main}
thrown in /var/www/fusionpbx/app/xml_cdr/resources/classes/xml_cdr.php on line 693

Fatal error: Uncaught Error: Call to undefined method xml_cdr::move_to_failed() in /var/www/fusionpbx/app/xml_cdr/resources/classes/xml_cdr.php:693
Stack trace:
#0 /var/www/fusionpbx/app/xml_cdr/resources/classes/xml_cdr.php(1591): xml_cdr->xml_array()
#1 /var/www/fusionpbx/app/xml_cdr/xml_cdr_import.php(58): xml_cdr->read_files()
#2 {main}
thrown in /var/www/fusionpbx/app/xml_cdr/resources/classes/xml_cdr.php on line 693
PHP Fatal error: Uncaught Error: Call to undefined method xml_cdr::move_to_failed() in /var/www/fusionpbx/app/xml_cdr/resources/classes/xml_cdr.php:693
Stack trace:
#0 /var/www/fusionpbx/app/xml_cdr/resources/classes/xml_cdr.php(1591): xml_cdr->xml_array()
#1 /var/www/fusionpbx/app/xml_cdr/xml_cdr_import.php(58): xml_cdr->read_files()
#2 {main}
thrown in /var/www/fusionpbx/app/xml_cdr/resources/classes/xml_cdr.php on line 693

Fatal error: Uncaught Error: Call to undefined method xml_cdr::move_to_failed() in /var/www/fusionpbx/app/xml_cdr/resources/classes/xml_cdr.php:693
Stack trace:
#0 /var/www/fusionpbx/app/xml_cdr/resources/classes/xml_cdr.php(1591): xml_cdr->xml_array()
#1 /var/www/fusionpbx/app/xml_cdr/xml_cdr_import.php(58): xml_cdr->read_files()
#2 {main}
thrown in /var/www/fusionpbx/app/xml_cdr/resources/classes/xml_cdr.php on line 693

I configured a file in cron to generate logs and it is showing these errors