Previous PageTable Of Contents../index.htmlIndexNext Page



1.6. Call Logging Scenarios

This section provides scenarios for typical call logging applications. The scenarios include Call Logging API functions and functions from other libraries, such as the GlobalCall API, the SRL and the Voice API. For more information about Call Logging API functions, see Chapter 3: Call Logging Function Reference. For more on functions from other APIs, refer to the GlobalCall API Software Reference or the Voice Software Reference: Standard Runtime Library for Windows, as appropriate.

This section also describes the Call Logging API functions that are called by the SnifferMFC sample application.

Refer also to Appendix A for sample code demonstrating the use of various call logging functions and other API functions in a network monitoring application.

NOTE:
Because the Call Logging API is not multithread-safe and call logging functions must be called in the same thread, Asynchronous is the only programming model to use for call logging applications.

Table 3 provides the start-up scenario for a typical call logging application.


Table 3. Application Start-Up Scenario

Function

Description

gc_Start( )

Starts the GlobalCall application.
gc_Start( ) must be called before
cl_Open( )
once per process. See the GlobalCall API Software Reference for detailed information about using this function.

cl_Open( )

Opens the call logging device, loads the semantics rules for the specified CCS protocol, and returns the call logging device handle.

sr_enbhdlr( )

Enables the call logging event handler.

cl_GetSemanticsStateCount( )

(Optional) Gets the number of semantics states for the specified CCS protocol.

cl_GetSemanticsStateName( )

(Optional in a loop) Gets the names of the semantics states for the specified CCS protocol.

Table 4 provides the termination scenario for a typical call logging application.


Table 4. Application Termination Scenario

Function

Description

sr_dishdlr( )

Disables the call logging event handler.

cl_Close( )

Closes the call logging device.

gc_Stop( )

Stops the GlobalCall application.

Table 5 provides an event handling scenario of a typical call logging application. Table 6 provides an event handling scenario in which a CLEV_MESSAGE event is received and transaction recording takes place.


Table 5. Event Handling Scenario

Function

Description

sr_getevtdev( )

Gets the call logging device handle associated with the current event.

sr_getevttype( )

Identifies the kind of call logging event: CLEV_MESSAGE, CLEV_ALARM or CLEV_ERROR.

sr_getevtdatap( )

Obtains the call logging event data block (see Section 1.5.2: Retrieving Event Data).

cl_GetUsrAttr( )

Gets the user-defined attribute associated with the call logging device.


Table 6. Event Handling: CLEV_MESSAGE Scenario

Function

Description

cl_GetTransaction( ) or cl_GetTransactionDetails( )

Gets the call logging transaction ID and other details.

cl_SetTransactionUsrAttr( )

If the ECL_FIRST_MESSAGE bit is set in the iResult field of the call logging event data block*, use this function to associate the user-defined attribute with the transaction.

cl_GetTransactionUsrAttr( )

If the ECL_FIRST_MESSAGE bit is not set in the iResult field of the call logging event data block*, use this function to retrieve the user-defined attribute associated with the transaction.

cl_GetMessage( ) or cl_GetMessageDetails( )

If needed, gets the L3 message ID and other details, such as the source of theL3 message, the name of the L3 message, or the human-readable decoded text version of the L3 message..

cl_GetCalling( )

If needed, gets the calling party number..

cl_GetCalled( )

If needed, gets the called party number.

cl_GetChannel( )

If needed, gets the bearer channel (B channel) number.

dx_mreciottdata( )

If the ECL_CONNECT_MESSAGE bit is set in the iResult field of the call logging event data block*, use this function to start transaction recording.

dx_stopch( )

If the ECL_DISCONNECT_MESSAGE bit is set in the iResult field of the call logging event data block*, use this function to complete transaction recording.

cl_ReleaseTransaction( )

If the ECL_LAST_MESSAGE bit is set in the iResult field of the call logging event data block*, use this function to release the call logging transaction.

* See Section 1.5.2: Retrieving Event Data for more on the call logging event data block.

Table 7 provides a list of the Call Logging API functions that are called by the SnifferMFC sample application. The function name and source file name are also specified for easier reference.


Table 7. Call Logging Functions Called by the SnifferMFC Sample

SnifferMFC Sample Function name and Source File Name

Call Logging API Function

CSnifferMFCDoc::OnSnifferOpen( )
in SnifferMFCDoc.cpp

cl_GetSemanticsStateCount( )

cl_GetSemanticsStateName( )

cl_Open( )

CSnifferMFCOpenDlg::UpdateDeviceName( )
in SnifferMFCOpenDlg.cpp

construction of the pszDeviceName parameter of cl_Open( )

CSnifferMFCDoc::OnSnifferClose( )
in SnifferMFCDoc.cpp

cl_Close( )

CSnifferMFCDoc::EventHandler( )
in SnifferMFCDoc.cpp

cl_GetCalled( )

cl_GetCalling( )

cl_GetChannel( )

cl_GetMessage( )

cl_GetMessageDetails( )

cl_GetTransaction( )

cl_GetTransactionDetails( )

cl_GetUsrAttr( )

cl_GetVariable( )

cl_ReleaseTransaction( )

CSnifferMFCDoc::OnSnifferDecodetrace( )
in SnifferMFCDoc.cpp

cl_DecodeTrace( )


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