[asterisk-users] how does "wrapuptime" work in queue.conf

Barry L. Kline blkline at attglobal.net
Thu Aug 27 14:32:44 CDT 2009


-----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-----



More information about the asterisk-users mailing list