Re: [asterisk-users] Generate Random Numbers in dialplan

2006-10-13 Thread Jon Weisman
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

RE: [asterisk-users] Generate Random Numbers in dialplan

2006-10-13 Thread Alexander Lopez
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.. ___

Re: [asterisk-users] Generate Random Numbers in dialplan

2006-10-13 Thread Jon Weisman
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:

Re: [asterisk-users] Generate Random Numbers in dialplan

2006-10-13 Thread Steve Edwards
- 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

Re: [asterisk-users] Generate Random Numbers in dialplan

2006-10-13 Thread Jon Weisman
[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

Re: [asterisk-users] Generate Random Numbers in dialplan

2006-10-13 Thread Jon Weisman
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

RE: [asterisk-users] Generate Random Numbers in dialplan

2006-10-13 Thread Steve Edwards
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

RE: [asterisk-users] Generate Random Numbers in dialplan

2006-10-13 Thread Alexander Lopez
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,