
Description | Termination Events | Cautions | Example | Errors | See Also
Name: |
int cl_GetMessage(hDevice, pidMessage, pclEventData) | |
Inputs: |
long hDevice |
|
long* pidMessage |
| |
CL_EVENTDATA* pclEventData |
| |
Returns: |
0 on success -2 if call logging transaction already released | |
Includes: |
cllib.h | |
Mode: |
synchronous | |
The cl_GetMessage( ) function returns the ID of a Layer 3 message for which a CLEV_MESSAGE event was generated. The returned L3 message ID is unique and protocol dependent.
Parameter |
Description |
hDevice: |
The device handle of the call logging device. |
pidMessage: |
A pointer to the returned L3 message ID. |
pclEventData: |
A pointer to the call logging event data block obtained from sr_getevtdatap( ) while the function was processing a CLEV_MESSAGE event. See Section 1.5.2. Retrieving Event Datafor more information. |
None
#include <cllib.h>
#include <stdio.h>
void GetMessage_WithinEventHandler(long hDevice, CL_EVENTDATA* pclEventData)
{
int iRet;
long idMessage;
iRet = cl_GetMessage(hDevice, &idMessage, pclEventData);
if (iRet != 0)
{
if (iRet == -2)
{
printf("GetMessage_WithinEventHandler - Transaction already released\n");
}
else
{
printf("GetMessage_WithinEventHandler - cl_GetMessage() failed\n");
}
return;
}
printf("Message ID=%08X\n", idMessage);
}
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_INVALIDCONTEXT |
invalid event context |
ECL_TRANSACTIONRELEASED |
transaction already released |
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