Extending the DBF log file

Additional data fields can be added to the daily DBF log file.  Fields can be defined using the $log_field configuration command, then filled by assignment to the DATAx variable.

Specifying the data field

There are examples in the $log_field topic.  Fields DATA5 to DATA9 can be added, with field lengths specified, such as:

$log_field DATA5 32

To contain data such as DNIS and ANI in the NANP area, where telephone numbers may or may not have a leading 1 digit, specify that you only need the rightmost 10 digits using:

$log_field DATA5 R10

Applying the field changes

Because the DBF format includes a header describing the fields, changing the format in an active file can render it unreadable.  The following procedure must therefore be used to change the file format:

Shut down all COPIAFACTS instances

Rename the current day's log file (yyyymmdd.DBF)

Make the changes to the $log_field commands in FAXFACTS.CFG

Restart the COPIAFACTS engines and allow them to create a new daily log file in the new format.

Assigning data field content

There are various ways of assigning to a DATAx field:

 Using log options

For a few special cases, the $log_options command keywords allow specific data items to be placed in certain fields, for example:

         $log_option imgdata5

 Using variable definitions

For outbound calls, $var_def commands for DATAx variables in the FS file can be used to assign values to DATAx fields, for example:

         $var_def DATA7 "@ROUTETO"

         $var_def DATA8 FFMERGE

 Using assignments

In infobox logic, $set_var commands for DATAx variables can be used to assign a constructed value to the field.

         $set_var DATA6 @MYVAR1/@MYVAR2

 Using USR variables for inbound calls

For inbound fax calls variables may be specified in the USR file with two @ signs.  The variables are expanded when the USR is first read, and then expanded again when the inbound call is processed, with data from the call.

         $var_def DATA5 @@ANI

         $var_def DATA6 @@FOIP_FROM

In this example the actual ANI value (@ANI, expanded) is placed in DATA5, and the SIP From: header value (@FOIP_FROM, expanded) is placed in DATA6.  These also appear as $var_def commands in the MCF file for the inbound call.

Processing extended DBF files

If you concatenate daily DBF files using CATDBF or CATDBFX, you should ensure that all the files in one concatenation have a common field format and content.