etDataModemDial Sample Program

TeleTools

This sample program demonstrates how to dial a voice call with a standard data modem.  If you have a voice modem then see the etVoiceModemDial sample program!

Click here for more information about standard data 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

  • You can use this sample with any Edition of TeleTools v3.7

    • TeleTools Express

    • TeleTools Standard

    • TeleTools Professional

    • TeleTools Enterprise

  • A standard data modem with a handset connect. If you have a voice modem with the TAPI drivers (INF file) installed, then see the etVoiceModemDial sample program

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.  This will cause the following dialog box to appear.


    This dialog box belongs to the Microsoft Unimodem Telephony Service Provider (TSP).

  4. Pick up the connected handset and click the Talk button or click the Hang Up button.

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 datamodem 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 data modem, then we allow you to dial, if not, then we report that this device is either a voicemodem or something else.

If your device is a data modem, 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 datamodem, the UnimodemV generic modem TSP for windows will popup up a dialog box allowing you to pick up a handset and fire the OnConnected event.  A datamodem can only dial, it cannot answer a call, that is why the Unimodem call status dialog pops up.  A voicemodem or other telephony device would not popup this box and would allow you to actually answer the call with the device as well as providing more functionality.  Be sure to see the etVoiceModem Dial sample if you have a voice modem.  We deactivate the device with etLine.DeviceActive = False and you can continue by picking up the handset and pressing the talk button on the call status dialog.

Control

Description

ComboDevice Holds the list of your TAPI line devices, including data and voice modems
CommandDial When clicked, this button uses the etLine.CallDial property to dial a call
TextPhoneNumber TextBox holding the phone number to dial (set with the etLIne.CallPhonenumber property)

etLine1

The TeleTools etLine component

 

Event Handler Routine

Description

ComboDevice_Click Processes a change in the telephony device, checking to see if it is a modem, and if so, whether it is a data modem or a voice modem
CommandDial_Click If this is a data modem, it dials the phone with our etLine.CallDial method
etLine1_OnConnected Modems report the On_Connected event as soon as the dial string is complete, so here we turn etLine.DeviceActive to false and let you pick up the call

Form_Load

On loading this populates the device combobox and enables the controls

 

Subroutine

Description

IsDataModem Checks etLine parameters to verify and return true if the selected device is a datamodem

IsVoiceModem

Checks etLine parameters to verify and return true if the selected device is a voicemodem

 

Release Notes

April 25, 2003

Published