2.2.6.48 PHONESTATUS

The PHONESTATUS packet specifies the current status of a phone device. PHONESTATUS is supplied by the server in the field VarData of the returned version of the GetStatus packet if the request is completed successfully.


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

dwTotalSize

dwNeededSize

dwUsedSize

dwStatusFlags

dwNumOwners

dwNumMonitors

dwRingMode

dwRingVolume

dwHandsetHookSwitchMode

dwHandsetVolume

dwHandsetGain

dwSpeakerHookSwitchMode

dwSpeakerVolume

dwSpeakerGain

dwHeadsetHookSwitchMode

dwHeadsetVolume

dwHeadsetGain

dwDisplaySize

dwDisplayOffset

dwLampModesSize

dwLampModesOffset

dwOwnerNameSize

dwOwnerNameOffset

dwDevSpecificSize

dwDevSpecificOffset

dwPhoneFeatures (optional)

VarData (variable)

...

dwTotalSize (4 bytes): An unsigned 32-bit integer. The total size, in bytes, allocated to this packet.

dwNeededSize (4 bytes): An unsigned 32-bit integer. The size, in bytes, for this packet that is needed to hold all the returned information.

dwUsedSize (4 bytes): An unsigned 32-bit integer. The size, in bytes, of the portion of this packet that contains useful information.

dwStatusFlags (4 bytes): An unsigned 32-bit integer. The status flags for this phone device. This member uses one of the PHONESTATUSFLAGS_Constants.

dwNumOwners (4 bytes): An unsigned 32-bit integer. The number of application modules with owner privilege for the phone.

dwNumMonitors (4 bytes): An unsigned 32-bit integer. The number of application modules with monitor privilege for the phone.

dwRingMode (4 bytes): An unsigned 32-bit integer. The current ring mode of a phone device.

dwRingVolume (4 bytes): An unsigned 32-bit integer. The current ring volume of a phone device. This is a value between 0x00000000 (silence) and 0x0000FFFF (maximum volume).

dwHandsetHookSwitchMode (4 bytes): An unsigned 32-bit integer. The current hook-switch mode of the phone's handset. This member uses one of the PHONEHOOKSWITCHMODE_Constants.

dwHandsetVolume (4 bytes): An unsigned 32-bit integer. The current speaker volume of the phone's handset device. This is a value between 0x00000000 (silence) and 0x0000FFFF (maximum volume).

dwHandsetGain (4 bytes): An unsigned 32-bit integer. The current microphone gain of the phone's handset device. This is a value between 0x00000000 (silence) and 0x0000FFFF (maximum gain).

dwSpeakerHookSwitchMode (4 bytes): An unsigned 32-bit integer. The current hook-switch mode of the phone's speakerphone. This member uses one of the PHONEHOOKSWITCHMODE_Constants.

dwSpeakerVolume (4 bytes): An unsigned 32-bit integer. The current speaker volume of the phone's speaker device. This is a value between 0x00000000 (silence) and 0x0000FFFF (maximum volume).

dwSpeakerGain (4 bytes): An unsigned 32-bit integer. The current microphone gain of the phone's speaker device. This is a value between 0x00000000 (silence) and 0x0000FFFF (maximum gain).

dwHeadsetHookSwitchMode (4 bytes): An unsigned 32-bit integer. The current hook-switch mode of the phone's headset. This member uses one of the PHONEHOOKSWITCHMODE_Constants.

dwHeadsetVolume (4 bytes): An unsigned 32-bit integer. The current speaker volume of the phone's headset device. This is a value between 0x00000000 (silence) and 0x0000FFFF (maximum volume).

dwHeadsetGain (4 bytes): An unsigned 32-bit integer. The current microphone gain of the phone's headset device. This is a value between 0x00000000 (silence) and 0x0000FFFF (maximum gain).

dwDisplaySize (4 bytes): An unsigned 32-bit integer. The size, in bytes, of the display information.

dwDisplayOffset (4 bytes): An unsigned 32-bit integer. The offset, from the beginning of this packet to a VARSTRING containing the phone's current display information. The size of the field is specified by dwDisplaySize.

dwLampModesSize (4 bytes): An unsigned 32-bit integer. The size, in bytes, of the current lamp modes array.

dwLampModesOffset (4 bytes): An unsigned 32-bit integer. The offset, from the beginning of this packet to the variably sized field containing the phone's current lamp modes. The size of the field is specified by dwLampModesSize. Each lamp mode in the array MUST be one or more of the PHONELAMPMODE_Constants.

dwOwnerNameSize (4 bytes): An unsigned 32-bit integer. The size, in bytes, of the name of the current owner, including the null terminator.

dwOwnerNameOffset (4 bytes): An unsigned 32-bit integer. The offset from the beginning of the packet to the variably sized field containing the name of the application that is the current owner of the phone device. The name is the application name provided by the application when it is invoked with phoneInitialize or phoneInitializeEx. If no application name was supplied, the application's file name is used instead. The size of the field is specified by dwOwnerNameSize. If the phone currently has no owner, dwOwnerNameSize is 0.

dwDevSpecificSize (4 bytes): An unsigned 32-bit integer. The size, in bytes, of the device-specific field. If the device-specific information is a pointer to a string, the size MUST include the null terminator.

dwDevSpecificOffset (4 bytes): An unsigned 32-bit integer. The offset, from the beginning of this packet to the variably sized device-specific field. The size of the field is specified by dwDevSpecificSize.

dwPhoneFeatures (4 bytes): An unsigned 32-bit integer. The flags that indicate which functions can be invoked on the phone, considering the availability of the feature in the device capabilities, the current device state, and device ownership of the invoking application. A 0 indicates that the corresponding feature cannot be invoked by the application on the phone in its current state; a 1 indicates the feature can be invoked. This member uses one or more of the PHONEFEATURE_Constants.

VarData (variable): MUST contain:

  • The phone's current display information, as specified by dwDisplayOffset.

  • The phone's current lamp modes, as specified by dwLampModesOffset.

  • The name of the application that is the current owner of the phone device, as specified by dwOwnerNameOffset.

  • The device-specific information, as specified by dwDevSpecificOffset.

Device-specific extensions SHOULD use the DevSpecific (dwDevSpecificSize and dwDevSpecificOffset) variably sized area of this packet.

The dwPhoneFeatures member is available only to the phone device with a TAPI version of 2.0 or later.