
Description | Termination Events | Cautions | Example | Errors | See Also
Name: |
int cl_DecodeTrace(hDevice, pszFileName) | |
Inputs: |
long hDevice |
|
const char* pszFileName |
| |
Returns: |
0 on success | |
Includes: |
cllib.h | |
Mode: |
synchronous | |
The cl_DecodeTrace( ) function decodes a previously recorded L2 frames trace file and posts the call logging events to the SRL. The events are posted as if the L2 frames recorded in the trace file were actually monitored on the line when they were occurring. Since trace files do not contain time information, the call logging events are generated at a high rate.
The cl_DecodeTrace( ) function is used primarily for testing. The SnifferMFC sample application provides an ISDN log file that can be used in conjunction with cl_DecodeTrace( ).
Parameter |
Description |
hDevice: |
The device handle of the call logging device. |
pszFileName: |
A pointer to the ASCIIZ string that specifies the path and name of the recorded L2 frames trace file. |
None
#include <srllib.h>
#include <cllib.h>
#include <stdio.h>
/* The Call Logging Device Handle */
extern long g_hDevice;
void DecodeTraceFile(const char* pszTraceFileName)
{
if (g_hDevice != EV_ANYDEV)
{
if (cl_DecodeTrace(g_hDevice, pszTraceFileName) != 0)
{
printf("DecodeTraceFile - cl_DecodeTrace() failed\n");
}
}
}
If the function returns a value <0, use the SRL Standard Attribute function ATDV_LASTERR( ) to obtain the error code or use ATDV_ERRMSGP( ) to obtain a descriptive error message. The error codes that can be returned by ATDV_LASTERR( ) are:
Error Code Value |
Returned When |
ECL_NULLPARAMETER |
invalid NULL parameter |
ECL_FILEOPEN |
fopen failed |
ECL_FILEREAD |
fread failed |
ECL_UNSUPPORTED |
function not supported |
ECL_NOMEM |
out of memory |
ECL_INTERNAL |
internal Call Logging error; cause unknown |
See 2.2 Error Handling for more information about what kinds of errors can cause these codes to be returned.
Click here to contact Dialogic Customer Engineering
Copyright 2001, Dialogic Corporation