
Description | Termination Events | Cautions | Example | Errors | See Also
Name: |
int cl_GetTransactionUsrAttr(hDevice, idTransaction, ppUsrAttr) | |
Inputs: |
long hDevice |
|
long idTransaction |
| |
void** ppUsrAttr |
| |
Returns: |
0 on success | |
Includes: |
cllib.h | |
Mode: |
synchronous | |
The cl_GetTransactionUsrAttr( ) function returns the user-defined transaction attribute for a specified call logging transaction. The user-defined attributes are set using the cl_SetTransactionUsrAttr( ) function. If the cl_SetTransactionUsrAttr( ) function has not been called for the specified call logging transaction, NULL will be returned.
Parameter |
Description |
hDevice: |
The device handle of the call logging device. |
idTransaction: |
The call logging transaction ID. |
ppUsrAttr: |
The pointer to the returned pointer to the user-defined attribute for the specified call logging transaction. |
None
#include <cllib.h>
#include <stdio.h>
typedef struct
{
time_t timeConnect;
time_t timeDisconnect;
} TRANSACTIONUSRATTR;
TRANSACTIONUSRATTR* GetTransactionUsrAttr(long hDevice, long idTransaction)
{
TRANSACTIONUSRATTR* pTransactionUsrAttr;
int iRet;
iRet = cl_GetTransactionUsrAttr(hDevice, idTransaction, (void**)&pTransactionUsrAttr);
if (iRet != 0)
{
if (iRet == -2)
{
printf("GetTransactionUsrAttr - Transaction already released\n");
}
else
{
printf("GetTransactionUsrAttr - cl_GetTransactionUsrAttr() failed\n");
}
return NULL;
}
return pTransactionUsrAttr;
}
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_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