
Description | Cautions | Example | Errors | See Also
Name: |
||
Inputs: |
int devh |
|
char *szMsg |
| |
Returns: |
0 |
|
Includes: |
D42LIB.H | |
Mode: |
synchronous | |
The d42_writetodisplay( ) function places information on a phone set's display. An ASCII string held within the character buffer contains the information shown on the phone set display, if a feature session has been successfully established using the d42_openfeaturesession( ) function. The maximum size of the display buffer is dependent on the type of phone set display on the channel that the function calls.
The maximum size of the buffer is returned by the d42_openfeaturesession( ) function when a feature session is established.
Parameter |
Description |
devh |
specifies the channel device |
szMsg |
specifies the message to display on a phone set during a feature session. |
This function is valid only with the Nortel Norstar PBX.
The pointer must point to a buffer that is 49 characters long even though the displays supported will accept a maximum of either 16 or 32 characters.
A feature session must be opened using the d42_openfeaturesession( ) function to use the d42_writetodisplay( ) function.
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*/
d42_writetodisplay (devh, "This is a test");
/* 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