5.1 Introduction

(Page 2 of 5 in this chapter)
AG Access provides both synchronous and asynchronous digit collection functions. This section describes DTMF digit collection and the associated functions which are listed below:

Function

Description

adiGetDigit

Retrieves (removes) a digit from the AG Access internal digit queue.

adiPeekDigit

Reads (non-destructive) the first digit in the AG Access internal digit queue.

adiCollectDigits

Starts collecting digits from the digit queue.

adiFlushDigitQueue

Discards all digits in the AG Access internal digit queue.

adiStopCollection

Stops the adiCollectDigits function.

The port must be in the call control connected state in order to activate the digit collection functions. To capture DTMF digits, the application must leave the DTMF detector enabled. Because it is unusual to disable the detector, this discussion assumes it is always enabled.

In general, digit collection operates in the following manner. When a caller depresses a digit on the handset, the AG board sends an ADIEVN_DIGIT_BEGIN event. At this point, the digit becomes available. When the caller releases the key, the AG board sends an ADIEVN_DIGIT_END event. Each event's value field contains an ASCII value indicating which key was pressed/released. The valid values are '0' through '9', '*', '#', and 'A' through 'D'.


(Page 2 of 5 in this chapter)

Copyright 1996 Natural MicroSystems, Inc. All Rights Reserved.