4.1.0.11 LINE_LINEDEVSTATE

This message is sent when the state of a line device has changed. The TAPI DLL can invoke lineGetLineDevStatus to determine the new status of the line.

Sent to

LINEEVENT


Parameters

HTAPILINE htLine
Specifies the TAPI DLL's opaque object handle to the line device.

HTAPICALL htCall
Unused

DWORD dwMsg
The value LINE_LINEDEVSTATE Specifies the callback instance supplied when opening the line.

DWORD dwParam1
Specifies the line device status item that has changed, of type LINEDEVSTATE. Values are:

LINEDEVSTATE_OTHER
An other status item than those listed below has changed.

LINEDEVSTATE_CONNECTED
The line was previously disconnected and is now connected to the API.

LINEDEVSTATE_DISCONNECTED
This line was previously connected and is now disconnected from the API.

LINEDEVSTATE_MSGWAITON
The message waiting indicator is turned on.

LINEDEVSTATE_MSGWAITOFF
The message waiting indicator is turned off.

LINEDEVSTATE_INSERVICE
The line is connected to the API. This happens when the API is first activated, or when the line wire is physically plugged in and in service at the switch while the API is active.

LINEDEVSTATE_OUTOFSERVICE
The line is out of service at the switch or physically disconnected. The API cannot be used to operate on the line device.

LINEDEVSTATE_MAINTENANCE
Maintenance is being performed on the line at the switch. The API cannot be used to operate on the line device.

LINEDEVSTATE_NUMCALLS
The number of calls on the line device has changed.

LINEDEVSTATE_TERMINALS
The terminal settings have changed.

LINEDEVSTATE_ROAMING
The roaming state of the line device has changed.

LINEDEVSTATE_BATTERY
The battery level has changed significantly (cellular).

LINEDEVSTATE_SIGNAL
The signal level has changed significantly (cellular).

LINEDEVSTATE_DEVSPECIFIC
The line's device specific information has changed.

LINEDEVSTATE_REINIT
Items have changed in the configuration of line devices. Except in extreme cases, the Service Provider should use the normal configuration change notification mechanism as described in the "Overview" chapter instead of this message.

LINEDEVSTATE_LOCK
The locked status of the line device has changed.

DWORD dwParam2
The interpretation of this parameter depends on the value of dwParam1. If dwParam1 is LINEDEVSTATE_RINGING then dwParam2 contains the ring mode with which the switch instructs the line to ring. Valid ring modes are numbers in the range one to dwNumRingModes, where dwNumRingModes is a line device capability.

DWORD dwParam3
The interpretation of this parameter depends on the value of dwParam1. If dwParam1 is LINEDEVSTATE_RINGING then dwParam3 contains the ring count for this ring event. Ring count starts at zero.

Comments

The sending of this message can be controlled via TSPI_lineSetStatusMessages. The Service Provider must send LINE_LINEDEVSTATE messages for at least the set of status changes selected through that procedure. The Service Provider may send more than this set, however, it should try to limit its messages to this set for performance reasons. By default all status reporting will be disabled.

Comparison

This message at the TSPI level does not permit the value LINEDEVSTATE_REINIT for dwParam1 as in the corresponding message at the TAPI level. The determination to do dynamic reconfiguration affecting all devices is done at the level of the TAPI DLL. It cannot be initiated through this message by a Service Provider. Generally, such a reconfiguration would result in an orderly shutdown and initialization of the Service Provider using the usual sequence for doing so.

Similarly, at the TSPI level, dwParam1 may not be LINEDEVSTATE_MAKECALLREQUEST, since handing dial requests from a requester to the proxy dialer is handled strictly within the TAPI DLL.

At the TSPI level, the Service Provider does not report state changes when the line is opened and closed, since there is only ever one Open outstanding for the device.

See Also

Functions: TSPI_lineGetLineDevStatus, TSPI_lineSetStatusMessages, TSPI_lineGetStatusMessages
Data Types: LINEDEVSTATUS