
Description | Cautions | Nortel Norstar | Example | Example | Errors
ED42_BADDEVICE |
Invalid or wrong device handle | ||
ED42_UNSUPPORTED |
Function not supported on this board | ||
ED42_SYSTEM |
System level error | ||
ED42_INVALARG |
Invalid argument passed to function | ||
Name: |
|||
Inputs: |
int devh |
| |
char *bufferp |
| ||
buflen |
| ||
Returns: |
0 |
| |
-1 |
| ||
Includes: |
D42LIB.H | ||
Mode: |
synchronous | ||
The d42_indicatorsex( ) function retrieves the current LCD or LED indicators status and places it in an application buffer. Unlike d42_indicators( ), this function can retrieve indicator data larger than 49 bytes. The information is returned as a null-terminated ASCII string. The buffer must be at least 49 bytes, which would mean a data string of 48 bytes plus a null. The application buffer holds the entire bit mask (see below) representing the status of each indicator. Refer to the PBX Integration User's Guide for more information specific to your switch.
Parameter |
Description |
devh: |
specifies the valid channel device descriptor obtained by a call to dx_open( ) |
bufferp: |
pointer to the application buffer; the indicator is placed here |
buflen: |
length of buffer |
Note that the following example shows a phone with just 24 indicators. Your phone is not limited to 49 bytes when using the d42_indicatorsex( ) function. As shown in Figure 6, there are 24 LCD Line Indicators located between Programmable Memory Buttons 00-23 on the Model 7324 telephone. The indicator status data stored in the application buffer is 24 bytes long. Bytes 00-23 contain the indicator status of Memory Buttons 00-23, respectively. The status data for each byte is defined as follows:
Value (in HEX) |
State |
0x00 |
off |
0x01 |
on |
0x02 |
ringing |
0x03 |
hold |
0x04 |
error |
0x05 |
unknown |
If the data for byte 16 is 0x02 and byte 19 is 0x01, the indicator for Memory Button 16 indicates ringing and the indicator for Memory Button 19 is on. The contents of the application buffer are shown below.

Figure 8. Nortel Model 7324 Telephone Indicators
void main(void)
{
int devh;
int rc = 0;
char bufferp[81];
/* Open Channel Device */
if ( (devh = dx_open("dxxxB1C1",NULL)) == -1)
{
printf("Error dx_open()\n");
exit(-1);
} /* End dx_open */
/* Wait for incoming call */
if ( (rc = dx_wtring(devh, 2, DX_ONHOOK, -1)) == -1)
{
printf("Error dx_wtring()\n");
dx_close(devh);
exit(-1);
}
/* Get the Calling/Caller Id */
if ( (rc = d42_gtcallid(devh, buffer)) == -1)
{
printf("Error d42_gtcallid()\n");
dx_close(devh);
exit(-1);
} /* End d42_gtcallid */
printf("Caller Id = %s\n",buffer);
/* Get the Indicator Information */
if ( (rc = d42_indicatorsex(devh, buffer,80)) == -1)
{
printf("Error d42_indicatorsex(): Error Code: %hX\n",ATDV_LASTERR (devh));
dx_close(devh);
exit(-1);
} /* End d42_indicatorsex*/
for (count = 0; count < 80; count++)
printf("Indicators = %X\n",buffer[count]);
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.
Click here to contact Dialogic Customer Engineering
Copyright 2001, Dialogic Corporation