aboutsummaryrefslogtreecommitdiffstats
path: root/include/asterisk/dsp.h
diff options
context:
space:
mode:
authorqwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b>2008-02-20 21:36:46 +0000
committerqwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b>2008-02-20 21:36:46 +0000
commit4d5a77ea87e19e0291d0662a42f03e1ccbe93369 (patch)
tree7b5c923f8c543fb5c75fa10733088bf2dcf4e1c2 /include/asterisk/dsp.h
parent5f1abd1393ef7dbd86ff36c78a9baa2695224d96 (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: http://svn.digium.com/svn/asterisk/trunk@103903 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include/asterisk/dsp.h')
-rw-r--r--include/asterisk/dsp.h7
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);