Storing CDRs Locally on the Device
CDRs generated by the device can be stored locally on the device (RAM).
You can specify the calls for which you wish to create locally stored CDRs. This is done using Logging Filter rules in the Logging Filters table. For example, you can configure a rule to create locally stored CDRs for traffic belonging only to IP Group #2.
Locally stored CDRs are saved in a comma-separated values file (*.csv), where each CDR is on a dedicated row or line. An example of a CSV file with two CDRs are shown below
:
|
■
|
CSV file viewed in Excel: |
|
■
|
CSV file viewed in a text editor (Notepad): |
The device's CLI provides enhanced support for performing various actions on locally stored CDRs:
|
■
|
To view the CDR column headers corresponding to the CDR data in the CSV file:
|
(config-system)# cdr
(cdr)# cdr-format show-title local-storage-sbc
session id,report type,call duration, call end time, call connect time,call start time, call originator, termination reason, call id, srce uri, dest uri
(config-system)# cdr
(cdr)# cdr-format show-title local-storage-gw
|
■
|
To view stored CDR files: |
|
●
|
View all stored CDR files: |
# show storage-history
|
●
|
View all stored, unused CDR files: |
# show storage-history unused
|
■
|
To copy stored CDR files to a remote destination: |
# copy storage-history cdr-storage-history <filename> to <protocol://destination>
Where:
|
●
|
filename: name you want to assign the file. Any file extension name can be used, but as the file content is in CSV format, it is recommended to use the .csv file extension. |
|
●
|
protocol: protocol over which the file is sent (tftp, http, or https). |
For example:
copy storage-history cdr-storage-history my_cdrs.csv to tftp://company.com/cdrs
|
●
|
If the devicerestarts or powers off, locally stored CDRs are deleted.
|
|
●
|
Locally stored CDRs are applicable only to "CALL_END" CDR Report Types and to SBC signaling and Gateway CDRs. |
|
●
|
When the device operates in High-Availability (HA) mode, active and redundant devices maintain their own stored CDRs. In other words, upon an HA switchover the stored CDRs on the active device are not copied to the redundant device (which becomes the new active device).
However, you can view the stored CDRs on the redundant device without performing a switchover, by accessing the redundant device from the active device through SSH (or SFTP), as described in Accessing Files on Redundant Device from Active through SSH. |
|
➢
|
To configure local CDR storage: |
|
1.
|
Open the Logging Filters table (see Configuring Log Filter Rules), and then enable CDR local storage by configuring a log filtering rule with the following settings: |
|
●
|
'Filter Type' and 'Value': (as desired) |
|
●
|
'Log Destination': Local Storage |
|
2.
|
Open the Call Detail Record Settings page (Troubleshoot menu > Troubleshoot tab > Call Detail Record folder > Call Detail Record Settings), and then configure the following parameters: |
|
●
|
'File Size' [CDRLocalMaxFileSize]: Enter the maximum size (in kilobytes) of the CDR file. When the Current file reaches this size, the device creates a CDR file. However, if the 'Rotation Period' is reached before the file has reached this maximum size, the CDR file is created.
|
|
●
|
'Number of Files' [CDRLocalMaxNumOfFiles]: Enter the maximum number of CDR files. If this maximum is reached, any new CDR file replaces the oldest CDR file (i.e., FIFO). |
|
●
|
'Rotation Period' [CDRLocalInterval]: Enter the periodic duration (in minutes) of how often a CDR file is created from the Current file (even if empty). For example, if configured to 60, a file is created every hour (or before, if the maximum size has been reached). |
For a detailed description of each parameter, see Syslog, CDR and Debug Parameters.
If the CDR storage feature is enabled and you later change the maximum number of files (using the [CDRLocalMaxNumOfFiles] parameter) to a lower value (e.g., from 50 to 10), the device stores the remaining files (e.g., 40) in its memory as unused files.