Summary: | ASTERISK-13699: Set(ARRAY(var1,var2)=1,2) not working | ||
Reporter: | Peter Holik (peterh) | Labels: | |
Date Opened: | 2009-03-05 03:01:36.000-0600 | Date Closed: | 2011-06-07 14:08:12 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Functions/func_strings |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ||
Description: | [arraytest] exten => s,1,Set(ARRAY(var1,var2)=1\,2) exten => s,n,NoOp(<${var1}><${var2}>) exten => s,n,Set(ARRAY(var1,var2)="1,2") exten => s,n,NoOp(<${var1}><${var2}>) exten => s,n,Set(ARRAY(var1,var2)=1,2) exten => s,n,NoOp(<${var1}><${var2}>) exten => s,n,Hangup [default] exten => 0123456,n,Goto(arraytest,s,1) -- Executing [s@arraytest:1] Set("DAHDI/31-1", "ARRAY(var1,var2)=1\,2") in new stack -- Executing [s@arraytest:2] NoOp("DAHDI/31-1", "<1><2>") in new stack -- Executing [s@arraytest:3] Set("DAHDI/31-1", "ARRAY(var1,var2)="1,2"") in new stack -- Executing [s@arraytest:4] NoOp("DAHDI/31-1", "<1><2>") in new stack -- Executing [s@arraytest:5] Set("DAHDI/31-1", "ARRAY(var1,var2)=1,2") in new stack [Mar 5 10:01:48] WARNING[901]: pbx.c:8122 pbx_builtin_setvar_multiple: MSet: ignoring entry '2' with no '=' (in s@arraytest:5 -- Executing [s@arraytest:6] NoOp("DAHDI/31-1", "<1><>") in new stack -- Executing [s@arraytest:7] Hangup("DAHDI/31-1", "") in new stack | ||
Comments: | By: Mark Michelson (mmichelson) 2009-03-06 13:42:35.000-0600 I've assigned this to tilghman since this seems like something he'd be able to address easily. Tilghman, if you think I've misassigned this, let me know. By: Walter Doekes (wdoekes) 2009-03-08 04:45:43 http://bugs.digium.com/view.php?id=14614 is a duplicate of this bug. That one addresses version 1.4-svn and is miscategorized in func_odbc (using func_odbc was when I first encountered the problem). Someone may safely close bug 14614 if any fix is applied to 1.4 as well. ADDENDUM: Well, it's not actually the same behaviour as in 1.4. I'll post the debug output of the [arraytest] in 1.4-svn when I get back to work. By: Tilghman Lesher (tilghman) 2009-03-08 20:39:36 Please set: [compat] app_set=1.6 in /etc/asterisk/asterisk.conf and try again. By: Walter Doekes (wdoekes) 2009-03-09 03:49:57 Ahyes tilghman, you are right and I was wrong. The above output is as my O'Reilly book says it should be: escape the comma if you want to use it as a separator (and never use unescaped comma's). I am confused about how I would about getting an argument with a comma in an ARRAY. But that's rather a non-issue, as one could do multiple Set's. Sorry about the confusion. By: Peter Holik (peterh) 2009-03-09 04:17:48 with [compat] app_set=1.6 i got -- Executing [s@arraytest:1] Set("DAHDI/31-1", "ARRAY(var1,var2)=1\,2") in new stack -- Executing [s@arraytest:2] NoOp("DAHDI/31-1", "<1,2><>") in new stack -- Executing [s@arraytest:3] Set("DAHDI/31-1", "ARRAY(var1,var2)="1,2"") in new stack -- Executing [s@arraytest:4] NoOp("DAHDI/31-1", "<1,2><>") in new stack -- Executing [s@arraytest:5] Set("DAHDI/31-1", "ARRAY(var1,var2)=1,2") in new stack -- Executing [s@arraytest:6] NoOp("DAHDI/31-1", "<1><2>") in new stack Set(ARRAY(var1,var2)="1,2") is no longer working but Set(ARRAY(var1,var2)=1,2) works now By: Tilghman Lesher (tilghman) 2009-03-09 12:06:06 peterh: correct, as it should be. The O'Reilly book is documenting behavior in 1.4, not 1.6. |