
Description | Cautions | Example | Errors | See Also
Name: |
int cc_GetEvtMsk(bdev, maskp) | |
Inputs: |
LINEDEV bdev |
|
ULONG *maskp |
| |
Returns: |
0 on success | |
Includes: |
cclib.h | |
Category: |
System tools | |
Mode: |
synchronous | |
Technology: |
BRI/2; BRI/SC; PRI (all protocols) | |
The cc_GetEvtMsk( ) function retrieves the current ISDN event mask for a specified board device handle for PRI or station device handle for BRI.
Parameter |
Description |
bdev: |
Board device handle for PRI, station device handle for BRI. |
maskp: |
The address of the buffer that stores the current ISDN event mask. |
Table 20 lists the possible bitmask values and the actions that they control.
Table 20. Bitmask Values
Bitmask Type |
Action |
Default Setting |
CCMSK_ALERT |
Receiving CCEV_ALERTING |
Event enabled |
CCMSK_CALLACK_SEND |
Application sends first response to SETUP message: CALL_SETUP_ACK |
Firmware sends first response to SETUP |
CCMSK_PROCEEDING |
Receiving CCEV_PROCEEDING |
Event enabled |
CCMSK_PROGRESS |
Receiving CCEV_PROGRESSING |
Event enabled |
CCMSK_SERVICE |
Receiving CCEV_SERVICE. When this event arrives, the application should respond with a status message using cc_SndMsg( ). The firmware will not automatically respond to this message. |
Not enabled |
CCMSK_SERVICE_ACK |
Receiving CCEV_SETCHANSTATE. When this event is masked, the cc_SetChanState( ) function may be blocked. |
Not enabled |
CCMSK_SETUP_ACK |
Receiving CCEV_SETUP_ACK |
Event not enabled |
CCMSK_STATUS |
Receiving CCEV_STATUS |
Not enabled |
CCMSK_STATUS_ |
Receiving CCEV_STATUS_ENQUIRY. When this event arrives, the application should respond with a status message using the cc_SndMsg( ) function. The firmware will not automatically respond to this message. |
Not enabled |
CCMSK_TERMINATE |
Delay RELEASE COMPLETE message until host application calls the cc_ReleaseCall( ) function. |
Firmware does not wait for cc_ReleaseCall( ) and sends RELEASE COMPLETE when RELEASE is received. |
CCMSK_TMREXPEVENT |
Receiving the CCEV_TIMER event. This event is generated when some timer expires at Layer 3. Timer ID, Call ID and the value of the timer are returned. |
Not enabled |
None
#include <windows.h> /* For Windows applications only */
#include <stdio.h>
#include <errno.h>
#include "srllib.h"
#include "dtilib.h"
#include "cclib.h"
void main()
{
LINEDEV devhdl = 0;
CRN crn = 0;
char *devname = "dtiB1T1";
ULONG *evtmskvalue;
USHORT uSubMask;
if ( cc_Open( &devhdl, devname, 0 ) < 0 )
{
printf("Error opening device: errno = %d\n", errno);
exit(1);
}
if ( cc_GetEvtMsk (devhdl, &evtmskvalue) < 0 ) {
procdevfail(devhdl);
}
else {
/* check the event mask for enabled/disabled events */
uSubMask = (USHORT) (evtmskvalue);
if (CCMSK_ALERT && (uSubMask & CCMSK_ALERT) {
printf("ALERTING EVENT ENABLED\n");
}
if (CCMSK_PROCEEDING && (uSubMask & CCMSK_PROCEEDING) {
printf("PROCEEDING EVENT ENABLED\n");
}
if (CCMSK_PROGRESS && (uSubMask & CCMSK_PROGRESS) {
printf("PROGRESSING EVENT ENABLED\n");
}
if (CCMSK__SETUP_ACK && (uSubMask & CCMSK_SETUP_ACK) {
printf("SETUP_ACK event enabled for firmware to send SETUP_ACK\n");
}
}
.
.
etc...
.
.
.
.
} /* end main */
If the function returns < 0 to indicate failure, use the cc_CauseValue( ) function to retrieve the reason code for the failure. The cc_ResultMsg( ) function can be used to interpret the reason code. Error codes are defined in the files ccerr.h, isdnerr.h, and isdncmd.h.
Error codes from the cc_GetEvtMsk( ) function include the following:
Error Code |
Description |
ERR_ISDN_LIB | E_ISBADIF |
Bad interface number |
ERR_ISDN_LIB | E_ISBADTS |
Bad time slot |
ERR_ISDN_LIB | E_ISBADPAR |
Bad input parameter |
Click here to contact Dialogic Customer Engineering
Copyright 2001, Dialogic Corporation