From c6fd62914a1d8601d2ac0c4dca81ca25f6146559 Mon Sep 17 00:00:00 2001 From: martinp Date: Mon, 22 Dec 2003 18:30:24 +0000 Subject: Play a beep after the user chooses prepending git-svn-id: http://svn.digium.com/svn/asterisk/trunk@1876 f38db490-d61c-443f-a65b-d21fe96a405b --- apps/app_voicemail.c | 11 ++++++----- 1 file 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 : "", recordfile, fmt); snprintf(comment,sizeof(comment),"Playing %s, Recording to: %s on %s\n", playfile ? playfile : "", 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': -- cgit v1.2.3