mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-04 11:58:52 +00:00
res_tonedetect: Tone detection module
dsp.c contains arbitrary tone detection functionality which is currently only used for fax tone recognition. This change makes this functionality publicly accessible so that other modules can take advantage of this. Additionally, a WaitForTone and TONE_DETECT app and function are included to allow users to do their own tone detection operations in the dialplan. ASTERISK-29546 Change-Id: Ie38c395000f4fd4d04e942e8658e177f8f499b26
This commit is contained in:
committed by
George Joseph
parent
2806a45034
commit
a6eb1b6f95
@@ -42,6 +42,7 @@
|
||||
#define DSP_PROGRESS_CONGESTION (1 << 19) /*!< Enable congestion tone detection */
|
||||
#define DSP_FEATURE_CALL_PROGRESS (DSP_PROGRESS_TALK | DSP_PROGRESS_RINGING | DSP_PROGRESS_BUSY | DSP_PROGRESS_CONGESTION)
|
||||
#define DSP_FEATURE_WAITDIALTONE (1 << 20) /*!< Enable dial tone detection */
|
||||
#define DSP_FEATURE_FREQ_DETECT (1 << 21) /*!< Enable arbitrary tone detection */
|
||||
|
||||
#define DSP_FAXMODE_DETECT_CNG (1 << 0)
|
||||
#define DSP_FAXMODE_DETECT_CED (1 << 1)
|
||||
@@ -171,6 +172,9 @@ int ast_dsp_getdigits(struct ast_dsp *dsp, char *buf, int max);
|
||||
*/
|
||||
int ast_dsp_set_digitmode(struct ast_dsp *dsp, int digitmode);
|
||||
|
||||
/*! \brief Set arbitrary frequency detection mode */
|
||||
int ast_dsp_set_freqmode(struct ast_dsp *dsp, int freq, int dur, int db, int squelch);
|
||||
|
||||
/*! \brief Set fax mode */
|
||||
int ast_dsp_set_faxmode(struct ast_dsp *dsp, int faxmode);
|
||||
|
||||
|
Reference in New Issue
Block a user