Intel 05-1832-002 IP Phone User Manual


 
Voice API for Windows Operating Systems Library Reference — November 2003 459
break a full or half-duplex connection — nr_scunroute( )
#include <stdio.h>
#include <varargs.h>
#include <srllib.h>
#include <dxxxlib.h>
#ifdef DTISC
#include <dtilib.h>
#endif
#ifdef FAXSC
#include <faxlib.h>
#endif
#include "sctools.h"
#if ( defined( __STDC__ ) || defined( __cplusplus ) )
int nr_scunroute( int devh1, unsigned short devtype1,
int devh2, unsigned short devtype2 unsigned char mode )
#else
int nr_scunroute( devh1, devtype1, devh2, devtype2, mode )
int devh1;
unsigned short devtype1;
int devh2;
unsigned short devtype2;
unsigned char mode;
#endif
{
/*
* Disconnect listen of second device from TDM bus listen time slot .
*/
switch (devtype2) {
case SC_VOX:
if (dx_unlisten(devh2) == -1) {
nr_scerror("nr_scunroute: %s: dx_unlisten ERROR: %s\n",
ATDV_NAMEP(devh2),ATDV_ERRMSGP(devh2));
return -1;
}
break;
case SC_LSI:
if (ag_unlisten(devh2) == -1) {
nr_scerror("nr_scunroute: %s: ag_unlisten ERROR: %s\n",
ATDV_NAMEP(devh2),ATDV_ERRMSGP(devh2));
return -1;
}
break;
#ifdef DTISC
case SC_DTI:
if (dt_unlisten(devh2) == -1) {
nr_scerror("nr_scunroute: %s: dt_unlisten ERROR: %s\n",
ATDV_NAMEP(devh2),ATDV_ERRMSGP(devh2));
return -1;
}
break;
#endif
#ifdef FAXSC
case SC_FAX:
if (fx_unlisten(devh2) == -1) {
nr_scerror("nr_scunroute: %s: fx_unlisten ERROR: %s\n",
ATDV_NAMEP(devh2),ATDV_ERRMSGP(devh2));
return -1;
}
break;
#endif