Share via


PHONE_BUTTON message

The TSPI 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 PHONEBUTTONMODE_ constants.

  • dwParam3
    Specifies whether this is a button down event or a button up event. This parameter uses one of the PHONEBUTTONSTATE_ constants

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.

Requirements

TAPI version

Requires TAPI 2.0 or later

Header

Tapi.h

See also

PHONEBUTTONFUNCTION_ Constants

PHONEBUTTONMODE_ Constants

PHONEBUTTONSTATE_ Constants

PHONEEVENT

PHONESTATUS

TSPI_phoneGetButtonInfo

TSPI_phoneGetDevCaps

TSPI_phoneSetStatusMessages