[cisco-voip] Random Number Generator

Bernhard Albler bernhard.albler at gmail.com
Tue Jun 14 15:33:17 EDT 2011


> Do any of you geniuses — and you know who you are — have a simple random
> number generator script that would work with IPCC 4.0(4)?  Just want it to
> randomly give me an integer between 0 and 9 when it’s called.
>
I think you should be able to do that just by using some java classes.
Top of head for current versions of crs (should work with 4.0 also i
believe)
1.)define a variable of type java.util.Random . So basically in the
script editor define a variable (let's call it randomGen) and give it
type java.util.Random and under value "new java.util.Random()"
2.) use a set step for your integer and define as input (set xyz=...):
randomGen.nextInt(9)
This should give you a number from 0 to 9.
Don't have a IPCC next to me right now but will try this out tomorrow...
cheers
bernhard



More information about the cisco-voip mailing list