diff options
author | rrittgarn <rrittgarn@techpro.com> | 2017-01-25 16:25:21 -0600 |
---|---|---|
committer | Kevin Harwell <kharwell@digium.com> | 2017-02-14 12:57:55 -0600 |
commit | 9d34df9a5e5632f03ad53cbc4c6eb58c597cbba1 (patch) | |
tree | 585f6eacf6ebcd9688cc21df0b1d7c34708f6ce7 /apps | |
parent | 3410000948f406a2e4bba33842345c40eb9bee20 (diff) |
app_voicemail: VoiceMailPlayMsg did not play database stored messages
When attempting to use VoiceMailPlayMsg with a realtime data backend
the message is located, but never retrieved. This patch adds the
required RETRIEVE and DISPOSE calls that will fetch the message from
the database (and IMAP storage as well for that matter).
Also, removed extraneous make_file call.
ASTERISK-26723 #close
Change-Id: I1e122dd53c0f3d7faa10f3c2b7e7e76a47d51b8c
Diffstat (limited to 'apps')
-rw-r--r-- | apps/app_voicemail.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c index bee684e4e..1e9bec392 100644 --- a/apps/app_voicemail.c +++ b/apps/app_voicemail.c @@ -11127,7 +11127,6 @@ static int play_message_by_id_helper(struct ast_channel *chan, /* Found the msg, so play it back */ make_file(vms->fn, sizeof(vms->fn), vms->curdir, vms->curmsg); - make_file(vms->fn, sizeof(vms->fn), vms->curdir, vms->curmsg); #ifdef IMAP_STORAGE /*IMAP storage stores any prepended message from a forward @@ -11137,6 +11136,8 @@ static int play_message_by_id_helper(struct ast_channel *chan, wait_file(chan, vms, vms->introfn); } #endif + RETRIEVE(vms->curdir,vms->curmsg,vmu->mailbox, vmu->context); + if ((wait_file(chan, vms, vms->fn)) < 0) { ast_log(AST_LOG_WARNING, "Playback of message %s failed\n", vms->fn); } else { @@ -11148,7 +11149,7 @@ static int play_message_by_id_helper(struct ast_channel *chan, ast_mutex_unlock(&vms->lock); #endif } - + DISPOSE(vms->curdir, vms->curmsg); return 0; } |