[asterisk-bugs] [Asterisk 0015259]: MixMonitor is not releasing the file handle on the recorded file

Asterisk Bug Tracker noreply at bugs.digium.com
Wed Jun 17 14:45:36 CDT 2009


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=15259 
====================================================================== 
Reported By:                travisghansen
Assigned To:                dvossel
====================================================================== 
Project:                    Asterisk
Issue ID:                   15259
Category:                   Applications/app_mixmonitor
Reproducibility:            always
Severity:                   block
Priority:                   normal
Status:                     closed
Target Version:             1.6.1.2
Asterisk Version:           1.6.1.0 
Regression:                 No 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
Resolution:                 fixed
Fixed in Version:           
====================================================================== 
Date Submitted:             2009-06-02 22:21 CDT
Last Modified:              2009-06-17 14:45 CDT
====================================================================== 
Summary:                    MixMonitor is not releasing the file handle on the
recorded file
Description: 
I have been using MixMonitor in my dialplan through all the 1.6.0.x line
and recently updated to 1.6.1.0.  Upon update it quit working.

My scenario is as follows:

I accept an incoming call, prompt for some IVR, start MixMonitor with b
option.  Subsequently I initiate a Dial command to an external endpoint. 
On answer the conversation starts recording to a temp directory on my
server.  After either end hangs up, the dialplan continues to the h
extension where I launch an AGI script to convert the wav sound clip to mp3
and do some other post processing.

In all builds prior to 1.6.1 this all worked great.  However starting with
1.6.1 when I externally launch the sox command via the agi script the
resultant file has no audio.  I did some testing and discovered that this
behavior is the same as if I am mid-call even though the line is hung up.
====================================================================== 

---------------------------------------------------------------------- 
 (0106573) svnbot (reporter) - 2009-06-17 14:45
 https://issues.asterisk.org/view.php?id=15259#c106573 
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 201445

_U  trunk/
U   trunk/apps/app_mixmonitor.c

------------------------------------------------------------------------
r201445 | dvossel | 2009-06-17 14:45:35 -0500 (Wed, 17 Jun 2009) | 25
lines

Merged revisions 201423 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r201423 | dvossel | 2009-06-17 14:28:12 -0500 (Wed, 17 Jun 2009) | 19
lines
  
  StopMixMonitor race condition (not giving up file immediately)
  
  StopMixMonitor only indicates to the MixMonitor thread to stop
  writing to the file.  It does not guarantee that the recording's
  file handle is available to the dialplan immediately after execution.
  This results in a race condition.  To resolve this, the filestream
  pointer is placed in a datastore on the channel. When StopMixMonitor
  is called, the datastore is retrieved from the channel and the
  filestream is closed immediately before returning to the dialplan.
  Documentation indicating the use of StopMixMonitor to free files
  has been updated as well.
  
  (closes issue https://issues.asterisk.org/view.php?id=15259)
  Reported by: travisghansen
  Tested by: dvossel
  
  Review: https://reviewboard.asterisk.org/r/283/
........

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

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

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2009-06-17 14:45 svnbot         Checkin                                      
2009-06-17 14:45 svnbot         Note Added: 0106573                          
======================================================================




More information about the asterisk-bugs mailing list