Asterisk - The Open Source Telephony Project
18.5.0
|
Convenience Signal Processing routines. More...
#include "asterisk.h"
#include <math.h>
#include "asterisk/module.h"
#include "asterisk/frame.h"
#include "asterisk/format_cache.h"
#include "asterisk/channel.h"
#include "asterisk/dsp.h"
#include "asterisk/ulaw.h"
#include "asterisk/alaw.h"
#include "asterisk/utils.h"
#include "asterisk/options.h"
#include "asterisk/config.h"
#include "asterisk/test.h"
Go to the source code of this file.
Data Structures | |
struct | ast_dsp |
struct | digit_detect_state_t |
struct | dtmf_detect_state_t |
struct | fragment_t |
struct | goertzel_result_t |
struct | goertzel_state_t |
struct | mf_detect_state_t |
struct | progalias |
struct | progress |
struct | tone_detect_state_t |
Macros | |
#define | BELL_MF_RELATIVE_PEAK 12.6 /* 11dB */ |
#define | BELL_MF_THRESHOLD 1.6e9 |
#define | BELL_MF_TWIST 4.0 /* 6dB */ |
#define | CONFIG_FILE_NAME "dsp.conf" |
#define | DEF_DTMF_HITS_TO_BEGIN 2 |
#define | DEF_DTMF_MISSES_TO_END 3 |
#define | DEF_DTMF_NORMAL_TWIST 6.31 /* 8.0dB */ |
#define | DEF_DTMF_REVERSE_TWIST 2.51 /* 4.01dB */ |
#define | DEF_RELAX_DTMF_NORMAL_TWIST 6.31 /* 8.0dB */ |
#define | DEF_RELAX_DTMF_REVERSE_TWIST 3.98 /* 6.0dB */ |
#define | DEFAULT_SAMPLE_RATE 8000 |
#define | DEFAULT_THRESHOLD 512 |
Default minimum average magnitude threshold to determine talking/noise by the DSP. More... | |
#define | DSP_HISTORY 15 |
#define | DTMF_GSIZE 102 |
#define | DTMF_RELATIVE_PEAK_COL 6.3 /* 8dB */ |
#define | DTMF_RELATIVE_PEAK_ROW 6.3 /* 8dB */ |
#define | DTMF_THRESHOLD 8.0e7 |
#define | DTMF_TO_TOTAL_ENERGY 42.0 |
#define | FAX_TONE_CED_DB 16 |
#define | FAX_TONE_CED_DURATION 2600 /* ms */ |
#define | FAX_TONE_CED_FREQ 2100 |
#define | FAX_TONE_CNG_DB 16 |
#define | FAX_TONE_CNG_DURATION 500 /* ms */ |
#define | FAX_TONE_CNG_FREQ 1100 |
#define | FREQ_ARRAY_SIZE 7 |
#define | MAX_DTMF_DIGITS 128 |
#define | MF_GSIZE 120 |
#define | TONE_AMPLITUDE_MAX 0x7fff /* Max signed linear amplitude */ |
#define | TONE_AMPLITUDE_MIN 80 /* Min signed linear amplitude detectable */ |
#define | TONE_MIN_THRESH 1e8 |
#define | TONE_THRESH 10.0 |
#define | TONE_THRESHOLD 7.8e7 |
Enumerations | |
enum | busy_detect { BUSY_PERCENT = 10, BUSY_PAT_PERCENT = 7, BUSY_THRESHOLD = 100, BUSY_MIN = 75, BUSY_MAX = 3100 } |
enum | freq_index { HZ_350 = 0, HZ_440, HZ_480, HZ_620, HZ_950, HZ_1400, HZ_1800, HZ_425 = 0, HZ_350UK = 0, HZ_400UK, HZ_440UK } |
enum | gsamp_size { GSAMP_SIZE_NA = 183, GSAMP_SIZE_CR = 188, GSAMP_SIZE_UK = 160 } |
enum | gsamp_thresh { THRESH_RING = 8, THRESH_TALK = 2, THRESH_BUSY = 4, THRESH_CONGESTION = 4, THRESH_HANGUP = 60, THRESH_RING2ANSWER = 300 } |
enum | prog_mode { PROG_MODE_NA = 0, PROG_MODE_CR, PROG_MODE_UK } |
Functions | |
static int | __ast_dsp_call_progress (struct ast_dsp *dsp, short *s, int len) |
static struct ast_dsp * | __ast_dsp_new (unsigned int sample_rate) |
static int | __ast_dsp_silence_noise (struct ast_dsp *dsp, short *s, int len, int *totalsilence, int *totalnoise, int *frames_energy) |
static void | __reg_module (void) |
static void | __unreg_module (void) |
static int | _dsp_init (int reload) |
static void | ast_digit_detect_init (digit_detect_state_t *s, int mf, unsigned int sample_rate) |
int | ast_dsp_busydetect (struct ast_dsp *dsp) |
Return non-zero if historically this should be a busy, request that ast_dsp_silence has already been called. More... | |
int | ast_dsp_call_progress (struct ast_dsp *dsp, struct ast_frame *inf) |
Scans for progress indication in audio. More... | |
void | ast_dsp_digitreset (struct ast_dsp *dsp) |
Reset DTMF detector. More... | |
void | ast_dsp_free (struct ast_dsp *dsp) |
int | ast_dsp_get_features (struct ast_dsp *dsp) |
Get features. More... | |
unsigned int | ast_dsp_get_sample_rate (const struct ast_dsp *dsp) |
Retrieve the sample rate this DSP structure was created with. More... | |
int | ast_dsp_get_tcount (struct ast_dsp *dsp) |
Get tcount (Threshold counter) More... | |
int | ast_dsp_get_threshold_from_settings (enum threshold which) |
Get silence threshold from dsp.conf. More... | |
int | ast_dsp_get_tstate (struct ast_dsp *dsp) |
Get tstate (Tone State) More... | |
struct ast_dsp * | ast_dsp_new (void) |
Allocates a new dsp, assumes 8khz for internal sample rate. More... | |
struct ast_dsp * | ast_dsp_new_with_rate (unsigned int sample_rate) |
Allocates a new dsp with a specific internal sample rate used during processing. More... | |
int | ast_dsp_noise (struct ast_dsp *dsp, struct ast_frame *f, int *totalnoise) |
Process the audio frame for noise. More... | |
struct ast_frame * | ast_dsp_process (struct ast_channel *chan, struct ast_dsp *dsp, struct ast_frame *af) |
Return AST_FRAME_NULL frames when there is silence, AST_FRAME_BUSY on busies, and call progress, all dependent upon which features are enabled. More... | |
static void | ast_dsp_prog_reset (struct ast_dsp *dsp) |
void | ast_dsp_reset (struct ast_dsp *dsp) |
Reset total silence count. More... | |
void | ast_dsp_set_busy_count (struct ast_dsp *dsp, int cadences) |
Set number of required cadences for busy. More... | |
void | ast_dsp_set_busy_pattern (struct ast_dsp *dsp, const struct ast_dsp_busy_pattern *cadence) |
Set expected lengths of the busy tone. More... | |
int | ast_dsp_set_call_progress_zone (struct ast_dsp *dsp, char *zone) |
Set zone for doing progress detection. More... | |
int | ast_dsp_set_digitmode (struct ast_dsp *dsp, int digitmode) |
Set digit mode. More... | |
int | ast_dsp_set_faxmode (struct ast_dsp *dsp, int faxmode) |
Set fax mode. More... | |
void | ast_dsp_set_features (struct ast_dsp *dsp, int features) |
Select feature set. More... | |
int | ast_dsp_set_freqmode (struct ast_dsp *dsp, int freq, int dur, int db, int squelch) |
Set arbitrary frequency detection mode. More... | |
void | ast_dsp_set_threshold (struct ast_dsp *dsp, int threshold) |
Set the minimum average magnitude threshold to determine talking by the DSP. More... | |
int | ast_dsp_silence (struct ast_dsp *dsp, struct ast_frame *f, int *totalsilence) |
Process the audio frame for silence. More... | |
static int | ast_dsp_silence_noise_with_energy (struct ast_dsp *dsp, struct ast_frame *f, int *total, int *frames_energy, int noise) |
int | ast_dsp_silence_with_energy (struct ast_dsp *dsp, struct ast_frame *f, int *totalsilence, int *frames_energy) |
Process the audio frame for silence. More... | |
int | ast_dsp_was_muted (struct ast_dsp *dsp) |
Returns true if DSP code was muting any fragment of the last processed frame. Muting (squelching) happens when DSP code removes DTMF/MF/generic tones from the audio. More... | |
static void | ast_dtmf_detect_init (dtmf_detect_state_t *s, unsigned int sample_rate) |
static void | ast_fax_detect_init (struct ast_dsp *s) |
static void | ast_freq_detect_init (struct ast_dsp *s, int freq, int dur, int db, int squelch) |
static void | ast_mf_detect_init (mf_detect_state_t *s, unsigned int sample_rate) |
struct ast_module * | AST_MODULE_SELF_SYM (void) |
AST_TEST_DEFINE (test_dsp_fax_detect) | |
AST_TEST_DEFINE (test_dsp_dtmf_detect) | |
static void | ast_tone_detect_init (tone_detect_state_t *s, int freq, int duration, int amp, unsigned int sample_rate) |
static int | dtmf_detect (struct ast_dsp *dsp, digit_detect_state_t *s, int16_t amp[], int samples, int squelch, int relax) |
static void | goertzel_init (goertzel_state_t *s, float freq, unsigned int sample_rate) |
static void | goertzel_reset (goertzel_state_t *s) |
static float | goertzel_result (goertzel_state_t *s) |
static void | goertzel_sample (goertzel_state_t *s, short sample) |
static int | load_module (void) |
static int | mf_detect (struct ast_dsp *dsp, digit_detect_state_t *s, int16_t amp[], int samples, int squelch, int relax) |
static void | mute_fragment (struct ast_dsp *dsp, fragment_t *fragment) |
static int | pair_there (float p1, float p2, float i1, float i2, float e) |
static int | reload_module (void) |
static void | store_digit (digit_detect_state_t *s, char digit) |
static int | test_dtmf_amplitude_sweep (struct ast_test *test, struct ast_dsp *dsp, int digit_index) |
static int | test_dtmf_twist_sweep (struct ast_test *test, struct ast_dsp *dsp, int digit_index) |
static void | test_dual_sample_gen (short *slin_buf, int samples, int rate, int f1, short a1, int f2, short a2) |
static int | test_tone_amplitude_sweep (struct ast_test *test, struct ast_dsp *dsp, tone_detect_state_t *tone_state) |
static int | test_tone_freq_sweep (struct ast_test *test, struct ast_dsp *dsp, tone_detect_state_t *tone_state, short amplitude) |
static void | test_tone_sample_gen (short *slin_buf, int samples, int rate, int freq, short amplitude) |
static void | test_tone_sample_gen_add (short *slin_buf, int samples, int rate, int freq, short amplitude) |
static int | tone_detect (struct ast_dsp *dsp, tone_detect_state_t *s, int16_t *amp, int samples) |
static int | unload_module (void) |
Variables | |
static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_GLOBAL_SYMBOLS | AST_MODFLAG_LOAD_ORDER , .description = "DSP" , .key = "This paragraph is copyright (c) 2006 by Digium, Inc. \In order for your module to load, it must return this \key via a function called \"key\". Any code which \includes this paragraph must be licensed under the GNU \General Public License version 2 or later (at your \option). In addition to Digium's general reservations \of rights, Digium expressly reserves the right to \allow other parties to license this paragraph under \different terms. Any use of Digium, Inc. trademarks or \logos (including \"Asterisk\" or \"Digium\") without \express written permission of Digium, Inc. is prohibited.\n" , .buildopt_sum = "30ef0c93b36035ec78c9cfd712d36d9b" , .support_level = AST_MODULE_SUPPORT_CORE, .load = load_module, .unload = unload_module, .reload = reload_module, .load_pri = AST_MODPRI_CORE, .requires = "extconfig", } |
static struct progalias | aliases [] |
static const struct ast_module_info * | ast_module_info = &__mod_info |
static const char | bell_mf_positions [] = "1247C-358A--69*---0B----#" |
static const int | DEFAULT_SILENCE_THRESHOLD = 256 |
The default silence threshold we will use if an alternate configured value is not present or is invalid. More... | |
static const float | dtmf_col [] |
static int | dtmf_hits_to_begin |
static int | dtmf_misses_to_end |
static float | dtmf_normal_twist |
static const char | dtmf_positions [] = "123A" "456B" "789C" "*0#D" |
static float | dtmf_reverse_twist |
static const float | dtmf_row [] |
static const float | mf_tones [] |
static struct progress | modes [] |
static float | relax_dtmf_normal_twist |
static float | relax_dtmf_reverse_twist |
static int | thresholds [THRESHOLD_MAX] |
Convenience Signal Processing routines.
Definition in file dsp.c.
#define BELL_MF_RELATIVE_PEAK 12.6 /* 11dB */ |
Definition at line 200 of file dsp.c.
Referenced by mf_detect().
#define BELL_MF_THRESHOLD 1.6e9 |
Definition at line 198 of file dsp.c.
Referenced by mf_detect().
#define BELL_MF_TWIST 4.0 /* 6dB */ |
Definition at line 199 of file dsp.c.
Referenced by mf_detect().
#define CONFIG_FILE_NAME "dsp.conf" |
Definition at line 245 of file dsp.c.
Referenced by _dsp_init().
#define DEF_DTMF_HITS_TO_BEGIN 2 |
Definition at line 232 of file dsp.c.
Referenced by _dsp_init().
#define DEF_DTMF_MISSES_TO_END 3 |
Definition at line 237 of file dsp.c.
Referenced by _dsp_init().
#define DEF_DTMF_NORMAL_TWIST 6.31 /* 8.0dB */ |
Definition at line 183 of file dsp.c.
Referenced by _dsp_init(), and test_dtmf_twist_sweep().
#define DEF_DTMF_REVERSE_TWIST 2.51 /* 4.01dB */ |
Definition at line 190 of file dsp.c.
Referenced by _dsp_init(), and test_dtmf_twist_sweep().
#define DEF_RELAX_DTMF_NORMAL_TWIST 6.31 /* 8.0dB */ |
Definition at line 184 of file dsp.c.
Referenced by _dsp_init().
#define DEF_RELAX_DTMF_REVERSE_TWIST 3.98 /* 6.0dB */ |
Definition at line 191 of file dsp.c.
Referenced by _dsp_init().
#define DEFAULT_SAMPLE_RATE 8000 |
Definition at line 221 of file dsp.c.
Referenced by ast_dsp_new(), test_dtmf_amplitude_sweep(), test_dtmf_twist_sweep(), test_tone_amplitude_sweep(), and test_tone_freq_sweep().
#define DEFAULT_THRESHOLD 512 |
Default minimum average magnitude threshold to determine talking/noise by the DSP.
The magnitude calculated for this threshold is determined by averaging the absolute value of all samples within a frame.
This value is the threshold for which a frame's average magnitude is determined to either be silence (below the threshold) or noise/talking (at or above the threshold). Please note that while the default threshold is an even exponent of 2, there is no requirement that it be so. The threshold will work for any value between 1 and 2^15.
Definition at line 140 of file dsp.c.
Referenced by __ast_dsp_new().
#define DSP_HISTORY 15 |
Remember last 15 units
Definition at line 151 of file dsp.c.
Referenced by __ast_dsp_new(), __ast_dsp_silence_noise(), ast_dsp_busydetect(), and ast_dsp_set_busy_count().
#define DTMF_GSIZE 102 |
Definition at line 227 of file dsp.c.
Referenced by dtmf_detect(), test_dtmf_amplitude_sweep(), and test_dtmf_twist_sweep().
#define DTMF_RELATIVE_PEAK_COL 6.3 /* 8dB */ |
Definition at line 195 of file dsp.c.
Referenced by dtmf_detect().
#define DTMF_RELATIVE_PEAK_ROW 6.3 /* 8dB */ |
Definition at line 194 of file dsp.c.
Referenced by dtmf_detect().
#define DTMF_THRESHOLD 8.0e7 |
Definition at line 180 of file dsp.c.
Referenced by dtmf_detect().
#define DTMF_TO_TOTAL_ENERGY 42.0 |
Definition at line 196 of file dsp.c.
Referenced by dtmf_detect().
#define FAX_TONE_CED_DB 16 |
Definition at line 219 of file dsp.c.
Referenced by ast_fax_detect_init().
#define FAX_TONE_CED_DURATION 2600 /* ms */ |
Definition at line 218 of file dsp.c.
Referenced by ast_fax_detect_init().
#define FAX_TONE_CED_FREQ 2100 |
Definition at line 217 of file dsp.c.
Referenced by ast_fax_detect_init().
#define FAX_TONE_CNG_DB 16 |
Definition at line 211 of file dsp.c.
Referenced by ast_fax_detect_init().
#define FAX_TONE_CNG_DURATION 500 /* ms */ |
Definition at line 210 of file dsp.c.
Referenced by ast_fax_detect_init().
#define FAX_TONE_CNG_FREQ 1100 |
Definition at line 209 of file dsp.c.
Referenced by ast_fax_detect_init().
#define FREQ_ARRAY_SIZE 7 |
Definition at line 115 of file dsp.c.
Referenced by __ast_dsp_call_progress(), and ast_dsp_prog_reset().
#define MAX_DTMF_DIGITS 128 |
Definition at line 166 of file dsp.c.
Referenced by store_digit().
#define MF_GSIZE 120 |
Definition at line 224 of file dsp.c.
Referenced by mf_detect().
#define TONE_AMPLITUDE_MAX 0x7fff /* Max signed linear amplitude */ |
Definition at line 2034 of file dsp.c.
Referenced by AST_TEST_DEFINE(), test_dtmf_amplitude_sweep(), and test_tone_amplitude_sweep().
#define TONE_AMPLITUDE_MIN 80 /* Min signed linear amplitude detectable */ |
Definition at line 2035 of file dsp.c.
Referenced by AST_TEST_DEFINE(), test_dtmf_amplitude_sweep(), and test_tone_amplitude_sweep().
#define TONE_MIN_THRESH 1e8 |
How much tone there should be at least to attempt
Definition at line 154 of file dsp.c.
Referenced by __ast_dsp_call_progress(), and pair_there().
#define TONE_THRESH 10.0 |
How much louder the tone should be than channel energy
Definition at line 153 of file dsp.c.
Referenced by __ast_dsp_call_progress(), and pair_there().
#define TONE_THRESHOLD 7.8e7 |
Definition at line 181 of file dsp.c.
Referenced by tone_detect().
enum busy_detect |
enum freq_index |
enum gsamp_size |
Number of goertzels for progress detect
enum gsamp_thresh |
All THRESH_XXX values are in GSAMP_SIZE chunks (us = 22ms)
enum prog_mode |
|
static |
Definition at line 1074 of file dsp.c.
References AST_CONTROL_ANSWER, AST_CONTROL_BUSY, AST_CONTROL_CONGESTION, AST_CONTROL_HANGUP, AST_CONTROL_RINGING, ast_debug, ast_log, DSP_FEATURE_CALL_PROGRESS, DSP_PROGRESS_BUSY, DSP_PROGRESS_CONGESTION, DSP_PROGRESS_RINGING, DSP_PROGRESS_TALK, DSP_TONE_STATE_BUSY, DSP_TONE_STATE_DIALTONE, DSP_TONE_STATE_HUNGUP, DSP_TONE_STATE_RINGING, DSP_TONE_STATE_SILENCE, DSP_TONE_STATE_SPECIAL1, DSP_TONE_STATE_SPECIAL2, DSP_TONE_STATE_SPECIAL3, DSP_TONE_STATE_TALKING, ast_dsp::features, FREQ_ARRAY_SIZE, ast_dsp::freqcount, ast_dsp::freqs, ast_dsp::genergy, goertzel_result(), goertzel_sample(), ast_dsp::gsamp_size, ast_dsp::gsamps, HZ_1400, HZ_1800, HZ_350, HZ_350UK, HZ_400UK, HZ_425, HZ_440, HZ_440UK, HZ_480, HZ_620, HZ_950, len(), LOG_WARNING, pair_there(), pass, PROG_MODE_CR, PROG_MODE_NA, PROG_MODE_UK, ast_dsp::progmode, ast_dsp::ringtimeout, ast_dsp::tcount, THRESH_BUSY, THRESH_CONGESTION, THRESH_HANGUP, THRESH_RING, THRESH_RING2ANSWER, THRESH_TALK, TONE_MIN_THRESH, TONE_THRESH, ast_dsp::tstate, goertzel_state_t::v2, and goertzel_state_t::v3.
Referenced by ast_dsp_call_progress(), and ast_dsp_process().
|
static |
Definition at line 1722 of file dsp.c.
References ast_calloc, ast_digit_detect_init(), ast_dsp_prog_reset(), ast_fax_detect_init(), ast_dsp::busycount, DEFAULT_THRESHOLD, ast_dsp::digit_state, ast_dsp::digitmode, ast_dsp::display_inband_dtmf_warning, DSP_DIGITMODE_DTMF, DSP_DIGITMODE_MF, DSP_FAXMODE_DETECT_CNG, DSP_FEATURE_SILENCE_SUPPRESS, DSP_HISTORY, ast_dsp::faxmode, ast_dsp::features, ast_dsp::freqcount, ast_dsp::sample_rate, and ast_dsp::threshold.
Referenced by ast_dsp_new(), and ast_dsp_new_with_rate().
|
static |
Definition at line 1229 of file dsp.c.
References abs, BUSY_PERCENT, ast_dsp::busycount, ast_dsp::busymaybe, DSP_HISTORY, ast_dsp::historicnoise, ast_dsp::historicsilence, len(), ast_dsp::sample_rate, ast_dsp::totalnoise, and ast_dsp::totalsilence.
Referenced by ast_dsp_process(), and ast_dsp_silence_noise_with_energy().
|
static |
Definition at line 1908 of file dsp.c.
References ast_config_destroy(), ast_config_load2(), ast_log, ast_variable_browse(), CONFIG_FILE_NAME, CONFIG_FLAG_FILEUNCHANGED, CONFIG_STATUS_FILEINVALID, CONFIG_STATUS_FILEMISSING, CONFIG_STATUS_FILEUNCHANGED, DEF_DTMF_HITS_TO_BEGIN, DEF_DTMF_MISSES_TO_END, DEF_DTMF_NORMAL_TWIST, DEF_DTMF_REVERSE_TWIST, DEF_RELAX_DTMF_NORMAL_TWIST, DEF_RELAX_DTMF_REVERSE_TWIST, DEFAULT_SILENCE_THRESHOLD, dtmf_hits_to_begin, dtmf_misses_to_end, dtmf_normal_twist, dtmf_reverse_twist, LOG_WARNING, ast_variable::name, ast_variable::next, relax_dtmf_normal_twist, relax_dtmf_reverse_twist, THRESHOLD_SILENCE, thresholds, and ast_variable::value.
Referenced by load_module(), and reload_module().
|
static |
Definition at line 559 of file dsp.c.
References ast_dtmf_detect_init(), ast_mf_detect_init(), digit_detect_state_t::current_digits, digit_detect_state_t::detected_digits, digit_detect_state_t::digits, digit_detect_state_t::dtmf, digit_detect_state_t::lost_digits, digit_detect_state_t::mf, and digit_detect_state_t::td.
Referenced by __ast_dsp_new(), and ast_dsp_set_digitmode().
int ast_dsp_busydetect | ( | struct ast_dsp * | dsp | ) |
Return non-zero if historically this should be a busy, request that ast_dsp_silence has already been called.
Definition at line 1295 of file dsp.c.
References abs, ast_debug, ast_dsp::busy_cadence, BUSY_MAX, BUSY_MIN, BUSY_PAT_PERCENT, BUSY_PERCENT, ast_dsp::busycount, ast_dsp::busymaybe, DSP_HISTORY, ast_dsp::historicnoise, ast_dsp::historicsilence, ast_dsp_busy_pattern::length, MAX, and ast_dsp_busy_pattern::pattern.
Referenced by ast_dsp_process().
Scans for progress indication in audio.
Definition at line 1216 of file dsp.c.
References __ast_dsp_call_progress(), ast_format_cache_is_slinear(), AST_FRAME_VOICE, ast_log, ast_frame::data, ast_frame::datalen, ast_frame_subclass::format, ast_frame::frametype, LOG_WARNING, ast_frame::ptr, and ast_frame::subclass.
void ast_dsp_digitreset | ( | struct ast_dsp * | dsp | ) |
Reset DTMF detector.
Definition at line 1797 of file dsp.c.
References dtmf_detect_state_t::col_out, digit_detect_state_t::current_digits, dtmf_detect_state_t::current_hit, mf_detect_state_t::current_hit, dtmf_detect_state_t::current_sample, mf_detect_state_t::current_sample, ast_dsp::digit_state, ast_dsp::digitmode, digit_detect_state_t::digits, DSP_DIGITMODE_MF, digit_detect_state_t::dtmf, ast_dsp::dtmf_began, dtmf_detect_state_t::energy, goertzel_reset(), dtmf_detect_state_t::hits, mf_detect_state_t::hits, dtmf_detect_state_t::lasthit, digit_detect_state_t::mf, dtmf_detect_state_t::misses, dtmf_detect_state_t::row_out, digit_detect_state_t::td, and mf_detect_state_t::tone_out.
Referenced by analog_ss_thread(), mbl_new(), my_dsp_reset_and_flush_digits(), test_dtmf_amplitude_sweep(), and test_dtmf_twist_sweep().
void ast_dsp_free | ( | struct ast_dsp * | dsp | ) |
Definition at line 1770 of file dsp.c.
References ast_free.
Referenced by __ast_play_and_record(), analog_ss_thread(), AST_TEST_DEFINE(), background_detect_exec(), chan_list_destructor(), chan_pjsip_cng_tone_detected(), chan_pjsip_read_stream(), conf_run(), dahdi_hangup(), datastore_destroy_cb(), destroy_callback(), destroy_endpoint(), destroy_faxdetect(), destroy_session(), disable_dsp_detect(), do_waiting(), handle_recordfile(), isAnsweringMachine(), mbl_load_device(), mgcp_hangup(), my_all_subchannels_hungup(), my_dsp_set_digitmode(), ooh323_destroy(), pjsip_acf_dtmf_mode_write(), read_mf_digits(), read_sf_digits(), record_exec(), session_destructor(), set_caps(), set_softmix_bridge_data(), sip_rtp_read(), softmix_bridge_leave(), unload_module(), and wait_exec().
int ast_dsp_get_features | ( | struct ast_dsp * | dsp | ) |
Get features.
Definition at line 1764 of file dsp.c.
References ast_dsp::features.
Referenced by chan_pjsip_cng_tone_detected(), chan_pjsip_read_stream(), pjsip_acf_dtmf_mode_write(), and set_caps().
unsigned int ast_dsp_get_sample_rate | ( | const struct ast_dsp * | dsp | ) |
Retrieve the sample rate this DSP structure was created with.
Definition at line 1717 of file dsp.c.
References ast_dsp::sample_rate.
int ast_dsp_get_tcount | ( | struct ast_dsp * | dsp | ) |
Get tcount (Threshold counter)
Definition at line 1903 of file dsp.c.
References ast_dsp::tcount.
Referenced by dahdi_read().
int ast_dsp_get_threshold_from_settings | ( | enum threshold | which | ) |
Get silence threshold from dsp.conf.
Definition at line 1996 of file dsp.c.
References thresholds.
Referenced by actual_load_config(), app_exec(), ast_record_review(), conf_rec_name(), conf_run(), do_waiting(), handle_recordfile(), load_config(), record_exec(), setup_privacy_args(), and talk_detect_fn_write().
int ast_dsp_get_tstate | ( | struct ast_dsp * | dsp | ) |
Get tstate (Tone State)
Definition at line 1898 of file dsp.c.
References ast_dsp::tstate.
Referenced by dahdi_read().
struct ast_dsp* ast_dsp_new | ( | void | ) |
Allocates a new dsp, assumes 8khz for internal sample rate.
Definition at line 1745 of file dsp.c.
References __ast_dsp_new(), and DEFAULT_SAMPLE_RATE.
Referenced by __ast_play_and_record(), ast_sip_session_alloc(), AST_TEST_DEFINE(), background_detect_exec(), conf_run(), dahdi_new(), detect_write(), do_waiting(), enable_dsp_detect(), fax_detect_new(), fax_session_new(), handle_recordfile(), isAnsweringMachine(), mbl_load_device(), mgcp_new(), misdn_set_opt_exec(), my_dsp_set_digitmode(), ooh323_new(), pjsip_acf_dtmf_mode_write(), read_config(), read_mf_digits(), read_sf_digits(), record_exec(), and wait_exec().
struct ast_dsp* ast_dsp_new_with_rate | ( | unsigned int | sample_rate | ) |
Allocates a new dsp with a specific internal sample rate used during processing.
Definition at line 1750 of file dsp.c.
References __ast_dsp_new().
Referenced by set_softmix_bridge_data(), and set_talk_detect().
Process the audio frame for noise.
dsp | DSP processing audio media. |
f | Audio frame to process. |
totalnoise | Variable to set to the total accumulated noise in ms seen by the DSP since the last silence. |
Definition at line 1488 of file dsp.c.
References ast_dsp_silence_noise_with_energy(), and NULL.
struct ast_frame* ast_dsp_process | ( | struct ast_channel * | chan, |
struct ast_dsp * | dsp, | ||
struct ast_frame * | af | ||
) |
Return AST_FRAME_NULL frames when there is silence, AST_FRAME_BUSY on busies, and call progress, all dependent upon which features are enabled.
Definition at line 1494 of file dsp.c.
References __ast_dsp_call_progress(), __ast_dsp_silence_noise(), AST_ALAW, ast_alloca, ast_channel_name(), ast_channel_softhangup_internal_flag_add(), AST_CONTROL_ANSWER, AST_CONTROL_BUSY, AST_CONTROL_CONGESTION, AST_CONTROL_HANGUP, AST_CONTROL_RINGING, ast_debug, ast_dsp_busydetect(), ast_format_alaw, ast_format_cache_is_slinear(), ast_format_cmp(), AST_FORMAT_CMP_EQUAL, ast_format_get_name(), ast_format_ulaw, AST_FRAME_CONTROL, AST_FRAME_DTMF, AST_FRAME_DTMF_BEGIN, AST_FRAME_DTMF_END, AST_FRAME_NULL, AST_FRAME_VOICE, ast_frfree, ast_frisolate, AST_LIN2A, AST_LIN2MU, ast_log, AST_MULAW, ast_queue_frame(), AST_SOFTHANGUP_DEV, ast_dsp::ced_tone_state, ast_dsp::cng_tone_state, digit_detect_state_t::current_digits, ast_frame::data, ast_frame::datalen, digit, ast_dsp::digit_state, digit_detect_state_t::digitlen, ast_dsp::digitmode, digit_detect_state_t::digits, ast_dsp::display_inband_dtmf_warning, done, DSP_DIGITMODE_MF, DSP_DIGITMODE_NOQUELCH, DSP_DIGITMODE_RELAXDTMF, DSP_FAXMODE_DETECT_CED, DSP_FAXMODE_DETECT_CNG, DSP_FEATURE_BUSY_DETECT, DSP_FEATURE_CALL_PROGRESS, DSP_FEATURE_DIGIT_DETECT, DSP_FEATURE_FAX_DETECT, DSP_FEATURE_FREQ_DETECT, DSP_FEATURE_SILENCE_SUPPRESS, DSP_FEATURE_WAITDIALTONE, ast_dsp::dtmf_began, dtmf_detect(), fragment_t::end, ast_dsp::f, ast_dsp::faxmode, ast_dsp::features, ast_frame_subclass::format, ast_frame::frametype, ast_dsp::freqmode, ast_dsp::historicnoise, ast_dsp::historicsilence, ast_frame_subclass::integer, ast_frame::len, len(), LOG_WARNING, mf_detect(), ast_dsp::mute_data, ast_dsp::mute_fragments, NULL, ast_frame::ptr, ast_dsp::sample_rate, ast_frame::src, fragment_t::start, ast_frame::subclass, and tone_detect().
Referenced by chan_pjsip_read_stream(), dahdi_read(), detect_callback(), fax_detect_framehook(), mbl_read(), mgcp_rtp_read(), ooh323_rtp_read(), process_ast_dsp(), read_mf_digits(), read_sf_digits(), sip_rtp_read(), and wait_exec().
|
static |
Definition at line 1700 of file dsp.c.
References FREQ_ARRAY_SIZE, ast_dsp::freqcount, progress::freqs, ast_dsp::freqs, goertzel_init(), ast_dsp::gsamp_size, ast_dsp::gsamps, max, modes, ast_dsp::progmode, ast_dsp::ringtimeout, ast_dsp::sample_rate, and progress::size.
Referenced by __ast_dsp_new(), and ast_dsp_set_call_progress_zone().
void ast_dsp_reset | ( | struct ast_dsp * | dsp | ) |
Reset total silence count.
Definition at line 1830 of file dsp.c.
References ast_dsp::freqs, ast_dsp::gsamps, ast_dsp::historicnoise, ast_dsp::historicsilence, ast_dsp::ringtimeout, ast_dsp::totalsilence, goertzel_state_t::v2, and goertzel_state_t::v3.
Referenced by debug_check_frame_for_silence().
void ast_dsp_set_busy_count | ( | struct ast_dsp * | dsp, |
int | cadences | ||
) |
Set number of required cadences for busy.
Definition at line 1780 of file dsp.c.
References ast_dsp::busycount, cadences, and DSP_HISTORY.
Referenced by dahdi_new().
void ast_dsp_set_busy_pattern | ( | struct ast_dsp * | dsp, |
const struct ast_dsp_busy_pattern * | cadence | ||
) |
Set expected lengths of the busy tone.
Definition at line 1791 of file dsp.c.
References ast_debug, ast_dsp::busy_cadence, ast_dsp_busy_pattern::length, and ast_dsp_busy_pattern::pattern.
Referenced by dahdi_new().
int ast_dsp_set_call_progress_zone | ( | struct ast_dsp * | dsp, |
char * | zone | ||
) |
Set zone for doing progress detection.
Definition at line 1879 of file dsp.c.
References aliases, ARRAY_LEN, ast_dsp_prog_reset(), progalias::mode, progalias::name, and ast_dsp::progmode.
Referenced by dahdi_new().
int ast_dsp_set_digitmode | ( | struct ast_dsp * | dsp, |
int | digitmode | ||
) |
Set digit mode.
Definition at line 1844 of file dsp.c.
References ast_digit_detect_init(), ast_dsp::digit_state, ast_dsp::digitmode, DSP_DIGITMODE_DTMF, DSP_DIGITMODE_MF, DSP_DIGITMODE_MUTECONF, DSP_DIGITMODE_MUTEMAX, and ast_dsp::sample_rate.
Referenced by analog_ss_thread(), dahdi_hangup(), dahdi_new(), dahdi_setoption(), enable_dsp_detect(), mbl_load_device(), mgcp_new(), mkintf(), my_dsp_set_digitmode(), ooh323_new(), and read_mf_digits().
int ast_dsp_set_faxmode | ( | struct ast_dsp * | dsp, |
int | faxmode | ||
) |
Set fax mode.
Definition at line 1870 of file dsp.c.
References ast_fax_detect_init(), and ast_dsp::faxmode.
Referenced by fax_detect_new(), and ooh323_new().
void ast_dsp_set_features | ( | struct ast_dsp * | dsp, |
int | features | ||
) |
Select feature set.
Definition at line 1755 of file dsp.c.
References ast_dsp::display_inband_dtmf_warning, DSP_FEATURE_DIGIT_DETECT, and ast_dsp::features.
Referenced by ast_sip_session_alloc(), chan_pjsip_cng_tone_detected(), chan_pjsip_read_stream(), dahdi_dtmf_detect_disable(), dahdi_dtmf_detect_enable(), dahdi_handle_dtmf(), dahdi_new(), dahdi_read(), dahdi_setoption(), detect_write(), enable_dsp_detect(), fax_detect_new(), mbl_load_device(), mgcp_new(), misdn_set_opt_exec(), my_handle_dtmf(), my_new_analog_ast_channel(), ooh323_new(), pjsip_acf_dtmf_mode_write(), read_config(), read_mf_digits(), read_sf_digits(), set_caps(), sip_rtp_read(), and wait_exec().
int ast_dsp_set_freqmode | ( | struct ast_dsp * | dsp, |
int | freq, | ||
int | dur, | ||
int | db, | ||
int | squelch | ||
) |
Set arbitrary frequency detection mode.
Definition at line 1859 of file dsp.c.
References ast_freq_detect_init(), and ast_dsp::freqmode.
Referenced by detect_write(), read_sf_digits(), and wait_exec().
void ast_dsp_set_threshold | ( | struct ast_dsp * | dsp, |
int | threshold | ||
) |
Set the minimum average magnitude threshold to determine talking by the DSP.
Definition at line 1775 of file dsp.c.
References ast_dsp::threshold.
Referenced by __ast_play_and_record(), do_waiting(), fax_session_new(), handle_recordfile(), isAnsweringMachine(), record_exec(), set_softmix_bridge_data(), and set_talk_detect().
Process the audio frame for silence.
dsp | DSP processing audio media. |
f | Audio frame to process. |
totalsilence | Variable to set to the total accumulated silence in ms seen by the DSP since the last noise. |
Definition at line 1483 of file dsp.c.
References ast_dsp_silence_noise_with_energy(), and NULL.
Referenced by __ast_play_and_record(), background_detect_exec(), conf_run(), debug_check_frame_for_silence(), handle_recordfile(), isAnsweringMachine(), record_exec(), and talk_detect_audiohook_cb().
|
static |
Definition at line 1433 of file dsp.c.
References __ast_dsp_silence_noise(), AST_ALAW, ast_alloca, ast_format_alaw, ast_format_cache_is_slinear(), ast_format_cmp(), AST_FORMAT_CMP_EQUAL, ast_format_ulaw, AST_FRAME_VOICE, ast_log, AST_MULAW, ast_frame::data, ast_frame::datalen, ast_frame_subclass::format, ast_frame::frametype, len(), LOG_WARNING, NULL, ast_frame::ptr, and ast_frame::subclass.
Referenced by ast_dsp_noise(), ast_dsp_silence(), and ast_dsp_silence_with_energy().
int ast_dsp_silence_with_energy | ( | struct ast_dsp * | dsp, |
struct ast_frame * | f, | ||
int * | totalsilence, | ||
int * | frames_energy | ||
) |
Process the audio frame for silence.
dsp | DSP processing audio media. |
f | Audio frame to process. |
totalsilence | Variable to set to the total accumulated silence in ms seen by the DSP since the last noise. |
frames_energy | Variable to set to the average energy of the samples in the frame. |
Definition at line 1478 of file dsp.c.
References ast_dsp_silence_noise_with_energy().
Referenced by softmix_bridge_write_voice().
int ast_dsp_was_muted | ( | struct ast_dsp * | dsp | ) |
Returns true if DSP code was muting any fragment of the last processed frame. Muting (squelching) happens when DSP code removes DTMF/MF/generic tones from the audio.
Definition at line 1893 of file dsp.c.
References ast_dsp::mute_fragments.
Referenced by dahdi_read().
|
static |
Definition at line 531 of file dsp.c.
References dtmf_detect_state_t::col_out, dtmf_detect_state_t::current_hit, dtmf_detect_state_t::current_sample, dtmf_col, dtmf_row, dtmf_detect_state_t::energy, goertzel_init(), dtmf_detect_state_t::hits, dtmf_detect_state_t::lasthit, dtmf_detect_state_t::misses, and dtmf_detect_state_t::row_out.
Referenced by ast_digit_detect_init().
|
static |
Definition at line 511 of file dsp.c.
References ast_tone_detect_init(), ast_dsp::ced_tone_state, ast_dsp::cng_tone_state, DSP_FAXMODE_DETECT_SQUELCH, FAX_TONE_CED_DB, FAX_TONE_CED_DURATION, FAX_TONE_CED_FREQ, FAX_TONE_CNG_DB, FAX_TONE_CNG_DURATION, FAX_TONE_CNG_FREQ, ast_dsp::faxmode, ast_dsp::sample_rate, and tone_detect_state_t::squelch.
Referenced by __ast_dsp_new(), and ast_dsp_set_faxmode().
|
static |
Definition at line 522 of file dsp.c.
References ast_tone_detect_init(), ast_dsp::cng_tone_state, ast_dsp::freqmode, ast_dsp::sample_rate, and tone_detect_state_t::squelch.
Referenced by ast_dsp_set_freqmode().
|
static |
Definition at line 547 of file dsp.c.
References mf_detect_state_t::current_hit, mf_detect_state_t::current_sample, goertzel_init(), mf_detect_state_t::hits, mf_tones, and mf_detect_state_t::tone_out.
Referenced by ast_digit_detect_init().
struct ast_module* AST_MODULE_SELF_SYM | ( | void | ) |
AST_TEST_DEFINE | ( | test_dsp_fax_detect | ) |
Definition at line 2336 of file dsp.c.
References ast_dsp_free(), ast_dsp_new(), AST_TEST_FAIL, AST_TEST_NOT_RUN, AST_TEST_PASS, ast_dsp::ced_tone_state, ast_dsp::cng_tone_state, sip_to_pjsip::info(), result, TEST_EXECUTE, TEST_INIT, test_tone_amplitude_sweep(), test_tone_freq_sweep(), TONE_AMPLITUDE_MAX, and TONE_AMPLITUDE_MIN.
AST_TEST_DEFINE | ( | test_dsp_dtmf_detect | ) |
Definition at line 2392 of file dsp.c.
References ast_dsp_free(), ast_dsp_new(), AST_TEST_FAIL, AST_TEST_NOT_RUN, AST_TEST_PASS, dtmf_positions, sip_to_pjsip::info(), result, test_dtmf_amplitude_sweep(), test_dtmf_twist_sweep(), TEST_EXECUTE, and TEST_INIT.
|
static |
Definition at line 450 of file dsp.c.
References ast_debug, tone_detect_state_t::block_size, tone_detect_state_t::energy, tone_detect_state_t::freq, goertzel_init(), tone_detect_state_t::hit_count, tone_detect_state_t::hits_required, tone_detect_state_t::last_hit, tone_detect_state_t::samples_pending, tone_detect_state_t::squelch, tone_detect_state_t::threshold, and tone_detect_state_t::tone.
Referenced by ast_fax_detect_init(), and ast_freq_detect_init().
|
static |
Definition at line 693 of file dsp.c.
References ast_debug, dtmf_detect_state_t::col_out, digit_detect_state_t::current_digits, dtmf_detect_state_t::current_hit, dtmf_detect_state_t::current_sample, digit_detect_state_t::digitlen, digit_detect_state_t::dtmf, DTMF_GSIZE, dtmf_hits_to_begin, dtmf_misses_to_end, dtmf_normal_twist, dtmf_positions, DTMF_RELATIVE_PEAK_COL, DTMF_RELATIVE_PEAK_ROW, dtmf_reverse_twist, DTMF_THRESHOLD, DTMF_TO_TOTAL_ENERGY, fragment_t::end, dtmf_detect_state_t::energy, goertzel_reset(), goertzel_result(), goertzel_sample(), dtmf_detect_state_t::hits, dtmf_detect_state_t::lasthit, dtmf_detect_state_t::misses, mute, mute_fragment(), dtmf_detect_state_t::mute_samples, relax_dtmf_normal_twist, relax_dtmf_reverse_twist, dtmf_detect_state_t::row_out, fragment_t::start, store_digit(), and digit_detect_state_t::td.
Referenced by ast_dsp_process(), test_dtmf_amplitude_sweep(), and test_dtmf_twist_sweep().
|
inlinestatic |
Definition at line 376 of file dsp.c.
References goertzel_state_t::chunky, cos, goertzel_state_t::fac, M_PI, goertzel_state_t::v2, and goertzel_state_t::v3.
Referenced by ast_dsp_prog_reset(), ast_dtmf_detect_init(), ast_mf_detect_init(), and ast_tone_detect_init().
|
inlinestatic |
Definition at line 382 of file dsp.c.
References goertzel_state_t::chunky, goertzel_state_t::v2, and goertzel_state_t::v3.
Referenced by ast_dsp_digitreset(), dtmf_detect(), mf_detect(), and tone_detect().
|
inlinestatic |
Definition at line 362 of file dsp.c.
References goertzel_state_t::chunky, goertzel_state_t::fac, goertzel_result_t::power, goertzel_state_t::v2, goertzel_state_t::v3, and goertzel_result_t::value.
Referenced by __ast_dsp_call_progress(), dtmf_detect(), mf_detect(), and tone_detect().
|
inlinestatic |
Definition at line 336 of file dsp.c.
References abs, goertzel_state_t::chunky, goertzel_state_t::fac, goertzel_state_t::v2, and goertzel_state_t::v3.
Referenced by __ast_dsp_call_progress(), dtmf_detect(), mf_detect(), and tone_detect().
|
static |
Definition at line 2442 of file dsp.c.
References _dsp_init(), AST_MODULE_LOAD_FAILURE, AST_MODULE_LOAD_SUCCESS, and AST_TEST_REGISTER.
Referenced by reload_module().
|
static |
Definition at line 900 of file dsp.c.
References bell_mf_positions, BELL_MF_RELATIVE_PEAK, BELL_MF_THRESHOLD, BELL_MF_TWIST, mf_detect_state_t::current_hit, mf_detect_state_t::current_sample, fragment_t::end, goertzel_reset(), goertzel_result(), goertzel_sample(), mf_detect_state_t::hits, digit_detect_state_t::mf, MF_GSIZE, mute, mute_fragment(), mf_detect_state_t::mute_samples, fragment_t::start, store_digit(), digit_detect_state_t::td, and mf_detect_state_t::tone_out.
Referenced by ast_dsp_process().
|
static |
Definition at line 440 of file dsp.c.
References ARRAY_LEN, ast_log, LOG_ERROR, ast_dsp::mute_data, and ast_dsp::mute_fragments.
Referenced by dtmf_detect(), mf_detect(), and tone_detect().
|
inlinestatic |
Definition at line 1051 of file dsp.c.
References TONE_MIN_THRESH, and TONE_THRESH.
Referenced by __ast_dsp_call_progress().
|
static |
Definition at line 2454 of file dsp.c.
References _dsp_init(), AST_MODFLAG_GLOBAL_SYMBOLS, AST_MODFLAG_LOAD_ORDER, AST_MODPRI_CORE, AST_MODULE_INFO(), AST_MODULE_SUPPORT_CORE, ASTERISK_GPL_KEY, load_module(), reload(), and unload_module().
|
static |
Definition at line 680 of file dsp.c.
References ast_log, digit_detect_state_t::current_digits, digit_detect_state_t::detected_digits, digit, digit_detect_state_t::digitlen, digit_detect_state_t::digits, LOG_WARNING, digit_detect_state_t::lost_digits, and MAX_DTMF_DIGITS.
Referenced by dtmf_detect(), and mf_detect().
|
static |
Definition at line 2096 of file dsp.c.
References ARRAY_LEN, ast_debug, ast_dsp_digitreset(), ast_test_status_update, DEFAULT_SAMPLE_RATE, digit, ast_dsp::digit_state, dtmf_col, dtmf_detect(), DTMF_GSIZE, dtmf_positions, dtmf_row, result, test_dual_sample_gen(), TONE_AMPLITUDE_MAX, and TONE_AMPLITUDE_MIN.
Referenced by AST_TEST_DEFINE().
|
static |
Definition at line 2176 of file dsp.c.
References ARRAY_LEN, ast_debug, ast_dsp_digitreset(), ast_test_status_update, DEF_DTMF_NORMAL_TWIST, DEF_DTMF_REVERSE_TWIST, DEFAULT_SAMPLE_RATE, digit, ast_dsp::digit_state, dtmf_col, dtmf_detect(), DTMF_GSIZE, dtmf_normal_twist, dtmf_positions, dtmf_reverse_twist, dtmf_row, result, and test_dual_sample_gen().
Referenced by AST_TEST_DEFINE().
|
static |
Definition at line 2026 of file dsp.c.
References test_tone_sample_gen(), and test_tone_sample_gen_add().
Referenced by test_dtmf_amplitude_sweep(), and test_dtmf_twist_sweep().
|
static |
Definition at line 2037 of file dsp.c.
References ARRAY_LEN, ast_debug, ast_test_status_update, tone_detect_state_t::block_size, DEFAULT_SAMPLE_RATE, tone_detect_state_t::freq, tone_detect_state_t::hit_count, tone_detect_state_t::hits_required, result, test_tone_sample_gen(), TONE_AMPLITUDE_MAX, TONE_AMPLITUDE_MIN, and tone_detect().
Referenced by AST_TEST_DEFINE().
|
static |
Definition at line 2274 of file dsp.c.
References ast_debug, ast_test_status_update, tone_detect_state_t::block_size, DEFAULT_SAMPLE_RATE, tone_detect_state_t::freq, tone_detect_state_t::hit_count, tone_detect_state_t::hits_required, result, test_tone_sample_gen(), and tone_detect().
Referenced by AST_TEST_DEFINE().
|
static |
Definition at line 2002 of file dsp.c.
References M_PI.
Referenced by test_dual_sample_gen(), test_tone_amplitude_sweep(), and test_tone_freq_sweep().
|
static |
|
static |
Definition at line 573 of file dsp.c.
References ast_debug, tone_detect_state_t::block_size, end, fragment_t::end, tone_detect_state_t::energy, tone_detect_state_t::freq, goertzel_reset(), goertzel_result(), goertzel_sample(), tone_detect_state_t::hit_count, tone_detect_state_t::hits_required, tone_detect_state_t::last_hit, mute, mute_fragment(), tone_detect_state_t::mute_samples, tone_detect_state_t::samples_pending, tone_detect_state_t::squelch, fragment_t::start, tone_detect_state_t::threshold, tone_detect_state_t::tone, and TONE_THRESHOLD.
Referenced by ast_dsp_process(), test_tone_amplitude_sweep(), and test_tone_freq_sweep().
|
static |
Definition at line 2434 of file dsp.c.
References AST_TEST_UNREGISTER.
Referenced by reload_module().
|
static |
|
static |
Referenced by ast_dsp_set_call_progress_zone().
|
static |
|
static |
Definition at line 327 of file dsp.c.
Referenced by mf_detect().
|
static |
The default silence threshold we will use if an alternate configured value is not present or is invalid.
Definition at line 243 of file dsp.c.
Referenced by _dsp_init().
|
static |
Definition at line 320 of file dsp.c.
Referenced by ast_dtmf_detect_init(), test_dtmf_amplitude_sweep(), and test_dtmf_twist_sweep().
|
static |
Definition at line 333 of file dsp.c.
Referenced by _dsp_init(), and dtmf_detect().
|
static |
Definition at line 334 of file dsp.c.
Referenced by _dsp_init(), and dtmf_detect().
|
static |
Definition at line 329 of file dsp.c.
Referenced by _dsp_init(), dtmf_detect(), and test_dtmf_twist_sweep().
|
static |
Definition at line 326 of file dsp.c.
Referenced by AST_TEST_DEFINE(), dtmf_detect(), test_dtmf_amplitude_sweep(), and test_dtmf_twist_sweep().
|
static |
Definition at line 330 of file dsp.c.
Referenced by _dsp_init(), dtmf_detect(), and test_dtmf_twist_sweep().
|
static |
Definition at line 317 of file dsp.c.
Referenced by ast_dtmf_detect_init(), test_dtmf_amplitude_sweep(), and test_dtmf_twist_sweep().
|
static |
Definition at line 323 of file dsp.c.
Referenced by ast_mf_detect_init(), and ast_senddigit_mf_begin().
|
static |
Referenced by ast_dsp_prog_reset().
|
static |
Definition at line 331 of file dsp.c.
Referenced by _dsp_init(), and dtmf_detect().
|
static |
Definition at line 332 of file dsp.c.
Referenced by _dsp_init(), and dtmf_detect().
|
static |
Definition at line 328 of file dsp.c.
Referenced by _dsp_init(), and ast_dsp_get_threshold_from_settings().