




7.2. Debugging Applications that Use ICAPI Protocols
The parameters shown in Table 19 are available in the icapi.cfg file as debugging tools. Unless otherwise instructed, these parameters should retain their original settings.
The icapi.cfg file is located in the following directory:
- For Linux: /usr/dialogic/cfg
- For Windows: \Program Files\Dialogic\cfg
When logging is enabled, the log file generated is icapi.log.<pid>, where pid = the process identification number.
For Linux applications, the log file is generated by compiling the country.c file with the symbol DEBUG defined and then setting the parameters $11 and $12 in the icapi.cfg file as indicated in the following table. To write additional information directly to the ICAPI log file, use the rs_log_printf( ) function. This function works like the fprintf( ) function except that a file descriptor is not used.
For Windows applications, the log file is generated by setting parameters $11 and $12 in the icapi.cfg file as indicated in the following table.
Table 19. icapi.cfg File Parameters
|
Parameter
|
Description
|
$11
|
Logging utility (default = 0):
· Set to 0 to ignore parameters $12, $13 and $15.
· Set to 1 to enable logging, either to the screen (set $13 parameter to 1) or to the icapi.log.<pid> file to track all the events that occur at the device selected for monitoring (parameter $12). This setting enables the debug tools associated with the protocol. These tools help to locate the source of a protocol problem.
Note: Enabling logging is not recommended during normal operation due to the increased host processor loading.
· (Windows only) Set to 2 to enable logging to a memory buffer and to generate an icapi.inf file. The icapi.inf file contains the memory address where the debug information is stored.
|
$12
|
Number of the channel to be monitored (default = 0):
· A value of 0 means monitor all opened devices.
· A value of -1 means do not monitor any device.
· Entering a channel number designates the channel to be monitored.
|
$13
|
Echo on screen (default = 0):
· Set to 0 to ignore parameter.
· Set to 1 to send the debug information to the screen.
|
$14
|
Disable DTI Wait Call function (default = 0):
· The 0 default value causes the DTI Wait Call firmware function to wait for an incoming call at the board firmware level.
· A value of 1 causes the DTI Wait Call firmware function to wait for an incoming call at the ICAPI call control library level.
The value selected is protocol-dependent; do not change the default value unless instructed to do so in the documentation for your protocol.
|
$15
|
(Linux only) Size of debug memory (default = 1; that is, 1 = 1 event or action in memory)
The debug memory saves passed actions or events to a buffer. The built-in debug function does not use this feature. Change this parameter only if you implement your own debug function and you need a larger circular buffer than 1 event or action.
· Set to 1 to store one action or event in the buffer.
· Set to 0 to ignore feature (default).
|
$18
|
Enables cadenced tones, such as ringback and busy, to be played using the firmware rather than using host-based function calls such as dx_playtone( ) and sleep( ).
· Set to 0 to disable firmware cadence tones (default).
· Set to 1 to enable firmware cadence tones.
|
Any unspecified parameter defaults to 0. If parameters $13 and $15 are set to 0, they are ignored.
Parameters $16 and $17 (not shown in Table 19) are for backwards compatibility only and should not be changed.





Click here to contact Telecom Support Resources
Copyright 2003, Intel Corporation
All rights reserved
This page generated February, 2003