etAutoAnswer Sample Program

TeleTools

The etAutoAnswer sample program shows how to use TeleTools to automatically answer an incoming call after the specified number of rings. 

This sample also gives you a little surprise if you are listening on the handset used to call into this program when it connects.

Click here for more information about etAutoAnswer.

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

Using This Sample Program

Select your TAPI telephony device from the dropdown combobox and check the active checkbox to activate it.  Enter the number of rings upon which you wish to have TeleTools automatically answer the call for you.  For example, with the default of 3 rings, the call will answer after the third ring.  See if you can hear what happens when you connect. You can watch all the events and properties display in the log which will tell you a lot about your device and how to write your own program to do the same thing.  The line config button will display the TSP configuration dialog box for your device and the TeleScope button will popup our TeleScope diagnostic tool.

Download this Sample Program

For Use TeleTools v3.7

File

Purpose

EXE - (484kb) Ready to run!
Visual Basic 5,6 - (20kb) Source code 
VB.NET - (24kb) source code
Borland Delphi 5,6,7 - (31kb) Source code 
Tell us what you need? Click here and tell us what you need!

 

How this Sample Program Works

In the Form_Load event handler, TeleToos finds your TAPI devices and places them in the combobox with the etLine1.DeviceList property.  When you check and uncheck the Active checkbox, we activate and deactivate your device with the etLine1.DeviceActive property.

The Call Progress log window displays our events, methods and properties as they are used and shows the progress of your call from offering to ringing, connected to disconnected.  In the etLine1_OnRing event handler, we use our count property to check the number of rings and when it reaches the number you select, we issue the etLine1.CallAnswer method to answer the call and return whether it was successful or not.  When we answer the call, the etLine1_OnConnected event handler does a little something with the etLine1.CallSendDigits method over the phone line to let you know it's connected.

When you are finished with the call or when the remote party hangs up, thereby firing the etLine1_OnDisconnected event, we execute the etLine.CallHangup method to terminate the call.  We then report the etLine1.CallEnd event and the etLine1.OnIdle event to let you know that the call is over and you can accept another call

Control

Description

Device select combobox

Lists and selects all available TAPI line devices

Device active checkbox Activates and deactivates the TAPI line device
Rings checkbox Answers the call after the number of rings specified here
Hangup button Hangs up the active call
Call Progress log textbox Displays log information about events, methods, properties and call status
Clear log button Clears the log window
Line config button Opens the TSP configuration screen for the active TAPI device
TeleScope button Displays the TeleScope logging, prototyping, learning, debugging tool
Info button Pops up help and contact information about this sample and ExceleTel
etLine The ExceleTel etLine TAPI line component

Event Handler Routine

Description

Form_Load

Populates the combobox with devices and activates the etLine component

CheckActive_Click Activates the selected device
ComboDevice_Click Processes a change in the selected device
CommandClear_Click Clears the call progress log window
etLine1_OnCallBegin Reports that the call has begun
etLine1_OnProceeding Reports that the call is proceeding
etLine1_OnOffering Reports that the call is created
etLine1_OnRing Reports each time an incoming ring is detected and connects the call after the specified number or rings in the ring textbox
etLine1_OnCallerID Reports the ID of the caller
etLine1_OnConnected Displays that the call is connected
etLine1_OnDigitsSent Fires when DTMF digits are finished sending
etLine1_OnconnectedID Reports the ID of the line the call is connected to
etLine1_OnDisconnected Displays a log line when the remote party disconnects the call and hands up the call
CommandHangup_Click Hangs up the call when this button is pressed
etLine1_OnCallEnd Displays a log line when the call has ended
etLine1_OnError Displays a log line when TeleTools etLine component detects an error
etLine1_OnIdle Displays a log line when the call is in the idle state
etLine1_OnSpecialInfo Displays a line in the log if the TAPI special info event fires
CommandTeleScope_Click Displays the TeleScope diagnostic tool
CommandConfigDlg_Click Displays the TAPI TSP configuration screen for the active device
Form_Resize Handles dynamic resizing and positioning of controls on the form
Command_Info Pops up the aboutbox
Form_Unload Deactivates the etLine component

 

Subroutines Description
WriteLog Function to handle writing log lines to the call progress textbox. (only for VB6 version)
 

Release Notes

April 30, 2003

Published