diff options
Diffstat (limited to 'apps/app_talkdetect.c')
-rw-r--r-- | apps/app_talkdetect.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/apps/app_talkdetect.c b/apps/app_talkdetect.c index 7d9376a13..b261d402f 100644 --- a/apps/app_talkdetect.c +++ b/apps/app_talkdetect.c @@ -103,9 +103,7 @@ static int background_detect_exec(struct ast_channel *chan, void *data) } } } - if (option_debug) - ast_log(LOG_DEBUG, "Preparing detect of '%s', sil=%d,min=%d,max=%d\n", - tmp, sil, min, max); + ast_debug(1, "Preparing detect of '%s', sil=%d,min=%d,max=%d\n", tmp, sil, min, max); if (chan->_state != AST_STATE_UP) { /* Otherwise answer unless we're supposed to send this while on-hook */ res = ast_answer(chan); @@ -164,8 +162,7 @@ static int background_detect_exec(struct ast_channel *chan, void *data) ms = 0; if ((ms > min) && ((max < 0) || (ms < max))) { char ms_str[10]; - if (option_debug) - ast_log(LOG_DEBUG, "Found qualified token of %d ms\n", ms); + ast_debug(1, "Found qualified token of %d ms\n", ms); /* Save detected talk time (in milliseconds) */ sprintf(ms_str, "%d", ms ); @@ -176,8 +173,7 @@ static int background_detect_exec(struct ast_channel *chan, void *data) ast_frfree(fr); break; } else { - if (option_debug) - ast_log(LOG_DEBUG, "Found unqualified token of %d ms\n", ms); + ast_debug(1, "Found unqualified token of %d ms\n", ms); } notsilent = 0; } @@ -185,8 +181,7 @@ static int background_detect_exec(struct ast_channel *chan, void *data) if (!notsilent) { /* Heard some audio, mark the begining of the token */ start = ast_tvnow(); - if (option_debug) - ast_log(LOG_DEBUG, "Start of voice token!\n"); + ast_debug(1, "Start of voice token!\n"); notsilent = 1; } } |