[Asterisk-code-review] app voicemail: VoiceMailPlayMsg did not play database stored... (asterisk[14])

Anonymous Coward asteriskteam at digium.com
Tue Feb 14 16:42:31 CST 2017


Anonymous Coward #1000019 has submitted this change and it was merged. ( https://gerrit.asterisk.org/4934 )

Change subject: app_voicemail: VoiceMailPlayMsg did not play database stored messages
......................................................................


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
---
M apps/app_voicemail.c
1 file changed, 3 insertions(+), 2 deletions(-)

Approvals:
  Kevin Harwell: Looks good to me, but someone else must approve
  George Joseph: Looks good to me, approved
  Anonymous Coward #1000019: Verified
  Joshua Colp: Looks good to me, but someone else must approve



diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c
index fe76bc0..cc3e6fa 100644
--- a/apps/app_voicemail.c
+++ b/apps/app_voicemail.c
@@ -11206,7 +11206,6 @@
 	/* 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
@@ -11216,6 +11215,8 @@
 		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 {
@@ -11227,7 +11228,7 @@
 		ast_mutex_unlock(&vms->lock);
 #endif
 	}
-
+	DISPOSE(vms->curdir, vms->curmsg);
 	return 0;
 }
 

-- 
To view, visit https://gerrit.asterisk.org/4934
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I1e122dd53c0f3d7faa10f3c2b7e7e76a47d51b8c
Gerrit-PatchSet: 2
Gerrit-Project: asterisk
Gerrit-Branch: 14
Gerrit-Owner: Ryan Rittgarn <rrittgarn at techpro.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>



More information about the asterisk-code-review mailing list