[Home]

Summary:ASTERISK-15263: res_monitor.c chan->monitor->filename_base has duplicated path
Reporter:martin cabrera (galeras)Labels:
Date Opened:2009-12-02 19:16:14.000-0600Date Closed:2010-01-19 10:48:44.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Resources/res_monitor
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:When res_monitor is mixing the recorded files, calls soxmix with duplicate paths, for example:

res_monitor.c: monitor executing ( nice -n 19 soxmix "/var/spool/asterisk/monitor/outbound-20091202-195127-1259801487.116-in.wav" "/var/spool/asterisk/monitor/outbound-20091202-195127-1259801487.116-out.wav" "/var/spool/asterisk/monitor/outbound-20091202-195127-1259801487.116.wav"  && rm -f "/var/spool/asterisk/monitor/outbound-20091202-195127-1259801487.116-"* ) &

This happen for inbound calls to a queue. Always reproductible. It seems the problem is in chan->monitor->filename_base.

We debuged other variables with:

diff res_monitor.c res_monitor.c-20091202
329,333d328
<                       ast_log(LOG_DEBUG,"monitor execute %s\n",execute);
<                       ast_log(LOG_DEBUG,"monitor dir %s\n",dir);
<                       ast_log(LOG_DEBUG,"monitor absolute %s\n",absolute);
<                       ast_log(LOG_DEBUG,"monitor name %s\n",name);
<                       ast_log(LOG_DEBUG,"monitor format %s\n",format);

With this modified version, full shows:
res_monitor.c: monitor dir
res_monitor.c: monitor absolute
res_monitor.c: monitor name /var/spool/asterisk/monitor//var/spool/asterisk/monitor/q8007-20091202-195043-1259801443.107
res_monitor.c: monitor format wav

Comments:By: martin cabrera (galeras) 2009-12-02 19:18:08.000-0600

Sorry, the log really shows this:

res_monitor.c: monitor executing ( nice -n 19 soxmix "/var/spool/asterisk/monitor//var/spool/asterisk/monitor/q8007-20091202-195043-1259801443.107-in.WAV" "/var/spool/asterisk/monitor//var/spool/asterisk/monitor/q8007-20091202-195043-1259801443.107-out.WAV" "/var/spool/asterisk/monitor//var/spool/asterisk/monitor/q8007-20091202-195043-1259801443.107.WAV"  && rm -f "/var/spool/asterisk/monitor//var/spool/asterisk/monitor/q8007-20091202-195043-1259801443.107-"* ) &

By: martin cabrera (galeras) 2009-12-02 19:19:22.000-0600

The workaround was have a script replacing soxmix to correct the duplicate path.

By: dant (dant) 2009-12-04 11:03:14.000-0600

Patch attached to ASTERISK-15261

By: Digium Subversion (svnbot) 2009-12-21 13:43:42.000-0600

Repository: asterisk
Revision: 235940

U   branches/1.4/res/res_monitor.c

------------------------------------------------------------------------
r235940 | jpeeler | 2009-12-21 13:43:42 -0600 (Mon, 21 Dec 2009) | 13 lines

Change Monitor to not assume file to write to does not contain pathing.

227944 changed the fname_base argument to always append the configured monitor
path. This change was necessary to properly compare files for uniqueness.
If a full path is given though, nothing needs to be appended and that is
handled correctly now.

(closes issue ASTERISK-15263)
(closes issue ASTERISK-15261)
Reported by: bcnit
Patches:
     res_monitor.c-issue16376-1.patch uploaded by dant (license 670)

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

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

By: Digium Subversion (svnbot) 2009-12-21 13:54:21.000-0600

Repository: asterisk
Revision: 235941

_U  trunk/
U   trunk/res/res_monitor.c

------------------------------------------------------------------------
r235941 | jpeeler | 2009-12-21 13:54:20 -0600 (Mon, 21 Dec 2009) | 20 lines

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

