This page describes the configuration properties of the CDR resource adaptor. These properties are passed to the createRAEntity
management operation when deploying the CDR resource adaptor.
Configuration properties
The following properties are passed to the createRAEntity
management operation when deploying the CDR resource adaptor.
Property | What it does | Default | ||||
---|---|---|---|---|---|---|
|
Name of the directory into which the CDRs will be written. The resource adaptor must have write permissions for it. This parameter is mandatory.
|
|
||||
|
The CDR file type to use. Either |
|
||||
|
Pattern used to generate final CDR filenames.
|
|
||||
|
Prefix used as part of the temporary CDR filename. That is, the file to which currently generated call data records are written.
|
|
||||
|
Approximate maximum size in bytes before a new CDR file is started. After a CDR is written, the total file size is compared to
|
|
||||
|
Number of CDRs to be written to a CDR file before a new file is started. The line count does not include the header and footer lines, if enabled.
|
|
||||
|
Number of milliseconds of operation before time-based file rollover. If a CDR file is used for more than
|
|
||||
|
If |
|
||||
|
If |
|
||||
|
If If |
|
||||
|
Command to run on each CDR file completion. The resource adaptor must have execute permissions for the designated command.
If empty, no command is run.
|
empty |
||||
|
Character encoding to use for the output file. |
|
||||
|
Time, in milliseconds, to wait for a CDR write to complete before returning a timeout error to the calling SBB. |
|
||||
|
Delay, in milliseconds, to wait after a CDR write error before attempting another CDR write. |
|
||||
|
If If
|
|
||||
|
If If
|
|
Filename patterns
The FilenamePattern
configuration parameter should include escape sequences that are replaced to generate unique filenames.
The supported sequences are:
Sequence | Description |
---|---|
|
A literal '%' character |
|
File completion timestamp, as milliseconds since Jan 1 1970 00:00 UTC |
|
File creation timestamp, as milliseconds since Jan 1 1970 00:00 UTC |
|
Auto-incrementing file sequence number, starting at 1 |
|
File completion timestamp, formatted as YYYYMMDDhhmmss |
|
File creation timestamp, formatted as YYYYMMDDhhmmss |
|
Rhino node ID responsible for creating this file |
Property expansion
Certain CDR resource adaptor configuration properties support system property expansion. This mechanism is similar to expanding variables in a shell. That is, when a string like:
${some.property}
appears as part of a configuration property value, it will be expanded to the value of the system property. For example,
${user.home}/cdr
will expand ${user.home}
to use the value of the user.home
system property. If that property’s value is /home/cathy
, then the above is equivalent to
/home/cathy/cdr
In order to assist in platform-independent configuration, you can also use the special notation of ${/}
, which is a shortcut for ${file.separator}
.
Persistence, error handling, and operational state
If both WriteWait
and WriteSync
configuration properties are set to True
, the CDR resource adaptor ensures that all written CDR data has been flushed to disk (using java.io.FileDescriptor.sync()
) before returning to a SBB. In that case, after a successful writeCDR
call, SBBs should assume that all CDR data has been saved to disk.
If there is a write error while writing the CDR, and the WriteWait
configuration property is True
, this will be reported to the SBB as an IOException
. If the CDR could not be written within the configured WriteTimeout
of the RA entity, com.opencloud.slee.resources.cdr.WriteTimeoutException
(a subclass of IOException
) is reported to the SBB.
In general, receiving an exception means that the CDR RA could not guarantee that the CDR was successfully written. (It might eventually be written successfully, but there is no guarantee.) |
Under normal operation, CDRProvider.isOperational()
returns True
. If a write error or timeout error occurred recently, isOperational()
returns False
and all attempts to write CDRs are immediately rejected without attempting to write them to disk. This state persists for 2
*WriteTimeout
milliseconds (for timeout errors) or WriteRetry
milliseconds (for write errors). Additionally, isOperational()
returns False
if the RA entity is currently deactivated. Services should test isOperational()
if they wish to behave differently when CDR writing is unavailable due to error.
In the event of a write error, or if a Rhino node unexpectedly exits, partial CDR files may be left in the CDR directory. With the default configuration value of TempFilePrefix
, these files are named cdr_nodeID_*.tmp
where *
denotes a random number. If they contain useful CDR data, these files will need to be manually examined and processed.