Play a wave file through the telephony phone device


The etPlay control is used to play wave files over any available Windows Wave audio device (see Play a wave file). To play through a telephony phone device you first need to select the correct wave audio device. The etPhone.WavePlay.Available property indicates if the select telephony device has an audio device associated with it. The etPhone.WavePlay.ID indicates which wave play audio device is associated with the TAPI line device. Set the etPlay.Device.ID property to the value of the etPhone.WavePlay.ID.

 

Using TeleScope

1.    Activate the phone device.

2.    Click the Handset, Headset or Speakerphone tab.

3.    Lift the receiver of the attached handset device. See Detect when the handset is lifted on the TAPI Phone device.
     -or
Click the etPhone.Headset.MicrophoneAndSpeaker radio button.
     -or-
Turn on the speakerphone.

4.    Select the menu option "TeleScope | Synchronize | by etPhone"

5.    Display the etPlay TeleScope. For an example see Display the etLine TeleScope.

6.    Click the Source tab.

7.    Enter a file name with full path in the etPlay.Source.FileName edit box.

8.    Select the menu option "Device | Active"
     -or-
Click the first VCR style button adjacent to the Device list

 

Using TeleTools

1.    Activate the phone device

2.    Lift the receiver of the attached handset device. See Detect when the handset is lifted on the TAPI Phone device.
     -or
Set the etphone.headset.microphoneandspeaker property to True.
     Example:
           etPhone1.Headset.MicrophoneAndSpeaker := True;
     -or-
Turn on the speakerphone.

3.    Set the etPlay.Device.ID property to the value in etPhone.WavePlay.ID
     Example:
           etPlay1.Device.ID = etPhone1.WavePlay.ID

4.    Set the etPlay.Source.FileName property to the file name with full path.
     Example:
           etPlay1.Source.FileName := 'C:\Program Files\ExceleTel\TeleTools\3.7\Wav\et';

5.    Set the etPlay.Device.Active property to True.
     Example:
           etPlay1.Device.Active := True;

 

Note:

When working with voice modems it is important to remember that not all voice modes are created equal! Some require the handset to be off hook before using the audio device while others require the handset to be on hook when starting the audio device then the handset may be lifted.