
Description | Cautions | MITEL PBX | Example | Northern Telecom | Example | Northern Telecom | Example | NEC KTS/PBX | Example | Example | Errors
Name: |
int d42_indicators(devh, bufferp) | |
Inputs: |
int devh |
|
char *bufferp |
| |
Returns: |
ED42_NOERROR |
|
Includes: |
D42LIB.H | |
Mode: |
synchronous | |
Supports: |
D/42-SL, D/42-SX, D/42-NS, D/42-NE2 | |
The d42_indicators( ) function retrieves the status of LCD/LED indicators and places it in an application buffer. The application buffer must be 49 bytes, and will hold the entire bit mask (see below) representing the status of each indicator. Refer to the D/42 Series User's Guide for more information specific to your switch. Examples showing the contents of the application buffer for each supported switch are as follows:
D/42D-SL |
8 indicators |
D/42D-SX |
16 indicators |
D/42-NS |
10 indicators |
D/42-NE2 |
24 indicators |
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 |
The application buffer must be 49 bytes. The length of the line indicator data is variable (currently 8, 10, 16, and 24 bytes), and is stored as bit mask. The 49 byte buffer size is for future expansion. An application that passes anything smaller will not be backward compatible in future releases.
There are 16 LCD Line Indicators (each containing two segments; a square and a circle) located on the left side of line keys 00-15 on the MITEL SUPERSET 4 telephone - see Figure 2. The line indicator status data stored in the application buffer is 16 bytes long. Byte 0 contains the status for Hold. Bytes 1-15 contain the indicator status for line keys 01-15, respectively. Each byte (8 bits) contains data for both segments of an indicator (bits 0-3 represent the square, bits 4-7 represent the circle). The status data for each byte is defined as follows:
Data for bits 0-3 |
Description |
0x?0 |
square off |
0x?1 |
square on |
0x?2 |
square flashing 250 ms off, 250 ms on |
0x?3 |
square flashing 500 ms off, 500 ms on |
0x?4 |
square flashing 438 ms off, 62 ms on |
0x?5 |
square flashing 62 ms off, 438 ms on |
0x?F (square only) |
inverse flash rate of circle |
Data for bits 4-7 |
Description |
0x0? |
circle off |
0x1? |
circle on |
0x2? |
circle flashing 250 ms off, 250 ms on |
0x3? |
circle flashing 500 ms off, 500 ms on |
0x4? |
circle flashing 438 ms off, 62 ms on |
0x5? |
circle flashing 62 ms off, 438 ms on |
If the data for byte 7 is 0x02, the circle segment for Line Key 7 is off and the square segment is flashing at 250 ms. The contents of the application buffer are shown below.

Figure 2. MITEL SUPERSET 4 Telephone Indicators

Northern Telecom SL-1 (D/42D-SL)
There are eight LED Line Indicators located on the top-right of the Digit Display telephone - see Figure 3. There are no indicators for Feature Keys 8 and 9. The line indicator status data stored in the application buffer is 8 bytes long. Bytes 0-7 contain the indicator status of Feature Keys 0-7, respectively. The status data for each byte is defined as follows:
Value (in HEX) |
State |
0x00 |
off |
0x01 |
wink (flash 120 Hz.) |
0x02 |
flash (flash 60 Hz.) |
0x03 |
on |
If the data for byte 1 is 0x03 and byte 2 is 0x02, the indicator for Feature Key 1 is on and the indicator for Feature Key 2 is flashing at 60 Hz. The contents of the application buffer are shown below.

Figure 3. Northern Telecom Digit Display Telephone Indicators

Northern Telecom Norstar (D/42-NS)
There are 10 LCD Line Indicators located between Programmable Memory Buttons 0-9 on the Model 7310 telephone - see Figure 4. The indicator status data stored in the application buffer is 10 bytes long. Bytes 0-9 contain the indicator status of Memory Buttons 0-9, respectively. The status data for each byte is defined as follows:
Value (in HEX) |
State |
0x00 |
off |
0x01 |
on |
0x02 |
alerting (flashing) |
0x03 |
Ihold |
0x04 |
Uhold |
If the data for byte 1 is 0x01 and byte 8 is 0x02, the indicator for Memory Button 1 is on and the indicator for Memory Button 8 is alerting. The contents of the application buffer are shown below.

