00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef _ASTERISK_DSP_H
00015 #define _ASTERISK_DSP_H
00016
00017 #define DSP_FEATURE_SILENCE_SUPPRESS (1 << 0)
00018 #define DSP_FEATURE_BUSY_DETECT (1 << 1)
00019 #define DSP_FEATURE_CALL_PROGRESS (1 << 2)
00020 #define DSP_FEATURE_DTMF_DETECT (1 << 3)
00021
00022 #define DSP_DIGITMODE_DTMF 0
00023 #define DSP_DIGITMODE_MF 1
00024
00025 #define DSP_DIGITMODE_NOQUELCH (1 << 8)
00026 #define DSP_DIGITMODE_MUTECONF (1 << 9)
00027 #define DSP_DIGITMODE_MUTEMAX (1 << 10)
00028 #define DSP_DIGITMODE_RELAXDTMF (1 << 11)
00029
00030 struct ast_dsp;
00031
00032 struct ast_dsp *ast_dsp_new(void);
00033 void ast_dsp_free(struct ast_dsp *dsp);
00034
00035 void ast_dsp_set_threshold(struct ast_dsp *dsp, int threshold);
00036
00037
00038 void ast_dsp_set_busy_count(struct ast_dsp *dsp, int cadences);
00039
00040
00041 int ast_dsp_call_progress(struct ast_dsp *dsp, struct ast_frame *inf);
00042
00043
00044
00045 struct ast_frame *ast_dsp_process(struct ast_channel *chan, struct ast_dsp *dsp, struct ast_frame *inf, int needlock);
00046
00047
00048
00049 int ast_dsp_silence(struct ast_dsp *dsp, struct ast_frame *f, int *totalsilence);
00050
00051
00052
00053 int ast_dsp_busydetect(struct ast_dsp *dsp);
00054
00055
00056 int ast_dsp_digitdetect(struct ast_dsp *dsp, struct ast_frame *f);
00057
00058
00059 void ast_dsp_reset(struct ast_dsp *dsp);
00060
00061
00062 void ast_dsp_digitreset(struct ast_dsp *dsp);
00063
00064
00065 void ast_dsp_set_features(struct ast_dsp *dsp, int features);
00066
00067
00068 int ast_dsp_getdigits(struct ast_dsp *dsp, char *buf, int max);
00069
00070
00071 int ast_dsp_digitmode(struct ast_dsp *dsp, int digitmode);
00072
00073 #endif