Call Detail Records (CDR) compile data of exchanges and include every received and generated event that is processed by an application. For more information on accessing CDRs from the web UI or API, see Application Programming Interface or Web-Based User Interface.
The CDR Service is an internal component that manages and organizes CDRs in an application database. This service, called xpressworkx_cdr_services, is run on each Application Server (AS), can be restarted using normal OS service management, and is partially managed by a series of cron jobs all of which are explained in further detail in the rest of this chapter.
Note
In a clustered environment, the CDR Service runs on both the primary and secondary NIU.
The CDRs generated by each application are stored in application-specific SQLite databases on each AS. The following is a list of the database files for the IMS Suite:
/var/opt/xpressworkx/cdr/icscf.cdr.db
/var/opt/xpressworkx/cdr/scscf.cdr.db
/var/opt/xpressworkx/cdr/ecscf.cdr.db
/var/opt/xpressworkx/cdr/sccas.cdr.db
/var/opt/xpressworkx/cdr/ipsm.cdr.db
/var/opt/xpressworkx/cdr/vsui.cdr.db
CDRs are collected on each AS individually and then pulled into the main database to view in the web interface or access in the JSON API. This process occurs by default every night at midnight and is done by two separate cron jobs.
The first cron job is run for each application on each AS individually and prepares the CDRs collected on the AS for transfer to the NIU.
xpressworkx-cdr-partition icscf
xpressworkx-cdr-partition scscf
xpressworkx-cdr-partition ecscf
xpressworkx-cdr-partition sccas
xpressworkx-cdr-partition ipsm
xpressworkx-cdr-partition vsui
This process moves the currently active SQLite database to a timestamped file with the following format:
/var/opt/xpressworkx/cdr/<app>.cdr-<timestamp>.db
Important
Each time this cron job runs, a new timestamped database file is made. This should be monitored for disk space consumption.
By default, the partitioning process runs every day at midnight server time. However, the frequency can be changed to meet your specific requirements. Make sure that the partitioning process on each AS runs at least as frequently as the synchronize process on each NIU.
The second cron job is run for each application on the primary NIU and pulls the partitioned CDRs from each AS into the main database.
xpressworkx-cdr-synchronize icscf
xpressworkx-cdr-synchronize scscf
xpressworkx-cdr-synchronize ecscf
xpressworkx-cdr-synchronize sccas
xpressworkx-cdr-synchronize ipsm
xpressworkx-cdr-synchronize vsui
This job runs an rsync of every timestamped file, copying these files from each AS and moving them to a backup directory on the AS. This only occurs when xpressworkx-cdr-partition
has been run.
On the NIU, xpressworkx-cdr-synchronize
writes records from the SQLite databases to the main Postgres database. Once the records are written, the SQLite database on the NIU is deleted.
Important
CDR access through the web UI and API is not available until after this has occurred.
Important
This job must be monitored for errors and expected volume of data.
By default, the synchronization process runs every day at midnight server time. However, the frequency can be changed to meet your specific requirements.
The cleanup process runs on each AS and deletes all timestamped files in the database that are older than the specified retention period.
By default, the cleanup process runs every day at midnight server time and deletes all files in the backup directory that are older than 7 days. However, both the frequency and retention period can be changed to meet your specific requirements.
This retention period can be found and modified in the /var/opt/xpressworkx/cdr/cdr-service-config.yml file.
Tip
The retention period must be set to at least once a day.
The cleanup process does not remove CDR database partitions that have not yet been synchronized. Only files found in the /var/opt/xpressworkx/cdr/backup directory can be removed, and a delay in or cancellation of synchronization from the NIU will not result in lost records.
The frequency of this job can be changed to meet your specific requirements and prevent unwanted consumption of disk space.
The database cleanup process xpressworkx-cdr-cleanup-database
runs on the NIU and deletes all files in the main Postgres database that are older than the specified retention date.
This retention period can be found and modified in the /var/opt/xpressworkx/app-manager/cdr/<app>/cdr-synchronization-config.yml file.