Figure 4. Northern Telecom Model 7310 Telephone Indicators
The Dterm Series III telephone has 24 LED indicators located as follows - see Figure 5:
The indicator status data stored in the application buffer is 32 bytes long. Each byte represents a specific indicator on the Dterm Series III telephone - see Table 2.
Table 2. D/42-NE2 Indicator Status Definitions
|
Byte |
Description |
Byte |
Description |
0 |
line LED 1 |
16 |
not used |
1 |
line LED 2 |
17 |
message waiting indicator |
2 |
line LED 3 |
18 |
CNF key LED |
3 |
line LED 4 |
19 |
FCN key LED |
4 |
line LED 5 |
20 |
not used |
5 |
line LED 6 |
21 |
LNR/SPD key LED |
6 |
line LED 7 |
22 |
ANS key LED |
7 |
line LED 8 |
23 |
SPKR key LED |
8 |
line LED 9 |
24 |
ICM key LED |
9 |
line LED 10 |
25 |
MIC key LED |
10 |
line LED 11 |
26 |
not used |
11 |
line LED 12 |
27 |
not used |
12 |
line LED 13 |
28 |
not used |
13 |
line LED 14 |
27 |
not used |
14 |
line LED 15 |
30 |
not used |
15 |
line LED 16 |
31 |
not used |
The two-color LEDs can take on one of the states listed below. The MIC and ICM indicators use only the red states.
Binary |
Hex |
Description |
0000 0000 |
0x00 |
off |
0000 0001 |
0x01 |
flutter (red) |
0000 0010 |
0x02 |
wink (red) |
0000 0011 |
0x03 |
rapid wink (red) |
0000 0100 |
0x04 |
interrupted rapid wink (red) |
0000 0101 |
0x05 |
interrupted wink (red) |
0000 0110 |
0x06 |
interrupted unlit (red) |
0000 0111 |
0x07 |
steady on (red) |
0000 1001 |
0x09 |
flutter (green) |
0000 1010 |
0x0A |
wink (green) |
0000 1011 |
0x0B |
rapid wink (green) |
0000 1100 |
0x0C |
interrupted rapid wink (green) |
0000 1101 |
0x0D |
interrupted wink (green) |
0000 1110 |
0x0E |
interrupted unlit (green) |
0000 1111 |
0x0F |
steady on (green) |
If the data for byte 1 is 0x07 and byte 12 is 0x0F, the LED indicator for Line Key 2 is on (red) and the LED indicator for Line Key 13 is on (green). The contents of the application buffer are shown below.

Bit 7 6 5 4 3 2 1 0 On (0x07 red) 0 0 0 0 0 1 1 1 On (0x0F green) 0 0 0 0 1 1 1 1 Wink (0x02 red) 0 0 0 0 0 0 1 0 Wink (0x0A green) 0 0 0 0 1 0 1 0
Figure 5. NEC Dterm Series III Telephone Indicators

void main(void)
{
int devh;
int rc = 0;
int count;
char bufferp[49];
/* 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, bufferp)) == -1)
{
printf("Error d42_gtcallid( )\n");
dx_close(devh);
exit(-1);
} /* End d42_gtcallid */
printf("Caller Id = %s\n",bufferp);
/* Get the Indicator Information */
if ( (rc = d42_indicators(devh, bufferp)) == -1)
{
printf("Error d42_indicators( ): Error Code: %hX\n",ATDV_LASTERR(devh));
dx_close(devh);
exit(-1);
} /* End d42_indicators*/
for (count = 0; count < 49; count++)
{
printf("Indicator %d = %X\n",count, bufferp[count]);
}
dx_close(devh);
} /* End main */
If this function returns -1 to indicate a failure, use ATDV_LASTERR( ) and ATDV_ERRMSGP( ) to retrieve one of the following (most common) errors. For a complete list of error codes and definitions, refer to Appendix C.
ED42_FWREQFAILURE |
Firmware error |
ED42_UNKNOWNBOARD |
Unknown D/42 board type |
ED42_BADDEVICE |
Invalid or wrong device handle |
ED42_UNSUPPORTED |
Function not supported on this board |
ED42_INVALARG |
Invalid argument passed to function |
DXLIB_INVNRB |
Internal voice library error |
Click here to contact Dialogic Customer Engineering
Copyright 2000, Dialogic Corporation