diff options
author | Jason Parker <jparker@digium.com> | 2008-02-20 21:36:46 +0000 |
---|---|---|
committer | Jason Parker <jparker@digium.com> | 2008-02-20 21:36:46 +0000 |
commit | ea8c695a1c3f2f66fb2fb06acf0c0399d51be5d7 (patch) | |
tree | 7b5c923f8c543fb5c75fa10733088bf2dcf4e1c2 /include | |
parent | d2d397f86114c65eef7da334c4e3c93ba1985bd8 (diff) |
Largely refactor DSP tone detection routines.
Separate fax detection from digit detected.
Added CED (called) tone detection for fax (previously, only CNG (calling) was supported).
Separate DTMF/MF code paths where appropriate.
Allow detection of arbitary tones.
(closes issue #11796)
Reported by: dimas
Patches:
v6-dsp-faxtones.patch uploaded by dimas (license 88)
Tested by: dimas, IgorG, Cache
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103903 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include')
-rw-r--r-- | include/asterisk/dsp.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/asterisk/dsp.h b/include/asterisk/dsp.h index 2664b9b3e..10ed53d1b 100644 --- a/include/asterisk/dsp.h +++ b/include/asterisk/dsp.h @@ -42,6 +42,10 @@ #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_FAXMODE_DETECT_CNG (1 << 0) +#define DSP_FAXMODE_DETECT_CED (1 << 1) +#define DSP_FAXMODE_DETECT_ALL (DSP_FAXMODE_DETECT_CNG | DSP_FAXMODE_DETECT_CED) + #define DSP_TONE_STATE_SILENCE 0 #define DSP_TONE_STATE_RINGING 1 #define DSP_TONE_STATE_DIALTONE 2 @@ -102,6 +106,9 @@ int ast_dsp_getdigits(struct ast_dsp *dsp, char *buf, int max); /*! \brief Set digit mode */ int ast_dsp_digitmode(struct ast_dsp *dsp, int digitmode); +/*! \brief Set fax mode */ +int ast_dsp_set_faxmode(struct ast_dsp *dsp, int faxmode); + /*! \brief Get tstate (Tone State) */ int ast_dsp_get_tstate(struct ast_dsp *dsp); |