etPhone.Device Properties


Device.Active
Device.Capabilities.DevSpecific
Device.Capabilities.DevSpecificSize
Device.Capabilities.HookSwitchDevs
Device.Capabilities.States
Device.Count
Device.ID
Device.List
Device.Name
Device.State
Device.StateDetails
 


etPhone.Device.Active

ActiveX: etPhone.DeviceActive
Type:
String
When:
Design-Time and Run-Time
Read/Write:
Read and Write
Edition:
Standard, Professional, Enterprise
<Click here for example>

This property indicates whether the current device is active or inactive. It is also used to set the device active or inactive.

Prior to setting this property to true the etPhone.Device.ID or etPhone.Device.name property must be set to a valid device. The etLine.Device.ID must first be set and the etLine.Device.Active property must be true.

etPhone.Device.Capabilities.DevSpecific

ActiveX: etPhone.DeviceCapabilitiesDevSpecific
Type:
Pchar
When:
Run-Time
Read/Write:
Read Only
Edition:
Enterprise
This is a pointer to a buffer that holds the device specific information for the TAPI phone device defined in Device.ID.

etPhone.Device.Capabilities.DevSpecificSize

ActiveX: etPhone.DeviceCapabilitiesDevSpecificSize
Type:
Integer
When:
Run-Time
Read/Write:
Read Only
Edition:
Enterprise
This is the size of the buffer pointed to by the Device.Capabilities.DevSpecific property.

etPhone.Device.Capabilities.HookSwitchDevs

ActiveX: etPhone.DeviceCapabilitiesHookSwitchDevs
Type:
Integer
When:
Run-Time
Read/Write:
Read Only
Edition:
Standard, Professional, Enterprise
This is a set of bit flags that indicates which hook switch devices are available. The values of this property directly correspond with the properties etPhone.Handset.Available, etPhone.Headset.Available and etPhone.Speakerphone.Available.

Note: This property replaces the property etPhone.Phone.HookSwitchDevs.

PHONEHOOKSWITCHDEV_HANDSET

The ubiquitous, handheld, ear- and mouthpiece.

PHONEHOOKSWITCHDEV_SPEAKER

A built-in loudspeaker and microphone. This could also be an externally connected adjunct to the telephone set.

PHONEHOOKSWITCHDEV_HEADSET

A headset connected to the phone set.

 

etPhone.Device.Capabilities.States

ActiveX: etPhone.DeviceCapabilitiesStates
Type:
Integer
When:
Run-Time
Read/Write:
Read Only
Edition:
Standard, Professional, Enterprise
This is a set of bit flags that indicates which states the TAPI phone device defined in etPhone.Device.ID supports.

Note: This property replaces the property etPhone.Phone.States.

Phone State

etPhone Event

Purpose

PHONESTATE_OTHER

OnPhoneState

Phone-status items other than those listed below have changed. The application should check the current phone status to determine which items have changed.

PHONESTATE_CONNECTED

OnPhoneState

The connection between the phone device and TAPI was just made. This happens when TAPI is first invoked or when the wire connecting the phone to the computer is plugged in while TAPI is active.

PHONESTATE_DISCONNECTED

OnPhoneState

The connection between the phone device and TAPI was just broken. This happens when the wire connecting the phone set to the computer is unplugged while TAPI is active.

PHONESTATE_OWNER

OnPhoneState

The number of owners for the phone device has changed.

PHONESTATE_MONITORS

OnPhoneState

The number of monitors for the phone device has changed.

PHONESTATE_DISPLAY

OnPhoneState

The display of the phone has changed.

PHONESTATE_LAMP

OnPhoneState

A lamp of the phone has changed.

PHONESTATE_RINGMODE

OnPhoneState

The ring mode of the phone has changed.

PHONESTATE_RINGVOLUME

OnPhoneState

The ring volume of the phone has changed.

PHONESTATE_HANDSETHOOKSWITCH

OnHandsetHookSwitch

OnPhoneState

The handset hookswitch state has changed.

PHONESTATE_HANDSETVOLUME

OnHandsetVolume

OnPhoneState

The handset's speaker volume setting has changed.

PHONESTATE_HANDSETGAIN

OnHandsetGain

OnPhoneState

The handset's microphone gain setting has changed.

PHONESTATE_SPEAKERHOOKSWITCH

OnSpeakerphoneHookSwitch

OnPhoneState

The speakerphone's hookswitch state has changed.

PHONESTATE_SPEAKERVOLUME

OnSpeakerphoneVolume

OnPhoneState

The speakerphone's speaker volume setting has changed.

PHONESTATE_SPEAKERGAIN

OnSpeakerphoneGain

OnPhoneState

The speakerphone's microphone gain setting state has changed.

PHONESTATE_HEADSETHOOKSWITCH

OnHeadsetHookSwitch

OnPhoneState

The headset's hookswitch state has changed.

PHONESTATE_HEADSETVOLUME

OnHeadsetVolume

OnPhoneState

