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.
1.6.1. Application Start-UpTable 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. |
|
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. |
|
(Optional) Gets the number of semantics states for the specified CCS protocol. | |
|
(Optional in a loop) Gets the names of the semantics states for the specified CCS protocol. |
1.6.2. Application TerminationTable 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. |
Closes the call logging device. | |
gc_Stop( ) |
Stops the GlobalCall application. |
1.6.3. Event HandlingTable 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). |
|
Gets the user-defined attribute associated with the call logging device. |
Table 6. Event Handling: CLEV_MESSAGE Scenario
Function |
Description |
Gets the call logging transaction ID and other details. | |
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. | |
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. | |
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.. | |
If needed, gets the calling party number.. | |
If needed, gets the called party number. | |
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. |
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. | |
1.6.4. Call Logging Functions and the SnifferMFC SampleTable 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( ) |
|
|
CSnifferMFCOpenDlg::UpdateDeviceName( ) |
construction of the pszDeviceName parameter of cl_Open( ) |
|
CSnifferMFCDoc::OnSnifferClose( ) |
|
|
CSnifferMFCDoc::EventHandler( ) |
|
|
CSnifferMFCDoc::OnSnifferDecodetrace( ) |
Click here to contact Dialogic Customer Engineering
Copyright 2001, Dialogic Corporation