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 */