[asterisk-bugs] [Asterisk 0011837]: [patch] [sound] Ability to send to multiple recipients.

Asterisk Bug Tracker noreply at bugs.digium.com
Wed Feb 18 23:51:38 CST 2009


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=11837 
====================================================================== 
Reported By:                travishein
Assigned To:                Corydon76
====================================================================== 
Project:                    Asterisk
Issue ID:                   11837
Category:                   Applications/app_voicemail/NewFeature
Reproducibility:            N/A
Severity:                   feature
Priority:                   normal
Status:                     feedback
Asterisk Version:           SVN 
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2008-01-24 11:47 CST
Last Modified:              2009-02-18 23:51 CST
====================================================================== 
Summary:                    [patch] [sound] Ability to send to multiple
recipients.
Description: 
for the menu option 3 (advanced), 5 (leave voice message to a recipient)

we came across the need to allow a user to be able to enter more than one
extension to send a message to (instead of the leave a message for just one
extension at a time as the current implementation was).

To make this work the logic is now
1- user presses 3, 5 to get to the leave voicemail prompt.
2- the existing prompt to enter the extension is played.
3- the user enters the extension for which to send the voicemail to
4- (NEW): the system play a message :press 1 to send message, press 2 to
add another recipient.
  if user presses 2  on this new prompt, the system returns to the step 3,
to prompt and process of entering  the extension.
  if the user presses 1 on this new prompt, the system continues to the
"please say your message" as it used to before.
5- system plays the please say your message when finished hang up.
prompt.
6- user sais their message, and hangs up, or preses pound key.

In order to realize this, we changed input gathering function so that the
char[] buffer that stores the target recipient is larger, as long as the
max receiver string. The operation of adding more recipients now builds the
delimited recipient string that leave_voicemail() understands and expects,
mainly
 extension at context&extension at context
There is also boundary checking so that if the user tries to enter more
exensions than is room in the char[] array, the system will play a (new)
vm-forward-multiple-too-many message to indicate the user is attempting to
forward the message to too many recipients.

So in addition to the attached patch file, there are two new sound audio
prompts that the system must find in the sound prompts folder, so that it
can of course play these when needed.

vm-forward-multiple : "Press 1 to enter an send message, press 2 add
another recipient"
vm-forward-multiple-too-many  : when the user has attempted to enter too
many exensions to leave a message to.


====================================================================== 

---------------------------------------------------------------------- 
 (0100355) travishein (reporter) - 2009-02-18 23:51
 http://bugs.digium.com/view.php?id=11837#c100355 
---------------------------------------------------------------------- 
Ok, attached new patch ( 0011837_177349.diff ), against current svn trunk
(r177349).

- uses the same prompting loop for reading in user extensions as the
original leave voicemail, so it now allows for directory input, and has
what ever validation that it used to have  (addresses previous comments: 1,
4, 5)

- now using ast_str dynamic string to build list of recipients. This
required small change to the leave_voicemail() function, which was used in
about three  places, so adjusted the code to use ast_str and clean up after
for these other spots as well. (addresses previous comments: 2)

- uses ast_debug() now instead ast_log(LOG_DEBUG...). (address previous
comments: 3)

- playback sounds no longer include "patches" prefix (addresses previous
comments :6) 


New notes and comments:

1) now that the recipients list is theoretically dynamic and unlimited,
there is no need for the prompt vm-forward-multiple-too-many, so the logic
surrounding this has been removed, we just have the prompt
vm-forward-multiple  now.

2) i have left in the commented out code lines for where I have converted
the static char[] stuff into ast_str, in the hope that someone can validate
that I have captured all of the spots that needed changing and didn't miss
anything.

3) added support for this forward multiple feature to be turned on in the
voicemail.conf option. before it was always there kind of thing. Why not
right.

4) Now that we use ast_str API, the branch of the forward_message()
function for leave a message (is_new_message = 1) is enabled for the
forward multiple, owever I don't currently understand what or how to make
the multiple recipients  work for the forward message mode (is_new_message
= 0). A lot of this part has changed in 1.6, and I don't even see where
"username" entered in the input loop is used for this part ? I would
recommend putting back the if(is_new_message) { } wrapper around the 
prompt and loop for reading another extension for the forward multiple ?
(that was what I originally had there anyway).

4) so far, this compiles now without warnings, and it looks good on paper
to me now, but I _still_ don't have my asterisk 1.6 test env up here. so
this has not been road tested yet. and in the mean time, I felt I owed some
kind of progress update,and I was hoping that posting the current work to
capture many of these improvements would open further discussion. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-02-18 23:51 travishein     Note Added: 0100355                          
======================================================================




More information about the asterisk-bugs mailing list