
Description | Termination Events | Cautions | Example | Errors | See Also
Name: |
int cl_GetTransactionDetails(hDevice, pidTransaction, pclEventData, plReference, piSemanticsStateIndex, pszSemanticsStateName, iSemanticsStateNameSize) | |
Inputs: |
long hDevice |
|
long* pidTransaction |
| |
CL_EVENTDATA* pclEventData |
| |
long* plReference |
| |
int* piSemanticsStateIndex |
| |
char* pszSemanticsStateName |
| |
int iSemanticsStateNameSize |
| |
Returns: |
0 on success | |
Includes: |
cllib.h | |
Mode: |
synchronous | |
The cl_GetTransactionDetails( ) function returns the ID and details of a transaction for which a CLEV_MESSAGE event was generated. The details about the specified call logging transaction are optional and can include the call reference number and the name or index of the current semantics state. Pass NULL as the related parameter for any details that are not needed.
The list of semantics states (count, names and indexes) is protocol dependent.
Parameter |
Description |
hDevice: |
The device handle of the call logging device. |
pidTransaction: |
The pointer to the returned call logging transaction ID. The call logging transaction ID is unique and protocol dependent. |
pclEventData: |
The 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. |
plReference: |
The pointer to the returned call reference number of the specified call logging transaction. The meaning of the call reference number is protocol specific. |
piSemanticsStateIndex: |
The pointer to the returned index of the current semantics state of the specified call logging transaction. Semantics states are indexed from 0 to the number of semantics states minus one. |
pszSemanticsStateName: |
The pointer to the buffer into which the name of the current semantics state of the specified call logging transaction is returned. The name is returned as an ASCIIZ string. |
iSemanticsStateNameSize: |
The size of the buffer into which the name of the current semantics state of the specified call logging transaction is returned, where maximum size includes the terminating NUL of the ASCIIZ string. |
None
#include <cllib.h>
#include <stdio.h>
void GetTransactionDetails_WithinEventHandler(long hDevice, CL_EVENTDATA* pclEventData)
{
int iRet;
long idTransaction;
long lReference;
int iSemanticsState;
char szSemanticsStateName[32];
iRet = cl_GetTransactionDetails(hDevice, &idTransaction, pclEventData, &lReference, &iSemanticsState, szSemanticsStateName, sizeof(szSemanticsStateName));
if (iRet != 0)
{
if (iRet == -2)
{
printf("GetTransactionDetails_WithinEventHandler - Transaction already released\n");
}
else
{
printf("GetTransactionDetails_WithinEventHandler - cl_GetTransactionDetails() failed\n");
}
return;
}
printf("Transaction ID=%08X, Reference=%08X, State=\"%s\"(%i)\n", idTransaction, lReference, szSemanticsStateName, iSemanticsState);
}
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