diff options
author | Martin Pycko <martinp@digium.com> | 2003-12-22 18:30:24 +0000 |
---|---|---|
committer | Martin Pycko <martinp@digium.com> | 2003-12-22 18:30:24 +0000 |
commit | 3827fbc3026ec3412c59522af0eee577f827fa8a (patch) | |
tree | f1a82fbc4aba54a836bf0668fd27ae3ef4a5d47e /apps | |
parent | 5bc570d449f634da11bf3ea3b52884457f4f43c7 (diff) |
Play a beep after the user chooses prepending
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1876 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps')
-rwxr-xr-x | apps/app_voicemail.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index cd688d55a..f127bb2de 100755 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -891,9 +891,9 @@ static int play_and_wait(struct ast_channel *chan, char *fn) return d; } -static int play_and_prepend(struct ast_channel *chan, char *playfile, char *recordfile, int maxtime, char *fmt) +static int play_and_prepend(struct ast_channel *chan, char *playfile, char *recordfile, int maxtime, char *fmt, int beep) { - char d, *fmts; + char d = 0, *fmts; char comment[256]; int x, fmtcnt=1, res=-1,outmsg=0; struct ast_frame *f; @@ -912,8 +912,9 @@ static int play_and_prepend(struct ast_channel *chan, char *playfile, char *reco ast_log(LOG_DEBUG,"play_and_preped: %s, %s, '%s'\n", playfile ? playfile : "<None>", recordfile, fmt); snprintf(comment,sizeof(comment),"Playing %s, Recording to: %s on %s\n", playfile ? playfile : "<None>", recordfile, chan->name); - if (playfile) { - d = play_and_wait(chan, playfile); + if (playfile || beep) { + if (!beep) + d = play_and_wait(chan, playfile); if (d > -1) d = ast_streamfile(chan, "beep",chan->language); if (!d) @@ -2136,7 +2137,7 @@ static int vm_forwardoptions(struct ast_channel *chan, struct ast_vm_user *vmu, { char file[200]; snprintf(file, sizeof(file), "%s/msg%04d", curdir, curmsg); - cmd = play_and_prepend(chan, NULL, file, 0, vmfmts); + cmd = play_and_prepend(chan, NULL, file, 0, vmfmts, 1); break; } case '2': |