From 10376c0c61c746b5e87fca659775e093c6cfa0e8 Mon Sep 17 00:00:00 2001 From: Mark Spencer Date: Tue, 13 May 2003 02:25:10 +0000 Subject: [PATCH] Fix minor voicemail silence detect issues git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1011 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- apps/app_voicemail2.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/apps/app_voicemail2.c b/apps/app_voicemail2.c index 50d7bc49bd..690f021d3d 100755 --- a/apps/app_voicemail2.c +++ b/apps/app_voicemail2.c @@ -573,7 +573,7 @@ static int play_and_record(struct ast_channel *chan, char *playfile, char *recor int totalsilence = 0; int dspsilence = 0; int gotsilence = 0; /* did we timeout for silence? */ - + int rfmt=0; ast_log(LOG_DEBUG,"play_and_record: %s, %s, '%s'\n", playfile ? playfile : "", recordfile, fmt); snprintf(comment,sizeof(comment),"Playing %s, Recording to: %s on %s\n", playfile ? playfile : "", recordfile, chan->name); @@ -622,7 +622,7 @@ static int play_and_record(struct ast_channel *chan, char *playfile, char *recor ast_dsp_set_threshold(sildet, 50); if (maxsilence > 0) { - //rfmt = chan->readformat; + rfmt = chan->readformat; res = ast_set_read_format(chan, AST_FORMAT_SLINEAR); if (res < 0) { ast_log(LOG_WARNING, "Unable to set to linear mode, giving up\n"); @@ -717,13 +717,18 @@ static int play_and_record(struct ast_channel *chan, char *playfile, char *recor for (x=0;xname); + } + } if (outmsg) { if (outmsg > 1) { /* Let them know it worked */