keeps returning 0
- Original Message -
From: "Alexander Lopez" <[EMAIL PROTECTED]>
To: "Asterisk Users Mailing List - Non-Commercial Discussion"
Sent: Friday, October 13, 2006 11:14 PM
Subject: RE: [asterisk-users] Generate Random Numbers in dialplan
You may need to wrap it in an AGI.
Like so:
Createrandnum.agi:
#!/bin/sh
RANDNUM=`echo $RANDOM$RANDOM | cut -c1-5'` echo "SET VARIABLE
asteriskrandom $RANDNUM \"\"\n"
Call it with:
Exten => s,1,AGI(createrandom)
your should then have the variable ${ASTERISKRANDOM} in your channel
snip..
___
t; <[EMAIL PROTECTED]>
To: "Asterisk Users Mailing List - Non-Commercial Discussion"
Sent: Friday, October 13, 2006 10:49 PM
Subject: Re: [asterisk-users] Generate Random Numbers in dialplan
Oops. I think you need something like this:
Backticks(|)
which can be found here:
- From: "Jon Weisman" <[EMAIL PROTECTED]>
To: "Asterisk Users Mailing List - Non-Commercial Discussion"
Sent: Friday, October 13, 2006 8:29 PM
Subject: Re: [asterisk-users] Generate Random Numbers in dialplan
doesnt work :(
- Original Message - From
[asterisk-users] Generate Random Numbers in dialplan
doesnt work :(
- Original Message -
From: "Steve Edwards" <[EMAIL PROTECTED]>
To: "Asterisk Users Mailing List - Non-Commercial Discussion"
Sent: Friday, October 13, 2006 4:10 PM
Subject: RE: [asteris
doesnt work :(
- Original Message -
From: "Steve Edwards" <[EMAIL PROTECTED]>
To: "Asterisk Users Mailing List - Non-Commercial Discussion"
Sent: Friday, October 13, 2006 4:10 PM
Subject: RE: [asterisk-users] Generate Random Numbers in dialplan
Well, you
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: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jon
Weisman
Sent: Friday, October
System(echo $RANDOM)
From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 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,