etVoiceModemDial Sample Program

TeleTools

This sample program demonstrates how to dial a voice call with a voice modem.  We always recommend that you update any .INF files or firmware for your voice modem before you begin testing.  Check with your manufacturer for details.

Click here for more information about voice modems.

Requirements
Using This Sample Program
Download this Sample Program 
How this Sample Program Works
Source Code
Release Notes

Development Environment Technical Information
Telephony Hardware Technical Information

 

Requirements

A voice modem with or without a handset connected.

NOTE:  Your voice modem must have the proper INF files loaded in order to tell Windows that it is a voice modem, otherwise you will only have the features of a data modem.

Using This Sample Program

  1. Select a modem from the list of devices

  2. Enter a phone number in the edit box adjacent to the Dial button

  3. Click the Dial button.

  4. Pick up the connected handset.

  5. Click the Hangup button to hang up

If the telephony device can detect when the remote party hang ups then the sample program will automatically hangup.  You can also press the hangup button to hangup the call on your end.  The TeleScope button will popup our TeleScope prototyping, diagnostic, testing and debugging tool to allow you to see and do a lot more with this sample.

Download this Sample Program

For Use TeleTools v3.7

File

Purpose

EXE

Ready to run!

Borland Delphi 5,6,7

Source code and wave files

Visual Basic 5,6

Source code and wave files

Tell us what you need?

Click here and tell us what you need!

   

How this Sample Program Works

We use the etLine.DeviceList property to automatically populate the device combobox with the list of available TAPI devices on your machine.  In the ComboBoxDevice click event, the etLine.DeviceName property is set to your selected device to the name selected in the combobox. We then use the etLine.TAPITSP property to see the text of the name of the TSP associate with this device and look to see if it contains the word "modem".  If true, we then use the etLine.DeviceMediaModesAvailable property to check the flags set by the modem's INF file.  A data modem will set the flags for LINEMEDIAMODE_INTERACTIVEVOICE and LINEMEDIAMODE_DATAMODEM, while a voicemodem will also set the flags for LINEMEDIAMODE_UNKNOWN  and LINEMEDIAMODE_AUTOMATEDVOICE.  We put the code for all of this into two simple functions, IsVoiceModem and IsOnlyDataModem.  If this is a voicemodem, then we allow you to dial, if not, then we report that this device is either a datamodem or something else.

If your device is a voicemodem, we then set the etLine1.DeviceActive property to True and make sure the device activates without an error.  When you enter a number into the TextPhoneNumber textbox and press the dial button, we use the etLine.CallDial method to dial your phone number.  Since this is a voicemodem, you will be allowed to pickup the call with the device whether you have a handset attached or not because on a voicemodem, you have audio through a wave driver and can do things like play wave files to a caller, send and receive digits, and more.  Be sure to see the etDataModemDial sample if you only have a data modem.  If the remote caller hangs up the phone and the device can detect the remote party disconnect, TeleTools fires the On_Disconnected event and automatically hangs up the call, otherwise you can hangup the call by pressing the hangup button which will issue the etLine.CallHangup method.

Control

Description

ComboDevice Combobox listing available TAPI devices with the etLine.DeviceList property
CommandDial Dial button the issues the etLine.CallDial method
TextPhoneNumber Textbox that holds the phone number you wish to dial

etLine1

The TeleTools etLine component

 

Event Handler Routine

Description

ComboDevice_Click Processes the device change and checks to see if the device is a modem
CommandDial_Click Activates the device and tries to dial with the etLine.CallDial method
CommandHangup_Click Hangs up the phone with the etLine.CallHangup  method
etLine1_OnBusy Event hander triggered by hearing the busy signal on the phone line

Form_Load

Activates the etLine control and populates the device combo box with your TAPI devices using the etLine.DeviceList property

Form_Unload De-activates the etLine control

 

Subroutine

Description

IsOnlyDataModem

Function to check if the device is a datamodem

IsVoiceModem

Function to check if the device is a voicemodem

 

Release Notes

April 25, 2003

Published