Summary:ASTERISK-15977: Using SORT strings with comma in them are truncated up to the first comma.
Reporter:MartinB (freon1)Labels:
Date Opened:2010-04-20 05:55:40Date Closed:2011-06-07 14:01:01
Versions:Frequency of
Description:Working on converting from version 1.4 to 1.6.2 (or 1.6.1) I encountered a problem in string manipulation.
There is an issue with SORT and a subsequent string manipulation function after it. SORT works properly and produces a sorted comma delimited string.  Although, I couldn't make it produce result with any other delimiter.  For example, the "|" delimitation doesn't work anymore.  When a CUT or even SET (to copy) is used these functions only see the first field of the string (up to the first comma), all the rest of the string beyond the first comma is lost.

I have tested this on versions and with the same result.  Various version 1.4 work without any problems.

I suspect there could be problem with any comma delimited string manipulation and this may not be only a SORT and CUT or SET issue.


   -- Executing [445566@from-sip:1] Set("SIP/", "Tlist=1,2,3,4") in new stack
result for Set(bar=${Tlist}):
   -- Executing [445566@from-sip:2] Set("SIP/", "bar=1") in new stack    
result for Set(foo=${Tlist:0:1}):
   -- Executing [445566@from-sip:3] Set("SIP/", "foo=1") in new stack
result for Set(rt3=${Tlist:2:1}):
   -- Executing [445566@from-sip:4] Set("SIP/", "rt3=") in new stack
result for Set(rt3=${CUT(Tlist,\,,3)})
   -- Executing [445566@from-sip:5] Set("SIP/", "rt4=") in new stack
Comments:By: Tilghman Lesher (tilghman) 2010-04-20 10:12:27

Please add the following to asterisk.conf and restart:


By: Paul Belanger (pabelanger) 2010-05-03 09:42:33

Suspended due to lack of activity. Please request a bug marshal in #asterisk-bugs on the IRC network irc.freenode.net to reopen the issue should you have the additional information requested.

Further information can be found at http://www.asterisk.org/developers/bug-guidelines