........
 r235940 | jpeeler | 2009-12-21 13:43:41 -0600 (Mon, 21 Dec 2009) | 13 lines
 
 Change Monitor to not assume file to write to does not contain pathing.
 
 227944 changed the fname_base argument to always append the configured monitor
 path. This change was necessary to properly compare files for uniqueness.
 If a full path is given though, nothing needs to be appended and that is
 handled correctly now.
 
 (closes issue ASTERISK-15263)
 (closes issue ASTERISK-15261)
 Reported by: bcnit
 Patches:
       res_monitor.c-issue16376-1.patch uploaded by dant (license 670)
........

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

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

By: Digium Subversion (svnbot) 2009-12-21 13:54:56.000-0600

Repository: asterisk
Revision: 235942

_U  branches/1.6.0/
U   branches/1.6.0/res/res_monitor.c

------------------------------------------------------------------------
r235942 | jpeeler | 2009-12-21 13:54:56 -0600 (Mon, 21 Dec 2009) | 27 lines

Merged revisions 235941 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
 r235941 | jpeeler | 2009-12-21 13:54:20 -0600 (Mon, 21 Dec 2009) | 20 lines
 
 Merged revisions 235940 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 ........
   r235940 | jpeeler | 2009-12-21 13:43:41 -0600 (Mon, 21 Dec 2009) | 13 lines
   
   Change Monitor to not assume file to write to does not contain pathing.
   
   227944 changed the fname_base argument to always append the configured monitor
   path. This change was necessary to properly compare files for uniqueness.
   If a full path is given though, nothing needs to be appended and that is
   handled correctly now.
   
   (closes issue ASTERISK-15263)
   (closes issue ASTERISK-15261)
   Reported by: bcnit
   Patches:
         res_monitor.c-issue16376-1.patch uploaded by dant (license 670)
 ........
................

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

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

By: Digium Subversion (svnbot) 2009-12-21 13:55:26.000-0600

Repository: asterisk
Revision: 235943

_U  branches/1.6.1/
U   branches/1.6.1/res/res_monitor.c

------------------------------------------------------------------------
r235943 | jpeeler | 2009-12-21 13:55:26 -0600 (Mon, 21 Dec 2009) | 27 lines

Merged revisions 235941 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
 r235941 | jpeeler | 2009-12-21 13:54:20 -0600 (Mon, 21 Dec 2009) | 20 lines
 
 Merged revisions 235940 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 ........
   r235940 | jpeeler | 2009-12-21 13:43:41 -0600 (Mon, 21 Dec 2009) | 13 lines
   
   Change Monitor to not assume file to write to does not contain pathing.
   
   227944 changed the fname_base argument to always append the configured monitor
   path. This change was necessary to properly compare files for uniqueness.
   If a full path is given though, nothing needs to be appended and that is
   handled correctly now.
   
   (closes issue ASTERISK-15263)
   (closes issue ASTERISK-15261)
   Reported by: bcnit
   Patches:
         res_monitor.c-issue16376-1.patch uploaded by dant (license 670)
 ........
................

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

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

By: Digium Subversion (svnbot) 2009-12-21 13:58:42.000-0600

Repository: asterisk
Revision: 235944

_U  branches/1.6.2/
U   branches/1.6.2/res/res_monitor.c

------------------------------------------------------------------------
r235944 | jpeeler | 2009-12-21 13:58:42 -0600 (Mon, 21 Dec 2009) | 27 lines

Merged revisions 235941 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
 r235941 | jpeeler | 2009-12-21 13:54:20 -0600 (Mon, 21 Dec 2009) | 20 lines
 
 Merged revisions 235940 via svnmerge from
 https://origsvn.digium.com/svn/asterisk/branches/1.4
 
 ........
   r235940 | jpeeler | 2009-12-21 13:43:41 -0600 (Mon, 21 Dec 2009) | 13 lines
   
   Change Monitor to not assume file to write to does not contain pathing.
   
   227944 changed the fname_base argument to always append the configured monitor
   path. This change was necessary to properly compare files for uniqueness.
   If a full path is given though, nothing needs to be appended and that is
   handled correctly now.
   
   (closes issue ASTERISK-15263)
   (closes issue ASTERISK-15261)
   Reported by: bcnit
   Patches:
         res_monitor.c-issue16376-1.patch uploaded by dant (license 670)
 ........
................

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

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