[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
Tue Dec 8 14:27:32 CST 2009


The following issue has been UPDATED. 
====================================================================== 
https://issues.asterisk.org/view.php?id=16415 
====================================================================== 
Reported By:                tomo1657
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   16415
Category:                   Applications/app_voicemail
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     ready for testing
Asterisk Version:           SVN 
JIRA:                        
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:              2009-12-08 14:27 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.
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-12-08 14:27 lmadsen        OS                       RedHat Enterprise Linux
=> 
2009-12-08 14:27 lmadsen        os_build                 AS release 4 =>     
2009-12-08 14:27 lmadsen        Platform                 Linux =>            
2009-12-08 14:27 lmadsen        Build                    svn-trunk =>        
2009-12-08 14:27 lmadsen        Description Updated                          
2009-12-08 14:27 lmadsen        Steps to Reproduce Updated                    
======================================================================




More information about the asterisk-bugs mailing list