(Page 3 of 8 in this chapter)


5.2 Generating DTMFs and Tones

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

Choose the appropriate function calls for your application from the following AG Access functions:

To...

Use ...

Play a sequence of user-defined tones

adiStartTones

Start playing a sequence of DTMF tones

adiStartDTMF

Terminate playing tones

adiStopTones

5.2.1 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:

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.

5.2.2 Terminating Tone Generation

adiStopTones immediately terminates active tone generation. Regardless of which tone type is active, AG Access 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, AG Access 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 or CTAERR_xxx code.

5.2.3 System Restrictions

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



(Page 3 of 8 in this chapter)


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