2.2.4.2.1.32 PHONE_STATE

The PHONE_STATE packet is sent when the status of a phone device changes.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

TotalSize

InitContext

fnPostProcessProcHandle

hRemotePhone

Msg

OpenContext

Param1

Param2

Param3

Param4

TotalSize (4 bytes): An unsigned 32-bit integer. The total size of the asynchronous event packet.

InitContext (4 bytes): An unsigned 32-bit integer. The opaque client-specified session value that MUST be equal to the InitContext value that is specified in the original scoping of the phone Initialize request.

fnPostProcessProcHandle (4 bytes): An unsigned 32-bit integer. MUST be set to zero when sent and MUST be ignored on receipt.

hRemotePhone (4 bytes): An unsigned 32-bit integer. The handle of the client for the phone value.

Msg (4 bytes): An unsigned 32-bit integer. The packet type, which MUST be set to 0x00000012 (PHONE_STATE).

OpenContext (4 bytes): An unsigned 32-bit integer. The opaque client-specified context value that MUST be equal to the OpenContext value that is specified in the original scoping of the phone Open request.

This information MUST be passed back to the application with each completion and event that is associated with the handle of the phone. This field is not interpreted by TAPI.

Param1 (4 bytes): An unsigned 32-bit integer. The phone state that changed. This field MUST use one of the PHONESTATE_Constants.

Param2 (4 bytes): An unsigned 32-bit integer. The phone state-dependent information that details the status change. This parameter is not used if multiple flags are set in the Param1 field from multiple status items that have changed. The application SHOULD invoke the GetStatus packet to obtain complete information.

If the Param1 field is set to PHONESTATE_OWNER, this field MUST contain the new number of owners.

If the Param1 field is set to PHONESTATE_MONITORS, this field MUST contain the new number of monitors.

If the Param1 field is set to PHONESTATE_LAMP, this field MUST contain the button/lamp identifier of the lamp that changed.

If the Param1 field is set to PHONESTATE_RINGMODE, this field MUST contain the new ring mode.

If the Param1 field is set to one of the PHONESTATE_HANDSETHOOKSWITCH, PHONESTATE_SPEAKERHOOKSWITCH, or PHONESTATE_HEADSETHOOKSWITCH constants, this field MUST contain the new hookswitch mode of that device. This parameter MUST use one of the PHONEHOOKSWITCHMODE_Constants.

Param3 (4 bytes): An unsigned 32-bit integer. This MUST be ignored on receipt and can be any value. 

Param4 (4 bytes): An unsigned 32-bit integer. This MUST be ignored on receipt and can be any value.