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"
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) |
static void | isAnsweringMachine (struct ast_channel *chan, const char *data) |
static int | load_config (int reload) |
static int | load_module (void) |
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 = "ac1f6a56484a8820659555499174e588" , .load = load_module, .unload = unload_module, .reload = reload, } |
static const char | app [] = "AMD" |
static 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 = 3 |
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 133 of file app_amd.c.
Referenced by isAnsweringMachine().
#define STATE_IN_WORD 1 |
Definition at line 132 of file app_amd.c.
Referenced by isAnsweringMachine().
|
static |
Definition at line 412 of file app_amd.c.
References isAnsweringMachine().
Referenced by load_module().
|
static |
Definition at line 149 of file app_amd.c.
References ast_party_caller::ani, args, AST_APP_ARG, ast_codec_get_samples(), ast_debug, AST_DECLARE_APP_ARGS, ast_dsp_free(), ast_dsp_new(), ast_dsp_set_threshold(), ast_dsp_silence(), AST_FORMAT_SLINEAR, AST_FRAME_CNG, AST_FRAME_NULL, AST_FRAME_VOICE, ast_frfree, ast_getformatname(), ast_log(), ast_read(), ast_set_read_format(), AST_STANDARD_APP_ARGS, ast_strdupa, ast_strlen_zero(), ast_verb, ast_waitfor(), ast_channel::caller, DEFAULT_SAMPLES_PER_MS, dfltAfterGreetingSilence, dfltBetweenWordsSilence, dfltGreeting, dfltInitialSilence, dfltMaximumNumberOfWords, dfltMaximumWordLength, dfltMaxWaitTimeForFrame, dfltMinimumWordLength, dfltSilenceThreshold, dfltTotalAnalysisTime, f, ast_frame::frametype, ast_party_redirecting::from, LOG_WARNING, ast_channel::name, ast_party_id::number, parse(), pbx_builtin_setvar_helper(), ast_channel::readformat, ast_channel::redirecting, S_COR, STATE_IN_SILENCE, STATE_IN_WORD, ast_party_number::str, and ast_party_number::valid.
Referenced by amd_exec().
|
static |
Definition at line 419 of file app_amd.c.
References 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, ast_variable::lineno, LOG_ERROR, LOG_WARNING, ast_variable::name, ast_variable::next, THRESHOLD_SILENCE, ast_variable::value, and var.
Referenced by load_module(), and reload().
|
static |
Definition at line 488 of file app_amd.c.
References amd_exec(), AST_MODULE_LOAD_DECLINE, AST_MODULE_LOAD_FAILURE, AST_MODULE_LOAD_SUCCESS, ast_register_application_xml, and load_config().
|
static |
Definition at line 497 of file app_amd.c.
References AST_MODULE_LOAD_DECLINE, AST_MODULE_LOAD_SUCCESS, and load_config().
|
static |
Definition at line 483 of file app_amd.c.
References ast_unregister_application().
|
static |
|
static |
|
static |
Definition at line 138 of file app_amd.c.
Referenced by isAnsweringMachine().
|
static |
Definition at line 141 of file app_amd.c.
Referenced by isAnsweringMachine().
|
static |
Definition at line 137 of file app_amd.c.
Referenced by isAnsweringMachine().
|
static |
Definition at line 136 of file app_amd.c.
Referenced by isAnsweringMachine().
|
static |
Definition at line 142 of file app_amd.c.
Referenced by isAnsweringMachine().
|
static |
Definition at line 144 of file app_amd.c.
Referenced by isAnsweringMachine().
|
static |
Definition at line 147 of file app_amd.c.
Referenced by isAnsweringMachine().
|
static |
Definition at line 140 of file app_amd.c.
Referenced by isAnsweringMachine().
|
static |
Definition at line 143 of file app_amd.c.
Referenced by isAnsweringMachine().
|
static |
Definition at line 139 of file app_amd.c.
Referenced by isAnsweringMachine().