[asterisk-bugs] [Asterisk 0010935]: No function for escaping shell characters

noreply at bugs.digium.com noreply at bugs.digium.com
Thu Oct 11 07:08:40 CDT 2007


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=10935 
====================================================================== 
Reported By:                arekm
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   10935
Category:                   Functions/General
Reproducibility:            always
Severity:                   feature
Priority:                   normal
Status:                     new
Asterisk Version:           1.4.12.1  
SVN Branch (only for SVN checkouts, not tarball releases): N/A  
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             10-10-2007 11:09 CDT
Last Modified:              10-11-2007 07:08 CDT
====================================================================== 
Summary:                    No function for escaping shell characters
Description: 
The problem is that you cannot use few variables as file name when
Monitor() is being used because some characters are not escaped.

Example:
MixMonitor(${STRFTIME(${EPOCH},,%Y%m%d-%H:%M:%S)}_EXTEN=${EXTEN}_CALLERID=${CALLERID(num)}_CHANNEL=${CHANNEL}_ID=${UNIQUEID}.wav)

That will work fine until CHANNEL is sip channel and it's name contains
"/" character.

It will be considered as directory path separator and saving to such file
will fail.

There is a need for QUOTE_SHELL() function that will escape all special
shell characters.
====================================================================== 

---------------------------------------------------------------------- 
 snuffy - 10-11-07 07:08  
---------------------------------------------------------------------- 
You must provide a patch for a feature request.

Why not just use the 'CUT()' function to remove the '/' ? 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
10-11-07 07:08  snuffy         Note Added: 0071810                          
======================================================================




More information about the asterisk-bugs mailing list