Voice API for Windows Operating Systems Library Reference — November 2003 387
provide control of the hook switch status — dx_sethook( )
/* sr_getevtdatap() points to the call status transition
* event structure, which contains the hook state of the
* device.
*/
cstp = (DX_CST *)sr_getevtdatap();
switch (cstp->cst_event) {
case DX_ONHOOK:
printf("Channel %s is ON hook\n", ATDX_NAMEP(sr_getevtdev()));
break;
case DX_OFFHOOK:
printf("Channel %s is OFF hook\n", ATDX_NAMEP(sr_getevtdev()));
break;
default:
/* process error */
break;
}
/* Kick off next function in the state machine model. */
.
.
return 0;
}
!
!!
!See Also
sr_getevtdatap( )
ATDX_HOOKST( )