98 Voice API for Windows Operating Systems Library Reference — November 2003
ATDX_HOOKST( ) — return the current hook-switch state
main()
{
int chdev;
long hookst;
/* Open the channel device */
if ((chdev = dx_open("dxxxB1C1",NULL)) == -1) {
/* Process error */
}
.
.
/* Examine Hook state of the channel. Perform application specific action */
if((hookst =
ATDX_HOOKST(chdev)
) == AT_FAILURE) {
/* Process error */
}
if(hookst == DX_OFFHOOK) {
/* Channel is Off-hook */
}
.
.
}
!
!!
!See Also
dx_sethook( )
DX_CST structure
dx_setevtmsk( ) for enabling hook state (call status transition events)
��sr_getevt( ) for synchronous call status transition event detection
DX_EBLK for asynchronous call status transition event detection
sr_getevtdatap( ) in the Standard Runtime Library API Library Reference