The headset's speaker volume setting has changed.

PHONESTATE_HEADSETGAIN

OnHeadsetGain

OnPhoneState

The headset's microphone gain setting has changed.

PHONESTATE_SUSPEND

OnPhoneState

The application's use of the phone device is temporarily suspended.

PHONESTATE_RESUME

OnPhoneState

The application's use of the phone device is resumed after having been suspended for some time.

PHONESTATE_DEVSPECIFIC

OnPhoneState

The phone's device-specific information has changed.

PHONESTATE_REINIT

OnPhoneState

Items have changed in the configuration of phone devices. To become aware of these changes (as with the appearance of new phone devices), the application should reinitialize its use of TAPI. The hDevice parameter of the PHONE_STATE message is left NULL for this state change as it applies to any of the phones in the system.

PHONESTATE_CAPSCHANGE

OnPhoneState

Indicates that due to configuration changes made by the user or other circumstances one or more of the members in the PHONECAPS structure have changed. The application should use phoneGetDevCaps to read the updated structure.

PHONESTATE_REMOVED

OnPhoneState

Indicates that the device is being removed from the system by the service provider (most likely through user action, through a control panel or similar utility). Normally, a PHONE_STATE message with this value is immediately followed by a PHONE_CLOSE message on the device. Subsequent attempts to access the device prior to TAPI being reinitialized result in PHONEERR_NODEVICE being returned to the application. If a service provider sends a PHONE_STATE message containing this value to TAPI, TAPI passes it along to applications that have negotiated TAPI version 1.4 or later; applications negotiating a previous API version do not receive any notification.

 

etPhone.Device.Count

ActiveX: etPhone.DeviceCount
Type:
Integer
When:
Design-Time and Run-Time
Read/Write:
Read Only
Edition:
Standard, Professional, Enterprise
This property indicates the number of valid TAPI Phone devices that are available to this computer.

etPhone.Device.ID

ActiveX: etPhone.DeviceID
Type:
Integer
When:
Design-Time and Run-Time
Read/Write:
Read and Write
Edition:
Standard, Professional, Enterprise
<Click here for example>

This is the ID number for the selected TAPI Phone device. The valid values are zero to one less than the value of the property etPhone.Device.Count.

It is best to set this property to the value in etLine.Phone.ID, for example:

     If etLine1.Phone.Available then
        begin
          etPhone1.Device.ID := etLine1.Phone.ID;
          etPhone1.Device.Active := True;
        end;

After this property value is set the etPhone.Device.Name property is updated.

etPhone.Device.List

ActiveX: etPhone.DeviceList
Type:
TStrings
When:
Design-Time and Run-Time
Read/Write:
Read Only
Edition:
Standard, Professional, Enterprise
This property is a list of the valid TAPI Phone devices that are available to this computer.

etPhone.Device.Name

ActiveX: etPhone.DeviceName
Type:
String
When:
Design-Time and Run-Time
Read/Write:
Read and Write
Edition:
Standard, Professional, Enterprise
<Click here for example>

This property contains the name of the currently selected device.

This property may also be set to a valid device name. When this value is set the etPhone control searches the etPhone.Device.List property for a match then updates the etPhone.Device.ID property with the offset.

It is not suggested that this property be used to select the phone device. See the etPhone.Device.ID for a safe method of selecting a TAPI Phone device.

etPhone.Device.State

ActiveX: etPhone.DeviceState
Type:
Integer
When:
Run-Time
Read/Write:
Read Only
Edition:
Standard, Professional, Enterprise
<Click here for example>

This property indicates the current state of the device. See the etTTConst file for a list of valid “PHONESTATE_*” properties.

Also see the properties etPhone.StateDetails and etPhone.Phone.States. Also see the event etPhone.OnPhoneState.

etPhone.Device.StateDetails

ActiveX: etPhone.DeviceStateDetails
Type:
Integer
When:
Run-Time
Read/Write:
Read Only
Edition:
Standard, Professional, Enterprise
<Click here for example>

Some “PHONESTATE_*” have detailed information that is available in this property.

Phone state-dependent information detailing the status change. This parameter is not used if multiple flags are set in dwParam1, because multiple status items have changed. The application should invoke phoneGetStatus to obtain a complete set of information.

If Device.State is PHONESTATE_OWNER, Device.StateDetails contains the new number of owners.

If Device.State is PHONESTATE_MONITORS, Device.StateDetails contains the new number of monitors.

If Device.State is PHONESTATE_LAMP, Device.StateDetails contains the button/lamp identifier of the lamp that has changed.

If Device.State is PHONESTATE_RINGMODE, Device.StateDetails contains the new ring mode.

If Device.State is PHONESTATE_HANDSET, SPEAKER or HEADSET, Device.StateDetails contains the new hookswitch mode of that hookswitch device. This property uses the following PHONEHOOKSWITCHMODE_ constants:

 



etPhone Properties etPhone Properties - Handset, Headset, Speakerphone