Previous PageTable Of Contents../index.htmlIndexNext Page

cl_Open( )

Description | Termination Events | Cautions | Example | Errors | See Also

Name:

int cl_Open(phDevice, pszDeviceName, pUsrAttr)

Inputs:

long* phDevice

  pointer to returned call logging device handle

 

const char* pszDeviceName

  pointer to ASCIIZ string defining device to be opened and protocol to be used

 

void* pUsrAttr

  pointer to user-defined attribute for device

Returns:

0 on success
-1 on failure

Includes:

cllib.h

Mode:

synchronous

Top Of PageDescription

The cl_Open( ) function opens a call logging device and returns a call logging device handle that will be used to monitor the traffic on the line. The pszDeviceName parameter defines the protocol to be used, the method for retrieving L2 frames, and, if needed, the names of the HiZ devices to be used.

Parameter

Description

phDevice:

The pointer to the returned call logging device handle.

pszDeviceName:

The pointer to the ASCIIZ string that defines the call logging device to be opened and the protocol to be used. See below for a description of the format for this parameter.

pUsrAttr:

The pointer to the user-defined attribute for the specified call logging device.

The format of the pszDeviceName parameter is

These fields may be listed in any order. The format of each of these fields is

Table 12 below lists the valid keys and their acceptable values. All other keys are reserved for future use.


Table 12. pszDeviceName Field Values

Key

Meaning

Acceptable Values

P

Specifies the protocol name.

ISDN *
NET5
QSIGE1
4ESS
5ESS
DMS
NI2
QSIGT1

M

Specifies the method used to get L2 frames.

HDLC
FILE **

N

Specifies the name of the HiZ device that is connected to the network side. This key is ignored when the method used to get L2 frames is :M_FILE.

dtiB<n>

U

Specifies the name of the HiZ device that is connected to the user side. This key is ignored when the method used to get L2 frames is :M_FILE

dtiB<n>

* The protocol name ISDN specifically refers to the E-1 Euro-ISDN protocol, also known as NET5.

** Use FILE with the cl_DecodeTrace( ) for testing purposes. No physical device is needed when the FILE method is used to get L2 frames.

Top Of PageTermination Events

None

Top Of PageCautions

Top Of PageExample

Top Of PageErrors

The cl_Open( ) function does not return errors in the standard Call Logging API return code format because the error is a system, parameter, or GlobalCall error. Also, the standard ATDV_LASTERR( ) function requires a device handle and if cl_Open fails, there is none.

If an error occurs during the cl_Open( ) call, a -1 is returned and the specific error code is returned in the errno global variable. The error codes that can be returned if cl_Open( ) fails are:

Error Code Value

Returned When

ECL_NULLPARAMETER

invalid NULL parameter

ECL_GCOPENEX_NETWORK *

gc_OpenEx( ) failed on the network side

ECL_GCOPENEX_USER *

gc_OpenEx( ) failed on the user side

ECL_INVALIDPARAMETER

invalid parameter

ECL_NOMEM

out of memory

ECL_INTERNAL

internal Call Logging API error; cause unknown

*The following additional flag is set in these error code values to indicate that the error occrurred while the Call Logging API was calling a GlobalCall function:

ECL_FLAG_INSIDE_GC

use gc_ErrorValue( ) for an additional error description

See 2.2 Error Handling for more information about what kinds of errors can cause these codes to be returned.

Top Of PageSee Also


Previous PageTable Of ContentsTop Of PageIndexNext Page

Click here to contact Dialogic Customer Engineering

Copyright 2001, Dialogic Corporation
All rights reserved
This page generated February, 2002