RAND(min
,max
)
(beginning Asterisk 1.4)
Returns a randomly-generated number between
min
and max
inclusive. The default for min
is 0, for max
the default is the largest integer supported by the system (usually 2147483647).; Choose a random number between 1 and 10 (inclusive): exten => 123,1,Set(coincidence=${RAND(1,10)}) ; Game of chance: exten => 123,1,GotoIf($[${RAND(0,100)} < 25]?won:lost) exten => won,1,Playback(won) exten => won,n,Goto(123,1) exten => lost,1,Playback(lost) exten => lost,n,Goto(123,1)
No hay comentarios:
Publicar un comentario