| Asterisk - The Open Source Telephony Project GIT-master-27fb039
    | 
Answering machine detection. More...
#include "asterisk.h"#include "asterisk/module.h"#include "asterisk/lock.h"#include "asterisk/channel.h"#include "asterisk/dsp.h"#include "asterisk/pbx.h"#include "asterisk/config.h"#include "asterisk/app.h"#include "asterisk/format_cache.h"
Go to the source code of this file.
| Macros | |
| #define | STATE_IN_SILENCE 2 | 
| #define | STATE_IN_WORD 1 | 
| Functions | |
| static void | __reg_module (void) | 
| static void | __unreg_module (void) | 
| static int | amd_exec (struct ast_channel *chan, const char *data) | 
| struct ast_module * | AST_MODULE_SELF_SYM (void) | 
| static void | isAnsweringMachine (struct ast_channel *chan, const char *data) | 
| static int | load_config (int reload) | 
| static int | load_module (void) | 
| Load the module. | |
| static int | reload (void) | 
| static int | unload_module (void) | 
| Variables | |
| static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_DEFAULT , .description = "Answering Machine Detection Application" , .key = ASTERISK_GPL_KEY , .buildopt_sum = AST_BUILDOPT_SUM, .support_level = AST_MODULE_SUPPORT_EXTENDED, .load = load_module, .unload = unload_module, .reload = reload, } | 
| static const char | app [] = "AMD" | 
| static const struct ast_module_info * | ast_module_info = &__mod_info | 
| static ast_mutex_t | config_lock | 
| static int | dfltAfterGreetingSilence = 800 | 
| static char * | dfltAudioFile = NULL | 
| static int | dfltBetweenWordsSilence = 50 | 
| static int | dfltGreeting = 1500 | 
| static int | dfltInitialSilence = 2500 | 
| static int | dfltMaximumNumberOfWords = 2 | 
| static int | dfltMaximumWordLength = 5000 | 
| static int | dfltMaxWaitTimeForFrame = 50 | 
| static int | dfltMinimumWordLength = 100 | 
| static int | dfltSilenceThreshold = 256 | 
| static int | dfltTotalAnalysisTime = 5000 | 
Answering machine detection.
Definition in file app_amd.c.
| 
 | static | 
Definition at line 501 of file app_amd.c.
References isAnsweringMachine().
Referenced by load_module().
| struct ast_module * AST_MODULE_SELF_SYM | ( | void | ) | 
| 
 | static | 
Definition at line 174 of file app_amd.c.
References ao2_bump, ao2_cleanup, args, AST_APP_ARG, ast_channel_caller(), ast_channel_language(), ast_channel_name(), ast_channel_readformat(), ast_channel_redirecting(), ast_codec_samples_count(), ast_debug, AST_DECLARE_APP_ARGS, ast_dsp_free(), ast_dsp_new(), ast_dsp_set_threshold(), ast_dsp_silence(), ast_format_get_name(), ast_format_slin, AST_FRAME_CNG, AST_FRAME_VOICE, ast_frfree, ast_log, ast_mutex_lock, ast_mutex_unlock, ast_read(), ast_set_read_format(), AST_STANDARD_APP_ARGS, ast_stopstream(), ast_strdupa, ast_streamfile(), ast_strlen_zero(), ast_tvdiff_ms(), ast_tvnow(), ast_verb, ast_waitfor(), config_lock, DEFAULT_SAMPLES_PER_MS, dfltAfterGreetingSilence, dfltAudioFile, dfltBetweenWordsSilence, dfltGreeting, dfltInitialSilence, dfltMaximumNumberOfWords, dfltMaximumWordLength, dfltMaxWaitTimeForFrame, dfltMinimumWordLength, dfltSilenceThreshold, dfltTotalAnalysisTime, ast_frame::frametype, LOG_WARNING, NULL, pbx_builtin_setvar_helper(), RAII_VAR, S_COR, STATE_IN_SILENCE, and STATE_IN_WORD.
Referenced by amd_exec().
| 
 | static | 
