diff options
author | martinp <martinp@f38db490-d61c-443f-a65b-d21fe96a405b> | 2003-12-22 18:22:21 +0000 |
---|---|---|
committer | martinp <martinp@f38db490-d61c-443f-a65b-d21fe96a405b> | 2003-12-22 18:22:21 +0000 |
commit | 56957cc446b0eb3fae4fd5c88c233d04ac5ffb41 (patch) | |
tree | a5dc987a3ca3b7d8bb8283780416fe544aa67b04 /apps | |
parent | e08307e5ee251529759e5b6e0465e6576d8a7018 (diff) |
Don't distroy the original message when prepending and if prepending forward with the prepended message even if the hangup is received
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@1875 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rwxr-xr-x | apps/app_voicemail.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index 68b815467..cd688d55a 100755 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -1048,6 +1048,7 @@ static int play_and_prepend(struct ast_channel *chan, char *playfile, char *reco ast_verbose( VERBOSE_PREFIX_3 "User hung up\n"); res = -1; outmsg=1; +#if 0 /* delete all the prepend files */ for (x=0;x<fmtcnt;x++) { if (!others[x]) @@ -1055,15 +1056,20 @@ static int play_and_prepend(struct ast_channel *chan, char *playfile, char *reco ast_closestream(others[x]); ast_filedelete(prependfile, sfmt[x]); } +#endif } } else { ast_log(LOG_WARNING, "Error creating writestream '%s', format '%s'\n", prependfile, sfmt[x]); } +#if 0 if (outmsg > 1) { +#else + if (outmsg) { +#endif struct ast_frame *fr; for (x=0;x<fmtcnt;x++) { snprintf(comment, sizeof(comment), "Opening the real file %s.%s\n", recordfile, sfmt[x]); - realfiles[x] = ast_writefile(recordfile, sfmt[x], comment, O_RDONLY, 0, 0); + realfiles[x] = ast_readfile(recordfile, sfmt[x], comment, O_RDONLY, 0, 0); if (!others[x] || !realfiles[x]) break; if (totalsilence) |