etVoiceModemDialTone Sample Program

TeleTools

This sample program shows how to detect a dial tone when using a voice modem.  If you do not have a voicemodem, please try the sample program designed just for data modems, etDataModemDialTone

Click here for more information about voicemodems.

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

  • TeleTools 3.7 or above if you wish to compile this sample yourself

  • A voicemodem with the proper INF file installed

Using This Sample Program

  1. Select a voice modem

  2. Click the "Dial Tone?" button

    A dialog box will appear indicating if dial tone was detected or not.

                                 

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

This program allows you to select the telephony device using the Teletools etLine.DeviceList property.  When the user selects a device from the list, we use the etLine.DeviceMediaModesAvailable property in the IsModem and IsVoiceModem functions to detect if the device is a modem and what type.  We verify for this sample that the device is a voicemodem and if not, pop up a reminder to instead use the etDataModemDialTone sample.

When the check dialtone button is pressed, TeleTools activates the etLine component with etLine.DeviceActive = True and then sets the phone number with etLine.CallPhoneNumber = "W".  The 'W' tells the voicemodem to 'wait for dialtone'.  The program then dials the phone with etLine.CallDial.

The call will automatically disconnect.  In the OnDisconnected event handler, TeleTools checks the etLine.CallDisconnectMode property to see if the call is reported as LINEDISCONNECTMODE_NORMAL or LINEDISCONNECTMODE_NODIALTONE.  These are TeleTools TAPI constants located in the etTTConst file.  The sample then pops up a message box letting the user know whether a dialtone was reported or not.

It is not safe to check for dial tone with every telephone call.  We suggest that you offer it as an option to your users as a diagnostic tool or perform a test when the program starts.

Control

Description

ComboDevice Displays, selects, and activates the desired TAPI voicemodem
CommandDialTone Uses TeleTools methods and properties to test for dialtone

etLine

The TeleTools etLine component

 

Event Handler Routine

Description

ComboDevice_Click

Select / Change the TAPI device and check for modem

CommandDialTone_Click

On button press activate etLine and dial the call with etLine.CallDial

etLine1_OnDisconnected

TeleTool event, the remote call has hung up.  Deactivate etLine and report the disconnect mode
Form_Load Load the form and enable TeleTools components

Form_Unload

Unload the form and disable TeleTools

 

Subroutine

Description

IsDataModem

Function that tests to see if the selected device is a datamodem using TeleTools properties and return true so

IsVoiceModem

Function that tests to see if the selected device is a voicemodem using TeleTools and return true if so

 

Release Notes

April 29, 2003

Published