[asterisk-bugs] [Asterisk 0009046]: [patch] Add confirmation of forwarded-to user via name or extension when forwarding a voicemail to another mailbox

noreply at bugs.digium.com noreply at bugs.digium.com
Thu Nov 15 16:43:55 CST 2007


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=9046 
====================================================================== 
Reported By:                jaroth
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   9046
Category:                   Applications/app_voicemail
Reproducibility:            N/A
Severity:                   feature
Priority:                   normal
Status:                     ready for testing
Asterisk Version:            SVN 
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 54139 
Disclaimer on File?:        No 
Request Review:              
====================================================================== 
Date Submitted:             02-12-2007 15:08 CST
Last Modified:              11-15-2007 16:43 CST
====================================================================== 
Summary:                    [patch] Add confirmation of forwarded-to user via
name or extension when forwarding a voicemail to another mailbox
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. 
====================================================================== 

---------------------------------------------------------------------- 
 putnopvut - 11-15-07 16:43  
---------------------------------------------------------------------- 
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. 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
11-15-07 16:43  putnopvut      Note Added: 0073752                          
======================================================================




More information about the asterisk-bugs mailing list