Asterisk - The Open Source Telephony Project
18.5.0
|
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. More... | |
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 = "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_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 int | dfltAfterGreetingSilence = 800 |
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.
#define STATE_IN_SILENCE 2 |
Definition at line 146 of file app_amd.c.
Referenced by isAnsweringMachine().
#define STATE_IN_WORD 1 |
Definition at line 145 of file app_amd.c.
Referenced by isAnsweringMachine().
|
static |
Definition at line 469 of file app_amd.c.
References isAnsweringMachine().
Referenced by load_module().
struct ast_module* AST_MODULE_SELF_SYM | ( | void | ) |
|
static |
Definition at line 162 of file app_amd.c.
References ao2_bump, ao2_cleanup, args, AST_APP_ARG, ast_channel_caller(), 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_read(), ast_set_read_format(), AST_STANDARD_APP_ARGS, ast_strdupa, ast_strlen_zero, ast_tvdiff_ms(), ast_tvnow(), ast_verb, ast_waitfor(), DEFAULT_SAMPLES_PER_MS, dfltAfterGreetingSilence, dfltBetweenWordsSilence, dfltGreeting, dfltInitialSilence, dfltMaximumNumberOfWords, dfltMaximumWordLength, dfltMaxWaitTimeForFrame, dfltMinimumWordLength, dfltSilenceThreshold, dfltTotalAnalysisTime, ast_frame::frametype, LOG_WARNING, NULL, parse(), pbx_builtin_setvar_helper(), RAII_VAR, S_COR, STATE_IN_SILENCE, and STATE_IN_WORD.
Referenced by amd_exec().
|
static |
Definition at line 476 of file app_amd.c.
References app, ast_category_browse(), ast_config_destroy(), ast_config_load, ast_dsp_get_threshold_from_settings(), ast_log, ast_variable_browse(), ast_verb, CONFIG_FLAG_FILEUNCHANGED, CONFIG_STATUS_FILEINVALID, CONFIG_STATUS_FILEUNCHANGED, dfltAfterGreetingSilence, dfltBetweenWordsSilence, dfltGreeting, dfltInitialSilence, dfltMaximumNumberOfWords, dfltMaximumWordLength, dfltMinimumWordLength, dfltSilenceThreshold, dfltTotalAnalysisTime, ast_variable::lineno, LOG_ERROR, LOG_WARNING, ast_variable::name, ast_variable::next, NULL, THRESHOLD_SILENCE, ast_variable::value, and var.
Referenced by load_module(), and reload().
|
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 555 of file app_amd.c.
References amd_exec(), app, AST_MODULE_LOAD_DECLINE, AST_MODULE_LOAD_SUCCESS, ast_register_application_xml, and load_config().
Referenced by reload().
|
static |
Definition at line 564 of file app_amd.c.
References AST_MODFLAG_DEFAULT, AST_MODULE_INFO(), AST_MODULE_LOAD_DECLINE, AST_MODULE_LOAD_SUCCESS, AST_MODULE_SUPPORT_EXTENDED, ASTERISK_GPL_KEY, load_config(), load_module(), and unload_module().
|
static |
Definition at line 540 of file app_amd.c.
References app, and ast_unregister_application().
Referenced by reload().
|
static |
|
static |
Definition at line 143 of file app_amd.c.
Referenced by load_config(), load_module(), and unload_module().
|
static |
|
static |
Definition at line 151 of file app_amd.c.
Referenced by isAnsweringMachine(), and load_config().
|
static |
Definition at line 154 of file app_amd.c.
Referenced by isAnsweringMachine(), and load_config().
|
static |
Definition at line 150 of file app_amd.c.
Referenced by isAnsweringMachine(), and load_config().
|
static |
Definition at line 149 of file app_amd.c.
Referenced by isAnsweringMachine(), and load_config().
|
static |
Definition at line 155 of file app_amd.c.
Referenced by isAnsweringMachine(), and load_config().
|
static |
Definition at line 157 of file app_amd.c.
Referenced by isAnsweringMachine(), and load_config().
|
static |
Definition at line 160 of file app_amd.c.
Referenced by isAnsweringMachine().
|
static |
Definition at line 153 of file app_amd.c.
Referenced by isAnsweringMachine(), and load_config().
|
static |
Definition at line 156 of file app_amd.c.
Referenced by isAnsweringMachine(), and load_config().
|
static |
Definition at line 152 of file app_amd.c.
Referenced by isAnsweringMachine(), and load_config().