
Description | Cautions | Example | Errors | See Also
Name: |
||
Inputs: |
int devh |
|
Returns: |
0 |
|
Includes: |
D42LIB.H | |
Mode: |
immediate | |
The d42_closefeaturesession( ) function closes a feature session on a specified channel. Once the feature session is closed the special functions that require a feature session to be open may not be used, for example, d42_writetodisplay( ).
Parameter |
Description |
channel |
specifies the channel number. |
This function is valid only with the Nortel Norstar PBX.
This function sets the parameter values for the channel parameters D4CH_SOFTKEYINPUT and D4CH_TERMINATEFEATURE to 0 for disabled.
void main(void)
{
int devh;
int rc = 0;
char szDnNumber = "221";
int iTerminalType;
int iEvtMask = D42_EVT_SOFTKEY | D42_EVT_ASYNCCLOSEFEATSESSION
/* Open Channel Device */
if ( (devh = dx_open("dxxxB1C1",NULL))==-1)
{
printf("Error dx_open()\n");
exit(-1);
} /* End dx_open */
/* Open a feature session */
if ( (rc = d42_openfeaturesession (devh, szDnNumber, &iTerminalType, iEvtMask )) == -1)
{
printf("Error d42_closefeaturesession():\n");
dx_close(devh);
exit(-1);
} /* End d42_brdstatus*/
/*something is done */
/* close the feature session */
if ( (rc = d42_closefeaturesession (devh)) == -1)
{
printf("Error d42_closefeaturesession():\n");
dx_close(devh);
exit(-1);
} /* End d42_brdstatus*/
dx_close(devh);
} /* End main */
If this function returns -1 to indicate a failure, one of the following (most common) codes will be contained in dx_errno. For a complete list of error codes and definitions, refer to Appendix C.
ED42_BADDDEVICE |
Invalid or wrong device handle sent to the function |
ED42_NOFEATURESESSION |
No feature session has been opened on the channel. |
ED42_UNSUPPORTED |
Function not supported on this board |
ED42_SYSTEM |
System level error |
ED42_INVALARG |
Invalid argument passed to function |
Click here to contact Dialogic Customer Engineering
Copyright 2001, Dialogic Corporation