Name

ARRAY — Allows one to define several variables at one time

Synopsis

ARRAY(var1[|var2[...][|varN]])

The comma-separated list, which the function equals, will be interpreted as a set of values to which the comma-separated list of variable names in the argument should be set. This function may only be set, not read.

; Set var1 to 1 and var2 to 2.
exten => 123,1,Set(ARRAY(var1,var2)=1\,2)

Tip

Remember to either backslash your commas in extensions.conf or quote the entire argument, since Set() can take multiple arguments itself.

See Also

Set()

Get Asterisk: The Future of Telephony, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.