Intel 05-1832-002 IP Phone User Manual


 
306 Voice API for Windows Operating Systems Library Reference — November 2003
dx_play( ) — play recorded voice data
exit(1);
}
printf("Devices open and waiting .....\n");
/*
* Take the phone off-hook to talk to the ADSI phone
* This assumes we are connected through a Skutch Box.
*/
if (dx_sethook( chfd, DX_OFFHOOK, EV_SYNC) == -1) {
printf("sethook failed\n");
while (1) {
sleep(5);
dx_clrdigbuf( chfd );
printf("Digit buffer cleared ..\n);
/*
* Generate the alert tone
*/
iott.io_type =IO_DEV|IO_EOT;
iott.io_fhandle = dx_fileopen("message.asc",O_RDONLY);
iott.io_length = -1;
parm = DM_D
if (dx_setparm (chfd, DXCH_DTINITSET, (void *)parm) ==-1){
printf ("dx_setparm on DTINITSET failed\n");
exit(1);
}
if (dx_play(chfd,&iott,(DV_TPT *)NULL, PM_ADSIALERT|EV_SYNC) ==-1) {
printf("dx_play on the ADSI file failed\n");
exit(1);
}
}
}
dx_close(chfd);
exit(0);
}
!
!!
! See Also
dx_playf( )
dx_playiottdata( )
dx_playvox( )
dx_setparm( ), dx_getparm( )
dx_adjsv( ) (for speed or volume control)
dx_setsvcond( ) (for speed or volume control)
DX_IOTT data structure (to identify source or destination of the voice data)
event management functions in Standard Runtime Library API Library Reference
ATDX_TERMMSK( )
DV_TPT data structure (to specify a termination condition)
dx_setuio( )