Statistics re-parsing is the process of removing corrupt or inaccurate xDR files for a target period from the database and uploading new records. That's useful especially at a time when you need to parse one-day statistics once again due to wrong data in files or a new collector in usage.

(warning)   Attention

This procedure is considered unrecoverable, so utmost caution should be applied while performing it.


Before starting this process, please make sure that you have all the needed xDR files to upload to substitute deleted records. If you have any doubts and you do this for the first time, we highly recommend contacting our support engineers for receiving additional help.

To perform one-day statistics re-parsing

Case 1.  When CDRs of this day are stored on the softswitch. Follow these steps:

  1. Go to Statistics > Archive Management and delete statistics of a target day by enabling a checkbox opposite it in  column and pressing Process button. Wait till Statistics Manager tool deletes files from the database and rolls back clients' balances.

    Screenshot: Archive Management settings

  2. Then go to Gateways > Downloads History and remove xDR files this day from download history (for all gateways).

    For instance, if you need to remove xDR fields history for September 26, 2016, select respective entries and click Delete button. You can just type the following 201609276 in a Search bar to simplify the process of finding the required files.

    Screenshot: Downloads History tab

Case 2.  When xDRs of this day are NOT stored on the softswitch. Follow these steps:

1. Check the existence of these xDR files for all gateways in /usr/local/vcs/var/cdrs_parsed/host_(id of gateway) folder for VCS version 3.12.0 and lower or /opt/jerasoft/vcs-data/external/xdrs_parsed/host_(id of gateway) folder for VCS version 3.13.0 and higher

2. Go to Statistics > Archive Management and mark checkbox opposite a target day in  column.  After that press Process buttonWait till Statistics Manager deletes files.

3. Then move xDRs of a respective day from the xdrs_parsed folder (cdrs_parsed for older versions)  to the xdrs folder (cdrs for older versions)  for each gateway.


  • For older VCS versions
mv /usr/local/vcs/var/cdrs_parsed/host_11/cdr_20140401_* /usr/local/vcs/var/cdrs/host_11/
mv /usr/local/vcs/var/cdrs_parsed/host_12/cdr_20140401_* /usr/local/vcs/var/cdrs/host_12/
  • For newer VCS versions
mv /opt/jerasoft/vcs-data/external/xdrs_parsed/host_11/cdr_20140401_* /opt/jerasoft/vcs-data/external/xdrs/host_11/
mv /opt/jerasoft/vcs-data/external/xdrs_parsed/host_12/cdr_20140401_* /opt/jerasoft/vcs-data/external/xdrs/host_12/

(warning)   Attention

Please note that your xDR files names will be different from the ones in the given example, so make sure you use the correct alias and correct gateway id folder, which are usually named like host_11, host_12, etc.

4. Usually, your parsed xDRs are archived, so now you need to extract them:

  • if you have .gz format, you need to run gunzip *
  • if you have tar.gz format, you need to run tar -zxvf *

5. Check if the owner of these files is vcs user. If it's not - run sudo chown vcs:vcs *

6. Check if these files are allowed for reading/writing for all users. If not, run sudo chmod 777 *

7. Wait till the system processes and calculates these files.