aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_amd.c
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2007-12-14 14:48:38 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2007-12-14 14:48:38 +0000
commit35d428bccae3ad607662249b9fd6c3a2d16b9364 (patch)
treeeb8395c48dfe42302c76abaf23fc722e7e6190bf /apps/app_amd.c
parent3b2aaf764626c8870fd2c7de8805fb935e65b0db (diff)
Convert ast_verbose to ast_verb.
Reported by: snuffy Patch by: snuffy (Closes issue #11547) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@92913 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_amd.c')
-rw-r--r--apps/app_amd.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/apps/app_amd.c b/apps/app_amd.c
index 0e1665395..70390f038 100644
--- a/apps/app_amd.c
+++ b/apps/app_amd.c
@@ -199,8 +199,7 @@ static void isAnsweringMachine(struct ast_channel *chan, void *data)
framelength = (ast_codec_get_samples(f) / DEFAULT_SAMPLES_PER_MS);
iTotalTime += framelength;
if (iTotalTime >= totalAnalysisTime) {
- if (option_verbose > 2)
- ast_verbose(VERBOSE_PREFIX_3 "AMD: Channel [%s]. Too long...\n", chan->name );
+ ast_verb(3, "AMD: Channel [%s]. Too long...\n", chan->name );
ast_frfree(f);
strcpy(amdStatus , "NOTSURE");
sprintf(amdCause , "TOOLONG-%d", iTotalTime);
@@ -216,16 +215,14 @@ static void isAnsweringMachine(struct ast_channel *chan, void *data)
if (silenceDuration >= betweenWordsSilence) {
if (currentState != STATE_IN_SILENCE ) {
previousState = currentState;
- if (option_verbose > 2)
- ast_verbose(VERBOSE_PREFIX_3 "AMD: Changed state to STATE_IN_SILENCE\n");
+ ast_verb(3, "AMD: Changed state to STATE_IN_SILENCE\n");
}
currentState = STATE_IN_SILENCE;
consecutiveVoiceDuration = 0;
}
if (inInitialSilence == 1 && silenceDuration >= initialSilence) {
- if (option_verbose > 2)
- ast_verbose(VERBOSE_PREFIX_3 "AMD: ANSWERING MACHINE: silenceDuration:%d initialSilence:%d\n",
+ ast_verb(3, "AMD: ANSWERING MACHINE: silenceDuration:%d initialSilence:%d\n",
silenceDuration, initialSilence);
ast_frfree(f);
strcpy(amdStatus , "MACHINE");
@@ -250,15 +247,13 @@ static void isAnsweringMachine(struct ast_channel *chan, void *data)
number of words if my previous state was Silence, which means that I moved into a word. */
if (consecutiveVoiceDuration >= minimumWordLength && currentState == STATE_IN_SILENCE) {
iWordsCount++;
- if (option_verbose > 2)
- ast_verbose(VERBOSE_PREFIX_3 "AMD: Word detected. iWordsCount:%d\n", iWordsCount);
+ ast_verb(3, "AMD: Word detected. iWordsCount:%d\n", iWordsCount);
previousState = currentState;
currentState = STATE_IN_WORD;
}
if (iWordsCount >= maximumNumberOfWords) {
- if (option_verbose > 2)
- ast_verbose(VERBOSE_PREFIX_3 "AMD: ANSWERING MACHINE: iWordsCount:%d\n", iWordsCount);
+ ast_verb(3, "AMD: ANSWERING MACHINE: iWordsCount:%d\n", iWordsCount);
ast_frfree(f);
strcpy(amdStatus , "MACHINE");
sprintf(amdCause , "MAXWORDS-%d-%d", iWordsCount, maximumNumberOfWords);