[asterisk-bugs] [Asterisk 0017115]: When providing a delemeter character, placing it betwenn apostrophy signs does not work. CUT retruns the shole string in this ca

Asterisk Bug Tracker noreply at bugs.digium.com
Tue Mar 30 10:00:18 CDT 2010


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=17115 
====================================================================== 
Reported By:                roland65
Assigned To:                tilghman
====================================================================== 
Project:                    Asterisk
Issue ID:                   17115
Category:                   Functions/func_cut
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     feedback
Asterisk Version:           1.6.2.6 
JIRA:                        
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2010-03-30 07:04 CDT
Last Modified:              2010-03-30 10:00 CDT
====================================================================== 
Summary:                    When providing a delemeter character, placing it
betwenn apostrophy signs does not work. CUT retruns the shole string in this ca
Description: 
The following example fails:
exten => 123,1,Set(foo=1 2 3 4 5)
exten => 123,n,Set(foo=${CUT(foo,' ',2)})

which means that instead of returning the second space separated field,
CUT returns the whole string.

A work-around is to replace the ' apostrophy sign by double quotes like:

exten => 123,1,Set(foo=1 2 3 4 5)
exten => 123,n,Set(foo=${CUT(foo," ",2)})

This correctly returns 2.

====================================================================== 

---------------------------------------------------------------------- 
 (0120003) tilghman (administrator) - 2010-03-30 10:00
 https://issues.asterisk.org/view.php?id=17115#c120003 
---------------------------------------------------------------------- 
In fact, what you've done here is to specify the delimiter as the
apostrophe. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2010-03-30 10:00 tilghman       Note Added: 0120003                          
======================================================================




More information about the asterisk-bugs mailing list