There are three major station status functions that need control: Message Waiting lights, Forwarding, and Do Not Disturb. Forwarding and Do Not Disturb are controllable through the existing lineForward function (which is address-specific), and queried using lineGetAddressStatus. The LINEDEVSTATUSFLAGS_MSGWAIT bit in the dwDevStatusFlags member of LINEDEVSTATUS indicates the status of the message waiting light on the device, and a LINEDEVSTATE_MSGWAITON or LINEDEVSTATE_MSGWAITOFF message is sent to indicate when the state changes. The lineSetLineDevStatus function allows the message waiting light to be controlled without having to implement a TAPI phone device just for that purpose. The LINEFEATURE_SETDEVSTATUS bit (in the dwLineFeatures member of LINEDEVCAPS and LINEDEVSTATUS) indicates when it can be called, and the dwSettableDevStatus member of LINEDEVCAPS allows the application to detect which device status settings can be controlled from the application. In addition to allowing the message waiting feature to be controlled, it also allows the device's Connected, Inservice, and Locked status to be set, to the extent that these are supported by the switch or other hardware. Calls to this function result in appropriate LINE_LINEDEVSTATE messages being sent to reflect the new status.