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 #define DSP_FEATURE_FAX_DETECT (1 << 4)
00022
00023 #define DSP_DIGITMODE_DTMF 0
00024 #define DSP_DIGITMODE_MF 1
00025
00026 #define DSP_DIGITMODE_NOQUELCH (1 << 8)
00027 #define DSP_DIGITMODE_MUTECONF (1 << 9)
00028 #define DSP_DIGITMODE_MUTEMAX (1 << 10)
00029 #define DSP_DIGITMODE_RELAXDTMF (1 << 11)
00030
00031
struct ast_dsp;
00032
00033
struct ast_dsp *
ast_dsp_new(
void);
00034
void ast_dsp_free(
struct ast_dsp *dsp);
00035
00036
void ast_dsp_set_threshold(
struct ast_dsp *dsp,
int threshold);
00037
00038
00039
void ast_dsp_set_busy_count(
struct ast_dsp *dsp,
int cadences);
00040
00041
00042
int ast_dsp_call_progress(
struct ast_dsp *dsp,
struct ast_frame *inf);
00043
00044
00045
int ast_dsp_set_call_progress_zone(
struct ast_dsp *dsp,
char *zone);
00046
00047
00048
00049
struct ast_frame *
ast_dsp_process(
struct ast_channel *chan,
struct ast_dsp *dsp,
struct ast_frame *inf);
00050
00051
00052
00053
int ast_dsp_silence(
struct ast_dsp *dsp,
struct ast_frame *f,
int *totalsilence);
00054
00055
00056
00057
int ast_dsp_busydetect(
struct ast_dsp *dsp);
00058
00059
00060
int ast_dsp_digitdetect(
struct ast_dsp *dsp,
struct ast_frame *f);
00061
00062
00063
void ast_dsp_reset(
struct ast_dsp *dsp);
00064
00065
00066
void ast_dsp_digitreset(
struct ast_dsp *dsp);
00067
00068
00069
void ast_dsp_set_features(
struct ast_dsp *dsp,
int features);
00070
00071
00072
int ast_dsp_getdigits(
struct ast_dsp *dsp,
char *buf,
int max);
00073
00074
00075
int ast_dsp_digitmode(
struct ast_dsp *dsp,
int digitmode);
00076
00077
#endif