ARRAY(var1[,var2[,...]])
ARRAY() kann nur geschrieben,
nicht gelesen werden. Denken Sie daran, die nach dieser Funktion folgenden
Werte durch ein Komma zu trennen und dieses Komma durch Backslash
(\) zu escapen, da sonst von einem zweiten Parameter für
Set() ausgegangen würde!; var1 auf 1 und var2 auf 2 setzen: exten => 123,1,Set(ARRAY(var1,var2)=1\,2)
ARRAY() ist eine irreführende Funktion, die Sie
nicht brauchen. Verwenden Sie lieber mehrere
Set():Set(var1=wert1); Set(var2=wert2);
| | | 1.4 |————————| 1.6 |————————
-= Info about function 'ARRAY' =-
[Syntax]
ARRAY(var1[|var2[...][|varN]])
[Synopsis]
Allows setting multiple variables at once
[Description]
The comma-separated list passed as a value to which the function is set will
be interpreted as a set of values to which the comma-separated list of
variable names in the argument should be set.
Hence, Set(ARRAY(var1|var2)=1\,2) will set var1 to 1 and var2 to 2
Note: remember to either backslash your commas in extensions.conf or quote the
entire argument, since Set can take multiple arguments itself.--- in Asterisk 1.4
+++ in Asterisk 1.6
@@ -1,7 +1,7 @@
-= Info about function 'ARRAY' =-
[Syntax]
- ARRAY(var1[|var2[...][|varN]])
+ ARRAY(var1[,var2[...][,varN]])
[Synopsis]
Allows setting multiple variables at once
@@ -10,6 +10,4 @@
The comma-separated list passed as a value to which the function is set will
be interpreted as a set of values to which the comma-separated list of
variable names in the argument should be set.
- Hence, Set(ARRAY(var1|var2)=1\,2) will set var1 to 1 and var2 to 2
- Note: remember to either backslash your commas in extensions.conf or quote the
- entire argument, since Set can take multiple arguments itself.
+ Hence, Set(ARRAY(var1,var2)=1,2) will set var1 to 1 and var2 to 2.