aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormartinp <martinp@f38db490-d61c-443f-a65b-d21fe96a405b>2003-12-22 18:30:24 +0000
committermartinp <martinp@f38db490-d61c-443f-a65b-d21fe96a405b>2003-12-22 18:30:24 +0000
commitc6fd62914a1d8601d2ac0c4dca81ca25f6146559 (patch)
treef1a82fbc4aba54a836bf0668fd27ae3ef4a5d47e
parent56957cc446b0eb3fae4fd5c88c233d04ac5ffb41 (diff)
Play a beep after the user chooses prepending
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@1876 f38db490-d61c-443f-a65b-d21fe96a405b
-rwxr-xr-xapps/app_voicemail.c11
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':