Tracing is controlled by checkboxes on the COPIAFACTS Options Page, Trace sub-page.  The trace file written by the program is named "nodename.TRx" where x is the day number in the week (Sunday = 0).  When tracing to file is enabled, a new file is started automatically at midnight, overwriting the previous week's file.  When the COPIAFACTS program is started with tracing enabled, a new 'session' is added to any existing file for the day number. Normally, therefore, trace files for the preceding week are preserved in case it is necessary to refer to them for problem resolution.

The following checkboxes control the destination for tracing:

Trace to displayDisplays the trace on the Summary, Trace and Scrollback pages on the COPIAFACTS console.
Trace to fileWrites the trace lines to file. File writes are normally buffered unless the Flush Trace Buffer run-time option is enabled.  Copia support staff may ask you to set that option in order to capture the trace immediately before an abnormal termination.  The trace file can be viewed using TRCVIEW.  Using TRCVIEW on the same node as COPIAFACTS causes the trace buffer to be flushed by COPIAFACTS before loading the trace file. To flush the trace buffer prior to viewing the trace file in TRCVIEW on another node, click once in the large globe icon at the top left of the window.

The checkboxes listed below specify what is traced.  If none are set, only a single trace line is written for each incoming or outbound transaction, along with any error message or debugging options output that is specified.

Trace processing statesTraces each processing state visited during the transaction. You should always set this option on when any debugging options are set, to provide a context for the debug messages.  This checkbox also causes 'events' signalled by Dialogic and some other boards to be logged.
Trace hardware operationsTraces all the calls to the hardware-specific functions in the COPIAFACTS board-specific dynamic link libraries. Note that some calls will be logged even if they are not implemented for the specific board.
Trace IIF actionsYou should always enable this trace while testing infobox logic, whether for custom IVR or for pre- and post-processing.  It traces all $set_var variable assignments, $script texts, $set_state traps, and a number of other useful data items.
Trace outbound queueYou should enable this trace when COPIAFACTS seems not to be processing FS files which you feel are ready for transmission.  It lists each pass through the FS file search operations, showing all FS files considered for processing along with the reason for selecting or not selecting each one.  Because it can produce a huge amount of output, the checkbox will be cleared and outbound queue tracing disabled after two minutes (or three minutes if you enable the setting before startup).  To leave the setting on permanently, use control-click to set the checkbox.  This setting is not saved with other settings.

Tracing call results

To add a second 'result' trace line to each transaction, in addition to the single basic trace line, you can add RESULT_ variable definitions in FAXFACTS.CFG.  Each variable controls specifies values which are to be printed in the trace for each type of operation.  For example:

$var_def RESULT_EMAIL "Email to @EMAIL_TO (@OC_DESC) @OC_CODE {@FSNUM}"

would print a trace line containing expanded variables which might contain:

Result: Email to steve@copia.com (success) 0 {12345678.FS}

You can choose any variables from Appendix D that are valid in a result context to be expanded in the trace.  A suggested set of variables to add to FAXFACTS.CFG is as follows:

$var_def RESULT_FAXOUT  "Fax to @RCVRFAX (@OC_CODE: @OC_DESC) {@FSNUM}
                           Pg=@OC_SENTPAGES Att=@OC_ACOUNT Sec=@OC_ACALLTIME Baud=@TXBAUD"

$var_def RESULT_EMAIL   "Email to @EMAIL_TO (@OC_CODE: @OC_DESC) {@FSNUM}"

$var_def RESULT_VOICE   "Voice to @DIALED_DIGITS (@OC_CODE: @OC_DESC) {@FSNUM}"

$var_def RESULT_FAXIN   "Fax in @DNIS ANI=@ANI (PR_FAXSTAT: @PR_OUTCOME) {@PR_FAXFILE} Pg=@PR_FAXPAGES"

$var_def RESULT_IVR     "IVR to @DNIS ANI=@ANI"

$var_def RESULT_JOB     "Job action @JOB_ACTION (@OC_CODE: @OC_DESC) {@FSNUM}"

$var_def RESULT_PREVIEW "Preview for @PREVIEW_TYPE (@OC_CODE: @OC_DESC) {@FSNUM}"

$var_def RESULT_WORKER  "Worker infobox @AUTOCALL (@OC_CODE: @OC_DESC) {@FSNUM}"

For users who send very long faxes, there is also a RESULT_FAXPAGE variable which shows its content in the trace at the end of each fax page sent.  Use PR_FAXPAGES to show the incrementing page count.

Trace File Summaries

At the end of each COPIAFACTS session, and at the end of the day if the engine runs continuously, a summary is printed showing the current totals from the eight boxes on the Summary page.  In addition, for systems with inbound fax or voice lines, an analysis is printed of activity on these lines.

The top row shows clock hours of the day.  Each subsequent row analyzes times when the specified number of lines were active, showing the number of minutes of that hour for which this number of lines was active.  The analysis below is from a system which has five inbound lines:

Inbound lines:TOTAL 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23

5-active mins:   42  0  0  0  0  0  0  0  9 10 23  0  0  0  0  0  0  0  0  0  0  0  0  0  0

4-active mins:   69  0  0  0  0  0  0  0 18 23 19  0  3  3  0  2  0  0  0  0  0  0  0  0  0

3-active mins:  110  0  0  0  0  0  0  0 24 18 12  3  7  9  3  3 13  4 12  0  0  0  0  0  0

2-active mins:  244  0  0  0  0  0  9  2  8 10  6 13 17 14 11  7 27 55 47 15  0  0  0  0  0

1-active mins:  203  0  0  0  3 14 17 31  0  0  0 23 20 15 27 22 19  0  0  6  0  4  1  0  0

0-active mins:  773 60 60 60 57 46 33 27  0  0  0 19 13 18 18 25  0  0  0 39 60 56 59 60 60

The analysis shows that for 42 minutes (9+10+23) between 7am and 10am, all five inbound lines were busy.  This implies that any additional calls during those 42 minutes did not get though to the system because all inbound lines were in use.  Clearly this system should consider configuring additional inbound lines.

The analysis counts not only the minutes a line was occupied on inbound calls: it records time spent on any call for lines which are configured for inbound.  So reserving some lines for inbound calls only (if your telephone connection can do this) may also increase the capacity for inbound calls.

Values are recorded in milliseconds but are displayed rounded to the nearest whole minute, so some columns may not add up exactly to 60 and some items may show as zeros if there was only one call that lasted less than 30 seconds.

You can assign (with $set_var in an infobox) a non-empty value to the WRITE_COUNTERS variable to write the current summary block content, including the above table, to a nodename_COUNTERS.txt file in the FAXFACTS\LOG folder at any time.