Search:
     
3CX Phone System for Windows Download the Free Edition

Asterisk func rand

Synopsis:

 Choose a random number in a range

Description:

 RAND(min,max)
 
Choose a random number between min and max. Min defaults to 0, if not
specified, while max defaults to RAND_MAX (2147483647 on many systems).
 

Notes


  • *CLI> core show function RAND

  • This functions is only availible in 1.4 and later.

Return value

Returns the resulting number.

Example

exten => s,1,Set(junky=${RAND(1,8)});
    - Sets junky to a random number between 1 and 8, inclusive.

See also


Created by: murf,Last modification on Fri 05 of Nov, 2010 [09:27 UTC] by admin


Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - support@voip-info.org

Page Changes | Comments

 





Search: