aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/app_voicemail.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index 05f3926af..9f97fde21 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -5710,7 +5710,7 @@ static int leave_voicemail(struct ast_channel *chan, char *ext, struct leave_vm_
}
if (res == '0') {
goto transfer;
- } else if (res > 0)
+ } else if (res > 0 && res != 't')
res = 0;
if (duration < vmminsecs)
@@ -10015,6 +10015,11 @@ static int vm_exec(struct ast_channel *chan, void *data)
}
res = leave_voicemail(chan, args.argv0, &leave_options);
+ if (res == 't') {
+ ast_play_and_wait(chan, "vm-goodbye");
+ res = 0;
+ }
+
if (res == OPERATOR_EXIT) {
res = 0;
}
@@ -11992,10 +11997,10 @@ static int play_record_review(struct ast_channel *chan, char *playfile, char *re
/* Hang up or timeout, so delete the recording. */
ast_filedelete(tempfile, NULL);
}
- if (cmd == 't')
- cmd = 0;
- else if (outsidecaller) /* won't play if time out occurs */
+
+ if (cmd != 't' && outsidecaller)
ast_play_and_wait(chan, "vm-goodbye");
+
return cmd;
}