
Description | Cautions | Example | Errors | See also
Name: |
int fx_unlisten(dev) | |
Inputs: |
int dev |
|
Returns: |
0 on success |
|
|
-1 on failure |
|
Includes: |
srllib.h |
|
|
dxxxlib.h | |
|
faxlib.h | |
Category: |
SCbus Routing | |
Mode: |
synchronous | |
The fx_unlisten( ) function disconnects FAX receive channel from SCbus.
Calling the fx_listen( ) function to connect to a different SCbus time slot will automatically break an existing connection. Thus, when changing connections, you need not call the fx_unlisten( ) function.
Parameter |
Description |
dev: |
Specifies the FAX channel device handle obtained when the channel was opened using fx_open( ). |
This function will fail when:
#include <windows.h>
#include <srllib.h>
#include <dxxxlib.h>
#include <faxlib.h>
#include <errno.h>
main( )
{
int dev; /* Fax channel device handle. */
.
.
/* Open the FAX channel resource. */
if ((dev = fx_open("dxxxB7C1", NULL)) == -1) {
/* Error opening device. */
printf("Error opening channel, errno = %d\n", errno);
exit(1);
}
.
.
/*
* Disconnect the FAX channel device from "listening" to an
* SCbus transmit time slot.
*/
if (fx_unlisten(dev) == -1) {
printf("Error message = %s", ATDV_ERRMSGP(dev));
exit(1);
}
.
.
If this function returns -1, use ATDV_LASTERR( ) and ATDV_ERRMSGP( ) to retrieve one of the following error reasons (see the Voice Software Reference - Features Guide for error message information):
Equate |
Returned When |
EDX_BADPARM |
Parameter error |
EDX_SH_BADCMD |
Command is not supported in current bus configuration |
EDX_SH_BADEXTTS |
SCbus time slot is not supported at current clock rate |
EDX_SH_BADINDX |
Invalid Switch Handler index number |
EDX_SH_BADLCLTS |
Invalid channel number |
EDX_SH_BADMODE |
Function not supported in current bus configuration |
EDX_SH_BADTYPE |
Invalid channel type (voice, analog, etc.) |
EDX_SH_CMDBLOCK |
Blocking command is in progress |
EDX_SH_LCLDSCNCT |
Channel already disconnected from SCbus |
EDX_SH_LIBBSY |
Switch Handler library busy |
EDX_SH_LIBNOTINIT |
Switch Handler library uninitialized |
EDX_SH_MISSING |
Switch Handler is not present |
EDX_SH_NOCLK |
Switch Handler clock failback failed |
EDX_SYSTEM |
Windows System Error |
Click here to contact Dialogic Customer Engineering
Copyright 2001, Dialogic Corporation