PHONE_BUTTON

The PHONE_BUTTON message is sent to the PHONEEVENT callback function to notify TAPI that it has detected a button press on a phone device that TAPI has open and for which button press monitoring is enabled.

PHONE_BUTTON
htPhone = (HTAPIPHONE) hPhoneDevice;
dwMsg = (DWORD) PHONE_BUTTON;
dwParam1 = (DWORD) idButtonLamp;
dwParam2 = (DWORD) PhoneButtonMode;
dwParam3 = (DWORD) PhoneButtonState;
 

Parameters

htPhone
The TAPI opaque object handle to the phone device.
dwMsg
The value PHONE_BUTTON.
dwParam1
The button/lamp identifier of the button that was pressed. Note that the button identifiers 0 through 11 are always the KEYPAD buttons. '0' is button identifier 0, '1' is button identifier 1, and so on, through button identifier 9. '*' is button identifier 10, and '#' is button identifier 11. Additional information about a button identifier is available through TSPI_phoneGetDevCaps and TSPI_phoneGetButtonInfo.
dwParam2
The button mode of the button. This parameter uses the following PHONEBUTTONMODE_ constants:
PHONEBUTTONMODE_CALL
The button is assigned to a call appearance.
PHONEBUTTONMODE_FEATURE
The button is assigned to requesting features from the switch, such as hold, conference, or transfer.
PHONEBUTTONMODE_KEYPAD
The button is one of the twelve keypad buttons, '0' through '9', '*', and '#'.
PHONEBUTTONMODE_LOCAL
The button is a local function button, such as mute or volume control.
PHONEBUTTONMODE_DISPLAY
The button is a "soft" button associated with the phone's display. A phone set can have zero or more display buttons.
dwParam3
Specifies whether this is a button down event or a button up event. This parameter uses the following PHONEBUTTONSTATE_ constants:
PHONEBUTTONSTATE_UP
The button is in the "up" state.
PHONEBUTTONSTATE_DOWN
The button is in the "down" state (pressed down).

Remarks

The set of phone button events that is reported is selected by the TSPI_phoneSetStatusMessages function. The service provider must send PHONE_BUTTON messages for at least the set of button press events selected through that procedure. The service provider can send more than this set but should limit its messages to this set for performance reasons.

A PHONE_BUTTON message is sent whenever a button changes state. The service provider must guarantee that each button DOWN event is strictly paired with a button UP event, in that order. Note that a service provider that can detect only one of the button press or release events should expand the event it does detect into a button DOWN message followed by a button UP message.

See Also

PHONEBUTTONFUNCTION_ Constants, PHONEBUTTONMODE_ Constants, PHONEBUTTONSTATE_ Constants, PHONEEVENT, PHONESTATUS, TSPI_phoneGetButtonInfo, TSPI_phoneGetDevCaps, TSPI_phoneSetStatusMessages,