D
D
Denis Sh2014-11-19 12:49:45
Asterisk
Denis Sh, 2014-11-19 12:49:45

How to organize a cycle in Asterisk?

Good afternoon
, there is a variable of the form
Set(dannie=1,2,4,3,5);
how can Asterisk loop through this variable using "," as a delimiter?
you can at least ael at least with standard extensions

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir, 2014-11-19
@Deq56

same => n,Set(dannie=1,2,4,3,5)
same => n,Set(X=1)
same => n,Set(DEV=${CUT(dannie,\,,1)})
same => n,While($[${EXISTS(${DEV})}])
same => n,NoOp(DEV = ${DEV})
same => n,Set(X=$[${X} + 1])
same => n,Set(DEV=${CUT(dannie,\,,${X})})
same => n,EndWhile()

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question