[asterisk-users] Generate Random Numbers in dialplan

Steve Edwards asterisk.org at sedwards.com
Fri Oct 13 19:49:13 MST 2006


Oops. I think you need something like this:

 	Backticks(<VARNAME>|<command>)

which can be found here:

 	http://www.pbxfreeware.org/app_backticks.c

On Fri, 13 Oct 2006, Jon Weisman wrote:

> Never mind...it does work!
>
> But how do I add its output to a variable?
>
> Thanks,
> Jon
>
> ----- Original Message ----- From: "Jon Weisman" <jweisman at ibell.net>
> To: "Asterisk Users Mailing List - Non-Commercial Discussion" 
> <asterisk-users at lists.digium.com>
> Sent: Friday, October 13, 2006 8:29 PM
> Subject: Re: [asterisk-users] Generate Random Numbers in dialplan
>
>
>> doesnt work :(
>> 
>> ----- Original Message ----- From: "Steve Edwards" 
>> <asterisk.org at sedwards.com>
>> To: "Asterisk Users Mailing List - Non-Commercial Discussion" 
>> <asterisk-users at lists.digium.com>
>> Sent: Friday, October 13, 2006 4:10 PM
>> Subject: RE: [asterisk-users] Generate Random Numbers in dialplan
>> 
>> 
>>> Well, you learn something new every day :)
>>> 
>>> FYI, $RANDOM returns a value between 0 and 32767.
>>> 
>>> On Fri, 13 Oct 2006, Alexander Lopez wrote:
>>> 
>>>> System(echo $RANDOM)
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> ________________________________
>>>> 
>>>> From: asterisk-users-bounces at lists.digium.com
>>>> [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Jon
>>>> Weisman
>>>> Sent: Friday, October 13, 2006 12:53 PM
>>>> To: Asterisk Users Mailing List - Non-Commercial Discussion
>>>> Subject: [asterisk-users] Generate Random Numbers in dialplan
>>>> 
>>>> 
>>>> 
>>>> Hi All,
>>>> 
>>>> 
>>>> 
>>>> Anyone know how to generate random numbers in the dial plan? I've tried
>>>> using the RAND function but it doesnt work. Basically I need to generate
>>>> a random 5 digit number everytime a particular extension is dialed and
>>>> then save that into a variable. Any ideas?
>>>> 
>>>> 
>>>> 
>>>> Thanks,
>>>> 
>>>> Jon
>>>> 
>>>> 
>>> 
>>> Thanks in advance,
>>> ------------------------------------------------------------------------
>>> Steve Edwards      sedwards at sedwards.com      Voice: +1-760-468-3867 PST
>>> Newline                                             Fax: +1-760-731-3000
>>> _______________________________________________
>>> --Bandwidth and Colocation provided by Easynews.com --
>>> 
>>> asterisk-users mailing list
>>> To UNSUBSCRIBE or update options visit:
>>>   http://lists.digium.com/mailman/listinfo/asterisk-users
>> 
>> 
>> _______________________________________________
>> --Bandwidth and Colocation provided by Easynews.com --
>> 
>> asterisk-users mailing list
>> To UNSUBSCRIBE or update options visit:
>>   http://lists.digium.com/mailman/listinfo/asterisk-users 
>
>
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>  http://lists.digium.com/mailman/listinfo/asterisk-users
>

Thanks in advance,
------------------------------------------------------------------------
Steve Edwards      sedwards at sedwards.com      Voice: +1-760-468-3867 PST
Newline                                             Fax: +1-760-731-3000


More information about the asterisk-users mailing list