Global Tone Detection is a feature that allows a user to define the characteristics of a tone in order to detect a tone with the same characteristics. The characteristics of a tone are defined using GTD tone templates. The tone templates contain parameters that allow the user to assign frequency bounds and cadence components. Single and dual frequency tones are detected by comparing all incoming sounds to the GTD tone templates.
GTD operates on a channel-by-channel basis and is active when the channel is off-hook, unless the system uses a DTI/xxx, in which case, GTD is always active. GTD works simultaneously with DTMF and MF tone detection.
The driver responds to a detected tone by producing either a tone event on the event queue or a digit on the digit queue. The particular response depends upon the GTD tone configuration.
Use the Global Tone Detection functions to access tone templates and enable detection of single and dual frequency tones that fall outside those automatically provided with the Voice Driver. This includes tones outside the standard DTMF set of 0-9, a-d, *, and #, and the standard MF tones 0-9, *, and a-c.
5.2.1. Defining GTD TonesGTD tones can have an associated ASCII digit (and digit type) specified using the digit and digtype parameters in the dx_addtone( ) function. When the tone is detected, the digit is placed in the DV_DIGIT buffer and can be retrieved using the dx_getdig( ) function. When the tone is detected, either the tone event or the digit associated with the tone can be used as a termination condition to terminate I/O functions.
Termination conditions are set using the DV_TPT data structure. See the Voice Software Reference: Programmer's Guidefor information about the DV_TPT data structure.
5.2.2. Building Tone TemplatesWhen creating the tone template you can define the following:
Adding a tone template to a channel enables detection of a tone on that channel. Although only one tone template can be created at a time, multiple tone templates can be added to a channel. Each channel can have a different set of tone templates. Once created, tone templates can be selectively enabled or disabled.
The following functions are used to define tone templates:
dx_bldst( ) |
|
dx_blddt( ) |
|
dx_bldstcad( ) |
|
dx_blddtcad( ) |
|
dx_setgtdamp( ) |
|
Use dx_addtone( ) to enable detection of the tone template on a channel.
After building a tone template using a dx_bld...( ) function, dx_addtone( ) must be called to add this tone template to a channel. If the template is not added, the next call to a dx_bld...( ) function will overwrite the tone definition contained in the previous template.
dx_bldst( ) defines a simple single frequency tone. Subsequent calls to dx_addtone( ) will use this tone until another tone is defined. Thus, you can build a tone template and add it to several different channels.
dx_blddt( ) defines a simple dual frequency tone. Subsequent calls to dx_addtone( ) will use this tone until another tone is defined. Thus, you can build a tone template and add it to several different channels.
dx_bldstcad( ) defines a simple single frequency cadence tone. Subsequent calls to dx_addtone( ) will use this tone until another tone is defined. Thus, you can build a tone template and add it to several different channels. A single frequency cadence tone has single frequency signals with specific on/off characteristics.
dx_blddtcad( ) defines a simple dual frequency cadence tone. Subsequent calls to dx_addtone( ) will use this tone until another tone is defined. Thus, you can build a tone template and add it to several different channels. A dual frequency cadence tone has dual frequency signals with specific on/off characteristics.
The minimum on- and off-time for cadence detection is 40 ms on and 40 ms off.
dx_setgtdamp( ) sets the amplitudes used by GTD. The amplitudes set using dx_setgtdamp( ) will be the default amplitudes that will apply to all tones built using the dx_bld...( ) functions. The amplitudes will remain valid for all tones built until dx_setgtdamp( ) is called again and the amplitudes are changed.
The following table lists some standard Bell System Network Call Progress Tones. The frequencies are useful when creating the tone templates.
Tone |
Frequency(Hz) |
On Time (ms) |
Off Time (ms) |
Dial |
350 + 440 |
Continuous |
|
Busy |
480 + 620 |
500 |
500 |
Congestion (Toll) |
480 + 620 |
200 |
300 |
Reorder (Local) |
480 + 620 |
300 |
200 |
Ringback |
440 + 480 |
2000 |
4000 |
5.2.3. Working with Tone TemplatesUse the following functions to add/delete tone templates or to enable/disable tone detection:
dx_addtone( ) |
|
dx_deltones( ) |
|
dx_distone( ) |
|
dx_enbtone( ) |
|
dx_addtone( ) adds the tone template that was defined by the most recent GTD build-tone function call to the specified channel. Adding a tone template to a channel downloads it to the board and enables detection of tone-on and tone-off events for that tone template.
CAUTIONS
1. Each tone template must have a unique identification.
2. Errors will occur if you use dx_addtone( ) to change a tone template that has previously been added.
dx_deltones( ) removes all tone templates previously added to a channel with dx_addtone( ). If no tone templates were previously enabled for this channel, the function has no effect.
dx_distone( ) disables the detection of DX_TONEON and/or DX_TONEOFF events on a channel. Detection capability for user-defined tones is enabled on a channel by default when dx_addtone( ) is called.
dx_enbtone( ) enables the detection of DX_TONEON and/or DX_TONEOFF events on a channel. Detection capability for tones is enabled on a channel by default when dx_addtone( ) is called. The function can re-enable tones disabled by dx_distone( ).
DX_TONEON and DX_TONEOFF events are Call Status Transition (CST) events.
5.2.4. Tone Event RetrievalTo retrieve events, perform the following:
You can optionally specify an associated ASCII digit (and digit type) with the tone template. In this case, the tone template is treated like DTMF tones. When the digit is detected, it is placed in the digit buffer and can be used for termination. When an associated ASCII digit is specified, tone events will not be generated for that tone.
5.2.5. Maximum Number of Tone TemplatesGuidelines for maximum number of tone templates are listed below and in Table 2:
Table 2. Maximum Memory and Tone Templates (for Dual Tones)
|
Tone Templates |
Tone Templates |
D/21D |
33 |
16 |
D/4xD |
33 |
8 |
D/21E |
33 |
16 |
D/41E |
33 |
8 |
D/41ESC |
33 |
8 |
D/81A |
100 |
12 |
D/121A |
166 |
13 |
D/121B |
166 |
13 |
D/160SC-LS |
240 |
15 |
D/240SC |
300 |
15 |
D/240SC-T1 |
300 |
15 |
D/300SC-E1 |
450 |
15 |
D/320SC |
450 |
15 |
DTI/240SC |
300 |
15 |
DTI/241SC |
300 |
15 |
DTI/300SC |
450 |
15 |
DTI/301SC |
450 |
15 |
LSI/81SC |
240 |
15 |
LSI/161SC |
240 |
15 |
5.2.6. ApplicationsTwo sample applications for Global Tone Detection are described in this section. The first application describes how to use GTD to detect a fast-busy signal to determine when a disconnect occurs. The second application describes how to use GTD for leading edge detection of a tone using debounce time.
5.2.7. PerfectCall Disconnect Tone SupervisionPerfectCall provides disconnect tone supervision, which detects a disconnect tone that occurs after a party hangs up to end a connected call. This has been implemented in such a way that it can be used easily in an application that processes loop current drop events.
The disconnect tone is a PerfectCall tone definition (TID_DISCONNECT, tone ID 257) that contains the same default values as the TID_BUSY2 tone: Frequency 1: 500 Hz (deviation 200 Hz), Frequency 2: 525 Hz (deviation 175 Hz), On-time: 550 ms (deviation 400 ms), Off-time: 550 ms (deviation 400 ms), Repetition Count: 4.
The disconnect tone definition can be customized to the needs of your application the same as any PerfectCall tone. To enable disconnect supervision and use it with PerfectCall, use the following procedure:
Global Tone Disconnect SupervisionGlobal Tone Detection can be used for disconnect supervision. When a telephone call terminates, the central office may send a momentary drop in loop current to signal the disconnect. In configurations where the voice board is connected to a Private Branch Exchange (PBX), it is likely that there will be no drop in loop current for the voice board to detect. Instead, the PBX may initiate a fast-busy signal to indicate the disconnect. Global Tone Detection can be used to detect this fast-busy signal. Perform the following to detect the signal:
Leading Edge Detection Using Debounce TimeRather than detecting a signal immediately, an application may want to wait for a period of time (debounce time) before the DX_TONEON event is generated indicating the detection of the signal. The dx_bldstcad( ) and dx_blddtcad( ) functions can detect leading edge debounce on-time. A tone must be present at a given frequency and for a period of time (debounce time) before a DX_TONEON event is generated. The debounce time is specified using the ontime and ondev parameters in the dx_bldstcad( ) or dx_blddtcad( ) functions.
To use this application specify the following values for the dx_bldstcad( ) or dx_blddtcad( ) function parameters listed below:
Parameter |
Description |
ontime |
1/2 of the desired debounce time |
ondev |
-1/2 of the desired debounce time |
offtime |
0 |
offdev |
0 |
repcnt |
0 |
Click here to contact Dialogic Customer Engineering
Copyright 2001, Dialogic Corporation