diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-01-03 02:01:58 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2005-01-03 02:01:58 +0000 |
commit | 995b43ca125ba61e8383bb80c3594eeb702ad21b (patch) | |
tree | 1f62a444522ca8bef61a5094d88f9c697a7ebd62 /apps | |
parent | d2a9ef3dce1dba3ab50e760b6269620f8a26dda5 (diff) |
Fix "0" auto deleting messages from voicemail (bug #3057)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@4642 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rwxr-xr-x | apps/app_voicemail.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index 92ca1262e..b4d4c9d0f 100755 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -5899,8 +5899,17 @@ static int play_record_review(struct ast_channel *chan, char *playfile, char *re #endif case '0': if (message_exists || recorded) { - ast_play_and_wait(chan, "vm-deleted"); - DELETE(recordfile, -1, recordfile); + cmd = ast_play_and_wait(chan, "vm-saveoper"); + if (!cmd) + cmd = ast_waitfordigit(chan, 3000); + if (cmd == '1') { + ast_play_and_wait(chan, "vm-msgsaved"); + cmd = '0'; + } else { + ast_play_and_wait(chan, "vm-deleted"); + DELETE(recordfile, -1, recordfile); + cmd = '0'; + } } return cmd; default: |