Intel 05-1832-002 IP Phone User Manual


 
156 Voice API for Windows Operating Systems Library Reference — November 2003
dx_chgdur( ) — change the duration definition for a tone
/*
* Delete any previous tones
*/
if ( dx_deltones(ddd) < 0 ) {
/* handle error */
}
/*
* Change Enhanced call progress default local dial tone
*/
if (dx_chgfreq( TID_DIAL_LCL, 425, 150, 0, 0 ) < 0) {
/* handle error */
}
/*
* Change Enhanced call progress default busy cadence
*/
if (
dx_chgdur( TID_BUSY1, 550, 400, 550, 400 )
< 0) {
/* handle error */
}
if (dx_chgrepcnt( TID_BUSY1, 4 ) < 0) {
/* handle error */
}
/*
* Now enable Enhanced call progress with above changed settings.
*/
if (dx_initcallp( ddd )) {
/* handle error */
}
/*
* Set off Hook
*/
if ((dx_sethook( ddd, DX_OFFHOOK, EV_SYNC )) == -1) {
/* handle error */
}
/*
* Dial
*/
if ((car = dx_dial( ddd, dialstrg,(DX_CAP *)&cap_s, DX_CALLP|EV_SYNC))==-1) {
/* handle error */
}
switch( car ) {
case CR_NODIALTONE:
printf(" Unable to get dial tone\n");
break;
case CR_BUSY:
printf(" %s engaged\n", dialstrg );
break;
case CR_CNCT:
printf(" Successful connection to %s\n", dialstrg );
break;
default:
break;
}