Summary:ASTERISK-21814: "/" in TOUCH_MIXMONITOR is replaced by "-"
Reporter:Alex Epshteyn (aepshteyn)Labels:
Date Opened:2013-05-23 23:33:05Date Closed:2013-05-24 22:18:23
Versions: Frequency of
Description:specifying a full path for TOUCH_MIXMONITOR or TOUCH_MONITOR results in recorded file with "/" replaced by "-"

code in features.c shows this:

2278     for( x = 0; x < strlen(args); x++) {
  2279         if (args[x] == '/')
  2280             args[x] = '-';
  2281     }

Is this intentional?
Comments:By: Michael L. Young (elguero) 2013-05-24 16:29:21.258-0500

Can you post some debug information to help see what might be happening?

Can you post your dialplan that shows how TOUCH_MIXMONITOR or TOUCH_MONITOR are being set?



By: Alex Epshteyn (aepshteyn) 2013-05-24 18:20:16.509-0500

The relevant dialplan part looks like this:

Note absolute path (and 2 dashes in the name):

exten => s,n,Set(TOUCH_MONITOR=/tmp/test1)

-rw-r--r--. 1 asterisk asterisk    31390 May 24 15:54 auto-1369436033--tmp-test1-in.WAV

making path relative:

exten => s,n,Set(TOUCH_MONITOR=tmp/test2)

-rw-r--r--. 1 asterisk asterisk    12410 May 24 16:14 auto-1369437274-tmp-test2-out.WAV

In either case file are stored in /var/spool/asterisk/monitor directory. Please ignore -in and -out - irrelevant for the issue

By: Michael L. Young (elguero) 2013-05-24 22:18:03.448-0500


I would say yes, it is intended.  Seeing as how TOUCH_MONITOR has a prefix added to it, you can't use a path name when using auto Monitor or auto MixMonitor.  If you want to change the default path, look at astspooldir in asterisk.conf.

Since this doesn't appear to be a bug, I am going to close this out.

For future support questions, please use the mailing list, forum or irc. (http://www.asterisk.org/community)


By: Alex Epshteyn (aepshteyn) 2013-05-25 09:40:19.937-0500

i understand that the specified file name is further changed by adding a prefix, but i dont see how silently changing path into name is a correct behaviour. The code could use path as a path and add prefix to the file name or report path specification as an error. changing spool directory is not going to work for us. what we are trying to do is to set different path for different call recordings rather than storing them in the same location and moving afterwards. changing the root location won't really help

By: Michael L. Young (elguero) 2013-05-25 21:23:47.016-0500

Well, I guess the question is, whether it is documented that it is supposed to allow a path name?

Anyways, it looks like the intent was to create a quick, simple, on demand recording using automatic settings.  Hence, using default paths and filenames.  TOUCH_MONITOR allows a bit of customization but not complete control over the filename and the path.

Something I would check into in order to do what you want is perhaps using MixMonitor as a dynamic feature.  I am thinking that it would allow you to set the filename with the path you want and still have your on demand recording.