keeps returning 0


----- Original Message ----- From: "Alexander Lopez" <[EMAIL PROTECTED]> To: "Asterisk Users Mailing List - Non-Commercial Discussion" <[email protected]>
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..
_______________________________________________
--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

Reply via email to