Definition at line 508 of file app_amd.c.
References app, ast_category_browse(), ast_config_destroy(), ast_config_load, ast_dsp_get_threshold_from_settings(), ast_free, ast_log, ast_mutex_lock, ast_mutex_unlock, ast_strdup, ast_strlen_zero(), ast_variable_browse(), ast_verb, CONFIG_FLAG_FILEUNCHANGED, config_lock, CONFIG_STATUS_FILEINVALID, CONFIG_STATUS_FILEUNCHANGED, dfltAfterGreetingSilence, dfltAudioFile, dfltBetweenWordsSilence, dfltGreeting, dfltInitialSilence, dfltMaximumNumberOfWords, dfltMaximumWordLength, dfltMinimumWordLength, dfltSilenceThreshold, dfltTotalAnalysisTime, LOG_ERROR, LOG_WARNING, NULL, reload(), THRESHOLD_SILENCE, and var.
| 
 | static | 
Load the module.
Module loading including tests for configuration or dependencies. This function can return AST_MODULE_LOAD_FAILURE, AST_MODULE_LOAD_DECLINE, or AST_MODULE_LOAD_SUCCESS. If a dependency or environment variable fails tests return AST_MODULE_LOAD_FAILURE. If the module can not load the configuration file or other non-critical problem return AST_MODULE_LOAD_DECLINE. On success return AST_MODULE_LOAD_SUCCESS.
Definition at line 602 of file app_amd.c.
References amd_exec(), app, AST_MODULE_LOAD_DECLINE, AST_MODULE_LOAD_SUCCESS, ast_mutex_init, ast_register_application_xml, config_lock, and load_config().
| 
 | static | 
Definition at line 612 of file app_amd.c.
References AST_MODULE_LOAD_DECLINE, AST_MODULE_LOAD_SUCCESS, and load_config().
Referenced by load_config().
| 
 | static | 
Definition at line 581 of file app_amd.c.
References app, ast_free, ast_mutex_destroy, ast_mutex_lock, ast_mutex_unlock, ast_unregister_application(), config_lock, and dfltAudioFile.
| 
 | static | 
| 
 | static | 
Definition at line 152 of file app_amd.c.
Referenced by load_config(), load_module(), and unload_module().
| 
 | static | 
| 
 | static | 
Definition at line 169 of file app_amd.c.
Referenced by isAnsweringMachine(), load_config(), load_module(), and unload_module().
| 
 | static | 
Definition at line 160 of file app_amd.c.
Referenced by isAnsweringMachine(), and load_config().
| 
 | static | 
Definition at line 167 of file app_amd.c.
Referenced by isAnsweringMachine(), load_config(), and unload_module().
| 
 | static | 
Definition at line 163 of file app_amd.c.
Referenced by isAnsweringMachine(), and load_config().
| 
 | static | 
Definition at line 159 of file app_amd.c.
Referenced by isAnsweringMachine(), and load_config().
| 
 | static | 
Definition at line 158 of file app_amd.c.
Referenced by isAnsweringMachine(), and load_config().
| 
 | static | 
Definition at line 164 of file app_amd.c.
Referenced by isAnsweringMachine(), and load_config().
| 
 | static | 
Definition at line 166 of file app_amd.c.
Referenced by isAnsweringMachine(), and load_config().
| 
 | static | 
Definition at line 172 of file app_amd.c.
Referenced by isAnsweringMachine().
| 
 | static | 
Definition at line 162 of file app_amd.c.
Referenced by isAnsweringMachine(), and load_config().
| 
 | static | 
Definition at line 165 of file app_amd.c.
Referenced by isAnsweringMachine(), and load_config().
| 
 | static | 
Definition at line 161 of file app_amd.c.
Referenced by isAnsweringMachine(), and load_config().