(Page 1 of 1 in this chapter) Version


Chapter 6

Tone Generation


6.1 Introduction
6.2 Generating DTMFs and Tones
6.3 Tone Generation Parameters
6.4 Terminating Tone Generation
6.5 System Restrictions

6.1 Introduction

AG and QX boards are capable of generating single and dual frequency tones. The ADI service provides functions for playing one or more user-defined tones and for generating DTMF tones.

6.2 Generating DTMFs and Tones

The ADI service provides the following functions for generating DTMFs and tones:
If you want to...

Then use...

Play a sequence of user-defined tones

adiStartTones

Play a sequence of DTMF tones

adiStartDTMF

Terminate playing tones

adiStopTones

6.3 Tone Generation Parameters

adiStartTones allows the application to play a list of single or dual frequency tones. Each individual tone has the following attributes, which are stored in the ADI_TONE_PARMS structure:
Parameter

Description

ontime

A configurable "active" time period.

offtime

A configurable "inactive" time period following the active time period.

iterations

Number of times to repeat the tone.


The combined duration of ontime and offtime represents one complete cycle.

adiStartDTMF is a DTMF tone generator with programmable interdigit delays. The function accepts a string of digits and an ADI_DTMF_PARMS structure. The parameter structure allows you to specify interdigit pause duration for the comma and period characters, which can be interspersed with the DTMFs in the digit string.

6.4 Terminating Tone Generation

adiStopTones immediately terminates active tone generation. Regardless of which tone type is active, the ADI service generates an ADIEVN_TONES_DONE event with the value set to CTA_REASON_STOPPED.

The number of iterations is specified in ADI_TONE_PARMS, which is passed to adiStartTones. If the specified number of iterations is completed, the ADI service generates an ADIEVN_TONES_DONE event with the value set to CTA_REASON_FINISHED.

If an error occurs in starting the function, the DONE event may be sent with the value set to an ADIERR_xxx code or a CTAERR_xxx code.

6.5 System Restrictions

Because only one function can drive the output of the telephone line, the following functions are mutually exclusive:



(Page 1 of 1 in this chapter) Version


tech_support@nmss.com
Copyright © 1999, Natural MicroSystems, Inc. All rights reserved.