From 4d5a77ea87e19e0291d0662a42f03e1ccbe93369 Mon Sep 17 00:00:00 2001 From: qwell Date: Wed, 20 Feb 2008 21:36:46 +0000 Subject: 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: http://svn.digium.com/svn/asterisk/trunk@103903 f38db490-d61c-443f-a65b-d21fe96a405b --- include/asterisk/dsp.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/asterisk/dsp.h') 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); -- cgit v1.2.3