Summary:ASTERISK-08787: [patch] Add confirmation of forwarded-to user via name or extension when forwarding a voicemail to another mailbox
Reporter:James Rothenberger (jaroth)Labels:
Date Opened:2007-02-12 15:08:51.000-0600Date Closed:2007-11-26 12:02:24.000-0600
Versions:Frequency of
Environment:Attachments:( 0) vm_forward_verify_v2.patch
( 1) vm_forward_verify_v3.patch
Description:When forwarding a message, there is currently no confirmation after the prompt "extension".   It simply assumes that the extension has been typed correctly and the next thing that the user hears is "press 1 to prepend..."

This patch plays the forwarded-to user's name if available (via the "greet" file) or the forwarded-to user's extension number before proceeding to "press 1 to prepend".  This verifies for the current voicemail user that they are actually sending the voicemail to the person that they want to.
Comments:By: Serge Vecher (serge-v) 2007-02-13 08:49:59.000-0600

nice patch! Can you please get a disclaimer on file (bottom of http://bugs.digium.com/main_page.php) and fix up the patch according to CODING GUIDELINES (mostly tabulation, use tabs instead of spaces). Thanks!

By: James Rothenberger (jaroth) 2007-02-13 10:08:45.000-0600

I have fixed the formatting.  I was not able to delete the old file (permission denied) so I just made a new name.   This work is being done on behalf of the University of Pennsylvania and the University has signed this disclaimer.  I will try to find out the specifics of when it was signed and by whom.

By: jmls (jmls) 2007-09-12 16:29:46

jaroth, did you get the details of the disclaimer ?

By: James Rothenberger (jaroth) 2007-09-13 08:24:13

Please check into other patches that I have created - there is a disclaimer on file for me personally and one with the University of Pennsylvania.   I don't know who actually signed the disclaimer with the University, that was done between them and Digium almost 2 years ago.

By: Mark Michelson (mmichelson) 2007-11-15 16:43:55.000-0600

I've given this patch a test run, and I have noticed a few problems.

Up front, the first is that since trunk has changed since this patch was made, this no longer will compile since the RETRIEVE macro takes four arguments instead of two. This is minor and easy to fix.

More importantly, though, are two issues which impair the functionality of the patch.

1. The snprintf call uses chan->context as the context to use when finding the recipient's name. Unfortunately, in most cases this will not function as desired since you cannot guarantee that the channel's context will be the same as the recipient's voicemail context. As such, even if I attempted to forward a message to a voicemail user who had recorded his name, it would not play when using this patch.

2. When forwarding a message to an extension, it is perfectly valid to enter more than one extension separated by a *. So if I wanted to forward to mailboxes 1000 and 2000, I could type 1000*2000 when prompted for an extension. This patch will then look for the file VM_SPOOL_DIR/<channel context>/1000*2000/greet, which is nonexistent.

My suggestion for fixing these two issues would be to move this code, pretty much as is, inside the while(s) loop which is about 5 lines below where your code is currently. This way, you can wait until after you've called find_user on the receiver's mailbox (so you can use receiver->context for the context in the snprintf). Also, since this section of code takes care of parsing out the individual mailboxes from the digit string pressed by the user, you can accurately look up greetings for each recipient.

By: James Rothenberger (jaroth) 2007-11-16 09:38:54.000-0600

I'll work on these changes in a fresh version of the trunk.  Thanks for the input.

By: James Rothenberger (jaroth) 2007-11-16 10:45:47.000-0600

New patch as suggested.  This patch has been tested in our version, but not against the trunk version (I could not run that version on our test server due to configuration differences).  Could you test against a "normal" installation?

By: Mark Michelson (mmichelson) 2007-11-16 11:06:45.000-0600

I gave this version a test and it performs great! Thanks for the patch. I'll be committing this soon.

By: Digium Subversion (svnbot) 2007-11-16 11:09:31.000-0600

Repository: asterisk
Revision: 89327

U   trunk/apps/app_voicemail.c

r89327 | mmichelson | 2007-11-16 11:09:30 -0600 (Fri, 16 Nov 2007) | 7 lines

Adding confirmation playback when forwarding voicemail messages. This will attempt
to play the name(s) of the person(s) to whom you are forwarding the message prior to
prompting for prepending. If no name is found, the extension is read back verbatim.

(closes issue ASTERISK-8787, reported and patched by jaroth)


By: Digium Subversion (svnbot) 2007-11-26 12:02:24.000-0600

Repository: asterisk
Revision: 89601

U   team/group/upenn/apps/app_voicemail.c

r89601 | russell | 2007-11-26 12:02:23 -0600 (Mon, 26 Nov 2007) | 3 lines

add patch to support a confirmation before forwarding messages
(from issue ASTERISK-8787)