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

Asterisk Bug Tracker noreply at bugs.digium.com
Tue Dec 8 11:33:47 CST 2009


The following issue has been SUBMITTED. 
====================================================================== 
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:                     new
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 11:33 CST
====================================================================== 
Summary:                    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 11:33 tomo1657       New Issue                                    
2009-12-08 11:33 tomo1657       Asterisk Version          => SVN             
2009-12-08 11:33 tomo1657       Regression                => No              
2009-12-08 11:33 tomo1657       SVN Branch (only for SVN checkouts, not tarball
releases) =>  trunk          
2009-12-08 11:33 tomo1657       SVN Revision (number only!) => 233691          
======================================================================




More information about the asterisk-bugs mailing list