Previous PageTable Of Contents../index.htmlIndexNext Page

cc_ToneRedefine( )

Description | Termination Events | Cautions | Example | Errors | See Also

Name:

int cc_ToneRedefine(devHdl, sigType, pToneParm, mode)

Inputs:

LINEDEV devHdl

  line device handle

 

unsigned char sigType

  Tone Signal Type

 

toneParm *pToneParm

  pointer to Tone Parameter structure

 

int mode

  asynchronous/synchronous

Returns:

0 on success
< 0 on failure

Includes:

cclib.h

Category:

Global Tone Generation

Mode:

asynchronous/synchronous

Technology:

BRI/SC

Top Of PageDescription

The cc_ToneRedefine( ) function redefines a call progress tone's attributes in the tone template table. The tone template table resides in the firmware and is used during call establishment. The template contains common call progress tone types and is preset to default values at initialization (see Table 29. Tone Template Table). The current template has a total of eight entries, of which only four are defined. The other four are reserved for future use.

The cc_ToneRedefine( ) function allows the existing tone template to be redefined, but not the functional meanings of the call progress tones.

Parameter

Description

devHdl:

Specifies the valid channel device handle obtained when the channel was opened using cc_Open( ). Each channel has an internal tone template.

sigType:

Indicates the type of call progress tone, such as dial tone, busy tone, ringback, etc. Note that each sigType has its own meaning and cannot be changed, for example, sigType 0x01 always means a dial tone.

pToneParm:

Pointer to the tone parameter structure. For a description of the toneParm data structure, see Section 6.14. ToneParm.

mode:

Specifies whether to run this function asynchronously or synchronously. Set to either EV_ASYNC or EV_SYNC.

The following table shows the tone template table that resides in the firmware.


Table 29. Tone Template Table

Sig Type

Mean-ing

Default values (in ms)

 

dura-tion

freq1

amp1

freq2

amp2

toneOn1

toneOff1

no use

no use

0x01

Dial tone

-1

350

-14

440

-14

-1

0

n/a

n/a

0x02

Busy tone

-1

480

-14

620

-14

500

500

n/a

n/a

0x03

Re-order

-1

480

-14

620

-14

300

200

n/a

n/a

0x04

Ring-back

-1

440

-14

480

-14

2000

4000

n/a

n/a

0x05

future use

                 

0x06

future use

                 

0x07

future use

                 

0x08

future use

                 

The default call progress tones are Dial Tone and Ringback Tone; however the Busy Tone or Reorder Tone will be played instead if the application provides the CCITT compatible SIGNAL IE by sending either the SETUP_ACK or ALERTING message (see the cc_SetInfoElem( ) function description for information on setting the SIGNAL IE). The SIGNAL IE must be programmed according to the ITU specifications. The firmware will correlate the specified signal, in the SIGNAL IE, with the appropriate sigType from the template table.

Top Of PageTermination Events

Use the SRL Event Management functions to handle the termination event.

Top Of PageCautions

This function is not supported for the BRI/2 board or for PRI protocols.

Top Of PageExample

The following example illustrates how to override the default tone that is played with an outgoing message. The example shows how the application uses the ALERTING message to direct the firmware to play the Busy tone instead of the default Ringback tone.

Top Of PageErrors

If the function returns < 0 to indicate failure, use the cc_CauseValue( ) function to retrieve the reason code for the failure. The cc_ResultMsg( ) function can be used to interpret the reason code. Error codes are defined in the files ccerr.h, isdnerr.h, and isdncmd.h.

Error codes from the cc_ToneRedefine( ) function include the following:

Error Code

Description

ERR_TONEINVALIDMSG

Invalid message type

ERR_TONESIGNALTYPE

Invalid signal type

ERR_TONEFREQ1

Invalid value specified in parameter freq 1

ERR_TONEFREQ2

Invalid value specified in parameter freq 2

ERR_TONEAMP1

Invalid value specified in parameter amp1

ERR_TONEAMP2

Invalid value specified in parameter amp2

ERR_TONEON1

Invalid value specified in parameter toneOn1

ERR_TONEOFF1

Invalid value specified in parameter toneOff1

ERR_DURATION

Invalid value specified in parameter duration

Top Of PageSee Also


Previous PageTable Of ContentsTop Of PageIndexNext Page

Click here to contact Dialogic Customer Engineering

Copyright 2001, Dialogic Corporation
All rights reserved
This page generated December, 2001