Arrays In Asterisk
Hi,
I am experimenting with arrays in Asterisk. I am looking at https://wiki.asterisk.org/wiki/display/AST/Function_SHIFT and https://wiki.asterisk.org/wiki/display/AST/Asterisk+11+Function_ARRAY.
So for example I Do Set(FOO(1,2,3,4),20,30,40)
What would be the correct way to get both the key and value into an array?
I want to say for instance OPT=1 and then OPT_VAL. Then on the next interaction for OPT=2 and OPT_VAL etc.
Is this possible or am I looking at this wrong?
One thought on - Arrays In Asterisk
Just to be clear…
The use of sequential ascending numbers in all of the examples should not be construed as having any meaning. You could just as easily have:
same = n, set(ARRAY(foo,bar,baz,boo)=do,wop,be,bop)
—
Thanks in advance,
————————————————————————-
Steve Edwards sedwards@sedwards.com Voice: +1-760-468-3867 PST
https://www.linkedin.com/in/steve-edwards-4244281
—