Previous PageTable Of Contents../index.htmlIndexNext Page

dx_enbtone( )

Description | Example | Cautions | Errors | See Also

Name:

int dx_enbtone(chdev,toneid,evt_mask)

Inputs:

int chdev

  valid Dialogic channel device handle

 

int toneid

  tone template identification

 

int evt_mask

  event mask

Returns:

0:

  Success

 

-1

  Error return code

Category:

Global Tone Detection

Top Of PageDescription

The dx_enbtone( ) function enables detection of of a user-defined tone on a channel, including the TONE ON and/or TONE OFF for that tone. Detection capability for tones is enabled on a channel by default when dx_addtone( ) is called.

The description of dx_addtone( ) explains how to synchronously and asynchronously retrieve CST tone on and tone off events.

Use this function to enable a tone that has been disabled using dx_distone( ).

Parameter

Description

chdev:

specifies the valid channel device handle obtained when the channel was opened using dx_open( ).

toneid:

specifies the user-defined tone identifier for which detection is being enabled.

 

To enable detection of all user-defined tones on the channel, set toneid to TONEALL.

evt_mask:    

specifies whether to enable detection of the user-defined tone going on or going off. Set to one or both of the following using a bitwise -OR (|) operator.

  • DM_TONEON
disable TONE ON detection
  • DM_TONEOFF
disable TONE OFF detection

 

evt_mask affects the enabled/disabled status of the tone template and will remain in effect until dx_enbtone( ) or dx_distone( ) is called again to reset it.

Top Of PageExample

Top Of PageCautions

When using this function in a multi-threaded application, use critical sections or a semaphore around the function call to ensure a thread-safe application. Failure to do so will result in "Bad Tone Template ID" errors.

Top Of PageErrors

If the function returns -1 to indicate failure, call ATDX_LASTERR( ) and ATDV_ERRMSGP( ) to return one of the following errors:

EDX_BADPARM

  • Invalid Parameter

EDX_BADPROD

  • Function not supported on this board

EDX_SYSTEM

EDX_TONEID

  • Bad tone ID

EDX_TNMSGSTATUS

  • Invalid message status setting

Top Of PageSee Also

Global Tone Detection:

Event Retrieval:


Previous PageTable Of ContentsTop Of PageIndexNext Page

Click here to contact Dialogic Customer Engineering

Copyright 2002, Dialogic Corporation
All rights reserved
This page generated February, 2002