etVoiceModemCallBlocker Sample Program

TeleTools

The etVoiceModemCallBlocker program allows the user to detect the name and phone number of the originator of a call on the selected device in the same manner as the etVoiceModemCallerID sample program. 

This program goes a few steps further!

If the CallerID information is blocked (private) then a wave file is played to the caller indicating that this number does not accept blocked calls. We show you how to create your own call blocker or telephone zapper!

If the CallerID information indicates that the call is Out of Area then a wave file is played that sounds like a Special Information Tone (SIT). A large number of telemarketing calls are marked as Out of Area.  By playing the SIT you are informing the telemarketers system that your number is not in service and they will take your phone number out of their database.

This program is designed specifically to work with voice modems and differs significantly to the etCallerID sample program.  etCallerID is designed to work with more sophisticated telephony devices such as the Hi-Phone, Dialogic cards and PBX's.

Click here for more information about CallerID.

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 will need the following to utilize this sample program:

  • TeleTools 3.7 or above if you wish to compile on your machine

  • A voice modem that supports capturing CallerID.

  • CallerID service from your phone company or your telephone system.

Using This Sample Program

When this program starts it use the list box to select a voice modem.

Make a telephone call to the device.  Once the CallerID information becomes available it will be displayed. If you are not getting caller ID information check this FAQ for more information.

In most situations the CallerID information is delivered to the telephony device between the first and second ring.  In this case the etLine.OnCallerID event will fire and the name and number will be displayed.

If you call into this program using a phone (like a cell phone) that is listed as out of area, you will hear the SIT tone.  If you call from a phone with callerID blocked (you can block your CallerID on a per call basis), then you will hear a wave file saying that this number does not accept blocked calls.

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 differs from the etCallerID sample program in that it overcomes three issues related to voice modems: 

  • The first has to do with a delay of end of call notification. 

  • The second has to do with the method that voice modems report Blocked (Private) and Out of Area CallerID information. 

  • The third issue is that voice modems cause the etLine.OnCallerID event to fire  an additional time when the call is Blocked or Out of Area.

The delay of end of call notification is a problem because most modems have a delay of 15-30 seconds (or more) after a call has ended before it is ready to detect the next call.  In those cases the CallerID information is not detected.  This is overcome by calculating the time between rings and then setting a timer.  The etLine1_OnRing event fires with each detected ring.  This event handler routine resets the timer.  The timer will fire if a ring is not detected in time.  The timer fires because it is safe to assumed that the caller has hung up or the line has been answered.

Voice modems do not set the etLine1.CallCallerIDFlags properly.  They show both Blocked and Out of Area calls as Out of Area.  However they do set the etLine.Call.CallerID.Name property with a "P" or "O" to indicate if they are Private (Blocked) or Out of Area.  The logic for this workaround can be seen in the etLine1_OnCallerID event handler routine.

Multiple firings of the etLine1_OnCallerID event are handled with a simple "If" statement in the etLine_OnCallerID event handler routine checking to see if the TextCallerIDName property has been set.

When this program starts ComboDevice is filled with all of the available telephony devices.  When a device is selected it is checked to make sure that it is a voice modem then the device is activated.

The etLine1_OnOffering event fires when an inbound call is detected.  The TextCallerIDName and TextCallerIDNumber controls are cleared.  The dtRingDuration date/time variable is checked to see if dtFirstRing needs to be reset. 

When the TAPI line device indicates that the CallerID information has changed the etLine_OnCallerID event will fire causing the etLine1_OnCallerID event handler routine to be executed.  This routine checks the CallerID flags and displays the available information.

If the CallerID information is Blocked then the Blocked.wav file is played then the device is reset.

If the CallerID information indicates that the call is Out of Area the the SIT.wav file is played then the device is reset.

When the application is closed the Form_Unload event handler routine is executed.  This routine deactivates the TAPI line device.

Control

Description

ComboDevice

list and select all available TAPI line devices

TextCallerIDName

Display the CallerID Name 

TextCallerIDNumber

Display the CallerID Number

etLine

TeleTools etLine control used to access the TAPI line device.

TimerCallAnswered_Timer Fires 1/4 of a second after a ring was expected then resets the device

 

Event Handler Routine

Description

ComboDevice_Click Check the TAPI line device when clicked
etLine1_OnCallerID Display the CallerID information when the device indicates the information has changed.

etLine1_OnConnected

Detects the call is connected and starts playing a wave file
etLine1_OnOffering Detects a new call and resets the callerID display boxes and the ring counters
etLine1_OnRing Detects a ring event and starts a timer to find out when a ring is missed

etPlay1_OnDone

Reports that a wave file has finished playing
Form_Load Get a list of the available TAPI Line devices and select and activate the first device
Form_Unload Deactivate the the TAPI line device
TimerCallAnswered_Timer Fires 1/4 of a second after a ring is missed indicating a call was answered or disconnected

 

Subroutine

Description

IsOnlyDataModem Checks to see if the selected device is a datmodem and if so returns true
IsVoiceModem Checks to see if the selected device is a voicemodem and if so returns true

 

Release Notes

May 1, 2003

Published