# cdiStartTones

Starts the transmission of a single or double-cadenced dual tone.

#### Prototype

DWORD cdiStartTones ( CTAHD ctahd, CDI_TONE_PARMS *parms)

Argument | Description
ctahd | Context handle.
parms | Pointer to a structure specifying the frequency, cadence, and iterations of the tone: typedef struct { DWORD size; DWORD freq1; DWORD freq2; INT32 ampl1; INT32 ampl2; DWORD ontime; DWORD offtime; DWORD ontime2; DWORD offtime2; INT32 iterations; } CDI_TONE_PARMS Refer to CDI_TONE_PARMS for a description of these fields.

#### Return values

Return value | Description
SUCCESS |
CTAERR_BAD_ARGUMENT | Argument is not in the valid range.
CTAERR_FUNCTION_ACTIVE | Function was already invoked.
CTAERR_INVALID_CTAHD | Handle is invalid.
CTAERR_INVALID_STATE | Port must be off-hook to invoke this function.

#### Events

Event | Description
CDIEVN_TONE_DONE | Tone transmission is complete.

#### Details

When a station is off-hook, you can transmit tones to the station. Each tone can consist of one or two frequency components, each at different amplitudes. You can also set up a pattern (cadence) of up to two iterations of the tone, each of different lengths.

To start the transmission of a tone, invoke cdiStartTones. In the invocation, pass a pointer to the CDI_TONE_PARMS structure. The following illustration shows how the parameters in CDI_TONE_PARMS determine the cadence:

Cadence parameters

When enhanced mode is enabled, the DSP automatically stops tones upon detection of on-hook or DTMF. Otherwise, invoke cdiStopTones to stop an ongoing tone.

Note: If the board enters the protection state (due to overheating), all stations receive an alarm tone indicating maintenance attention is needed. This tone overrides any other tones.

Refer to Transmitting tones for more information.