Fri Mar 7 07:00:00 CET 2003
[asterisk/asterisk.git] / apps / app_voicemail.c
index 191b21a..13ddcd8 100755 (executable)
@@ -1583,7 +1583,7 @@ static int play_and_record(struct ast_channel *chan, char *playfile, char *recor
        if (maxtime)
                time(&start);
        for (x=0;x<fmtcnt;x++) {
-               others[x] = ast_writefile(recordfile, sfmt[x], comment, 0, 0, 0700);
+               others[x] = ast_writefile(recordfile, sfmt[x], comment, O_TRUNC, 0, 0700);
                ast_verbose( VERBOSE_PREFIX_3 "x=%i, open writing:  %s format: %s\n", x, recordfile, sfmt[x]);
                        
                if (!others[x]) {