
Description | Cautions | Example | Errors | See also
Name: |
int ag_unlisten(chdev) | |
Inputs: |
int chdev |
|
Returns: |
0 on success |
|
|
-1 on error |
|
Includes: |
dxxxlib.h |
|
Category: |
SCbus Routing | |
Mode: |
Synchronous | |
The ag_unlisten( ) function disconnects analog receive channel from SCbus. This function disconnects the analog receive (listen) channel from SCbus time slot it was listening to.
Calling the ag_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 ag_unlisten( ) function.
Parameter |
Description |
chdev: |
Specifies the valid analog channel handle obtained when the channel was opened using dx_open( ). |
This function will fail when:
#include <windows.h>
#include <srllib.h>
#include <dxxxlib.h>
#include <errno.h>
main( )
{
int chdev; /* Voice Channel handle */
/* Open board 1 channel 1 device */
if ((chdev = dx_open("dxxxB1C1", 0)) == -1) {
printf("Cannot open channel dxxxB1C1. errno = %d", errno);
exit(1);
}
/* Disconnect receive of board 1, channel 1 from SCbus time slots */
if (ag_unlisten(chdev) == -1) {
printf("Error message = %s", ATDV_ERRMSGP(chdev));
exit(1);
}
}
If the function returns -1, use the SRL Standard Attribute function ATDV_LASTERR( ) to obtain the error code or use ATDV_ERRMSGP( ) to obtain a descriptive error message. One of the following error codes may be returned:
Equate |
Returned When |
EDX_BADPARM |
Parameter error |
EDX_SH_BADCMD |
Command is not supported in current bus configuration |
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 local time slot type (voice, analog, etc.) |
EDX_SH_CMDBLOCK |
Blocking command is in progress |
EDX_SH_LCLDSCNCT |
Channel already disconnected from SCbus time slot |
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 fallback failed |
EDX_SYSTEM |
Windows system error |
Click here to contact Dialogic Customer Engineering
Copyright 2001, Dialogic Corporation