etCallerID Sample Program

TeleTools

The etCallerID program allows the user to detect the name and phone number of the originator of a call on the selected device. The etLine control is used to capture the CallerID information.

JavaScript and VBScript version shown below.

This sample program is designed to work with sophisticated telephony devices such as the Hi-Phone, Dialogic cards and PBX's. If you are using a voice modem then use the etVoiceModemCallerID sample program. 

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

  • TeleTools 3.7 or above if you wish to compile it yourself

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

    • TeleTools Express

    • TeleTools Standard

    • TeleTools Professional

    • TeleTools Enterprise

  • A telephony device that supports capturing CallerID.

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

Using This Sample Program

When this program starts it selects and attempts to active the first available TAPI device.  Use the list box to select the desired device.

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.

In some cases the CallerID information may be available as soon as the call is offered to the application.  For this reason the etLine.OnOffering event is used to check for the availability of the CallerID information by executing the etLine.OnCallerID event handler routine.

This program does not answer and hang-up calls therefore it may take several seconds for the telephony device to signal that a call is gone after it is hung-up. If a new call comes in before the telephony device indicates that the previous call is complete then the CallerID information will not be reported properly.

Download this Sample Program

For use with TeleTools v3.7

File

Purpose

EXE

Ready to run!

Borland C++ 4,5,6

Source code

Borland Delphi 5,6,7

Source code

JavaScript Source code
VBScript Source code

Visual Basic 5,6

Source code

Visual Basic .NET

Source code

Visual C++ 6

Source code

Visual C++ .NET

Source code

Visual Fox Pro 6

Source code

Tell us what you need?

Click here and tell us what you need!

   

How this Sample Program Works

When the program starts the Form_Load event handler routine fires.  The etLine control is enabled which allows the list of devices to be used to fill the Device combo box.  The first device in the list is selected which causes the ComboDevice_Click event to fire.

When the Device combo box is clicked the select TAPI line device will be activated.  

When a new inbound call is detected the etLine.OnOffering event will fire causing the etLine1_OnOffering event handler routine to be executed.  This routine calls the etLine1_OnCallerID event.  This is done because some telephony devices make the CallerID information available at the beginning of the call, in these cases the etLine.OnCallerID event may not fire.

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

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

Control

Description

Device combobox

list and select all available TAPI line devices

CallerID Name textbox

Display the CallerID Name 

CallerID Number textbox

Display the CallerID Number

etLine

TeleTools etLine control used to access the TAPI line 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_OnOffering

Display the CallerID information if it is available when then call is first detected

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

Release Notes

April 7, 2003

Published