
Description | Cautions | Example | Errors | See Also
Name: |
int dx_setparm(dev,parm,valuep) | |
Inputs: |
int dev |
|
unsigned long parm |
| |
void *valuep |
| |
Returns: |
0 if successful | |
-1 if failure | ||
Includes: |
srllib.h | |
dxxxlib.h | ||
Category: |
Configuration | |
The dx_setparm( ) function allows you to set physical parameters of a channel or board device, such as off-hook delay, length of a pause, and flash character. Parameters can be set only one at a time. The possible values of parm are defined in Chapter 6. Voice Device Parameters.
The channel must be idle (for example., no I/O function running) when calling dx_setparm( ). Board and channel resources have different parameters that can be set. Setting board parameters affects all the channels on the board. Setting channel parameters only affects the specified channel.
To set board parameters the following requirements must be met:
The function parameters are defined as follows:
Parameter |
Description |
dev |
specifies the valid channel or board device handle obtained when the channel or board was opened using dx_open( ). |
parm |
specifies the channel or board parameter to set. |
Board and channel parameter defines, defaults and descriptions are listed in Chapter 6. Voice Device Parameters. | |
| |
valuep |
points to the 4 byte variable that specifies the channel or board parameter to set. |
| |
#include <srllib.h>
#include <dxxxlib.h>
#include <windows.h>
main()
{
int bddev, parmval;
/* Open the board using dx_open( ). Get board device descriptor in
* bddev.
*/
if ((bddev = dx_open("dxxxB1",NULL)) == -1) {
/* process error */
}
/* Set the inter-ring delay to 6 seconds (default = 8) */
parmval = 6;
if (dx_setparm(bddev, DXBD_R_IRD, (void *)&parmval) == -1) {
/* process error */
}
/* now wait for an incoming ring */
. . .
}
If this function returns -1 to indicate failure, use ATDV_LASTERR( ) and ATDV_ERRMSGP( ) to retrieve one of the following error reasons:
|
EDX_BADPARM |
|
EDX_SYSTEM |
|
Click here to contact Dialogic Customer Engineering
Copyright 2002, Dialogic Corporation