[asterisk-bugs] [Asterisk 0016415]: [patch] Message forwarding with prepention does not backup original message and length as intended

Asterisk Bug Tracker noreply at bugs.digium.com
Mon Feb 1 17:13:45 CST 2010


The following issue has been ASSIGNED. 
====================================================================== 
https://issues.asterisk.org/view.php?id=16415 
====================================================================== 
Reported By:                tomo1657
Assigned To:                tilghman
====================================================================== 
Project:                    Asterisk
Issue ID:                   16415
Category:                   Applications/app_voicemail
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     assigned
Asterisk Version:           SVN 
JIRA:                       SWP-509 
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 233691 
Request Review:              
====================================================================== 
Date Submitted:             2009-12-08 11:33 CST
Last Modified:              2010-02-01 17:13 CST
====================================================================== 
Summary:                    [patch] Message forwarding with prepention does not
backup original message and length as intended
Description: 
When a message is forwarded with prepention using file system storage, the
prepended message portion is not removed from the original message in the
sender's mailbox afterward.  Whether the forward operation is cancelled or
completed does not matter.  The duration in the msgXXXX.txt file in the
sender's message also keeps the prepended duration, even if the operation
was cancelled and there was no forwarding to the recepient.  In certain
cancel conditions (non-hangups), the original message is correctly restored
but the msgXXXX.txt is not, and causes a discrepancy in actual duration and
announced duration.

In IMAP storage there are no such issues; the original message stays the
same without prepention, whether it is cancelled or sent.

The main issue seems to be that the backup message msgXXXX.bak is being
created but is never restored properly after a cancel / hang up.  Upon a
hangup or cancel, the attached patch will call ast_filerename(backup,
msgfile, NULL) to restore the original backup file instead of calling
ast_filedelete(backup,NULL) to delete it.  Also, when a forward succeeds,
forward_message() is patched to restore the backup file in the original
mailbox so that the prepention message is removed.
 
This alone does not restore the original message length in msgXXXX.txt,
though.  This patch also adds new temp file msgXXXX.bak.txt that is
created, removed, and restored along with the msgXXXX.bak.

I confirm this in asterisk-1.6.1.1, 1.6.1.2, 1.6.1.4, 1.6.1.11, 1.6.2-rc7,
and svn-trunk. This patch has been necessary in our deployment to meet
customer expectations.
====================================================================== 

---------------------------------------------------------------------- 
 (0117484) svnbot (reporter) - 2010-02-01 17:13
 https://issues.asterisk.org/view.php?id=16415#c117484 
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 244242

U   branches/1.4/apps/app_voicemail.c

------------------------------------------------------------------------
r244242 | tilghman | 2010-02-01 17:13:44 -0600 (Mon, 01 Feb 2010) | 11
lines

Backup and restore original textfile, for prosthesis (gerund of prepend).

Also, fix menuselect such that changing voicemail build options correctly
causes rebuild.

(closes issue https://issues.asterisk.org/view.php?id=16415)
 Reported by: tomo1657
 Patches: 
       prepention.patch uploaded by tomo1657 (license 484)
       (with modifications by me to backport to 1.4)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=244242 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-02-01 17:13 svnbot         Note Added: 0117484                          
2010-02-01 17:13 svnbot         Status                   ready for testing =>
assigned
2010-02-01 17:13 svnbot         Assigned To               => tilghman        
======================================================================




More information about the asterisk-bugs mailing list