etGatherDigits Sample Program

TeleTools

This sample program demonstrates how to use the etLine.Call.GatherDigits feature with telephony devices that support Gathering Digits. For example Dialogic, Hi-Phone, PhoneRider, etc.

Gathering digits allows you to easily collect multiple digits (DTMF). This is very useful for collecting a set of numbers at once, such as an account or PIN number. This differs from Monitoring for digits, which only returns one digit at a time.

See the etGatherDigitsWorkAround Sample program for devices that do not support gathering digits

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

Any TAPI telephony device that supports gathering digits including Dialogic, Hi-Phone, and PhoneRider. An active phone line or extension.

Gathering Digits can be accomplished using any of the following Editions of TeleTools v3.7

  • TeleTools Standard

  • TeleTools Professional

  • TeleTools Enterprise

Using This Sample Program

When a device is selected the program checks to see if the device supports gathering digits.  If it does not then a dialog box is displayed and the Active check box is disabled.  If the device does support this feature then the device is activated.  Be sure you use a phone line or extension that will allow you to answer an inbound call using this sample!

Download this Sample Program

For Use TeleTools v3.7

File

Purpose

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

Since this program is designed for testing the etLine1.TAPIREPLYTIMEOUT property is set to 15 seconds.  The default value for this property is 60 seconds.

The etLine.OnOffering event is the first event to fire when an inbound call is detected.  This program answers the call when this event fires.

When the call is connected the etLine.OnConnected event fires and the SetGatherDigits subroutine is called.

SetGatherDigits starts and stops the gathering of digits depending on the value of the Active check box.  The etLine.Call.GatherDigits properties are set according to the values found in the edit boxes.

When digit gathering is terminated etLine1_OnDigitsGathered event handler is executed. The gathered digits are provided in the Digits parameter and displayed in the TextDigits box.  The reason for termination provided in the Termination parameter and is displayed in the TextStatusetLine.  The "LINEGATHERTERM" values found in the etTTConst constant file are used to identify the value.

Note to Dialogic users:  If the remote party disconnects while gathering digits is active then a short delay must occur before executing the etLine.Call.hangup method.  If the delay is too short then the call will not be disconnected and a TAPIREPLYTIMEOUT error will occur.  The program will then exit.  Use the TextDelay to increase or decrease the number of milliseconds to delay for your system.  Our testing indicates that as few a one millisecond solves this problem however we suggest using 10 milliseconds.  That is equivalent to 1/100 of a second.

Control

Description

etLine

 

TextStatusetLine

 

TextDigits

 

CheckActive

 

TextTimeOut

 

TextTerminate

 

TextCount

 

TextDelay

 

 

Event Handler Routine

Description

CheckActive_Click

 

ComboDevice_Click

 

etLine1_OnCallEnd

 

etLine1_OnConnected

 

etLine1_OnDigitsGathered

 

etLine1_OnDisconnected

 

etLine1_OnError

 

etLine1_OnOffering

 

Form_Load

 

 

Subroutine

Description

SetGatherDigits

 

 

Release Notes

April 23, 2003

Published