Skip to content
Snippets Groups Projects
Commit 2b245b12 authored by rrittgarn's avatar rrittgarn Committed by Kevin Harwell
Browse files

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
parent 84a232ff
No related branches found
No related tags found
No related merge requests found
......@@ -11204,7 +11204,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
......@@ -11214,6 +11213,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 {
......@@ -11225,7 +11226,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;
}
 
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment