-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Andy Kuo wrote: > Hi Barry, > > Thank you for the hint, but I forgot to mention that we have a few > advertisements, and we want the callers to listen to only one at a > time, and in a round robin or random order. Using Playback() doesn't > seem to serve that purpose. Is there any better way to achieve that?
Use the RAND function to generate or pick a filename. exten => Set(advert=advert${RAND(1,10)}) exten => Playback(${advert}) That of course assumes that your advertisements are in files named advert1.xxx through advert10.xxx (where xxx is wav,sln,etc) Barry -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) iD8DBQFKlt9cCFu3bIiwtTARAktAAJ4wFexOIhfN3aCjoIr11MKueZk4swCeK7Xt RhKepfm4CplaaeCHwtbpzWI= =6ojM -----END PGP SIGNATURE----- _______________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- AstriCon 2009 - October 13 - 15 Phoenix, Arizona Register Now: http://www.astricon.net asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users