[Asterisk-Users] Random Sound File

Ed Greenberg edg at greenberg.org
Tue May 24 06:22:30 MST 2005


AGI script in Perl (or whatever) should do it easily.

Get a random number between 1 and n.... then index into a list of files. 
Then either play the file from the AGI script or just return it's name in a 
variable for later playing.

</edg>




--On Tuesday, May 24, 2005 2:01 PM +0100 "Marshall, Ed" 
<ed.marshall at cetelem.co.uk> wrote:

> Does anyone know of a way to play a random sound file in a given
> directroy. Ideally I want to incorporate the random play with the
> Asterisk 'Read' command, however any other suggestions would be good.
>
> Cheers
> Ed
>
>
>
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users







More information about the asterisk-users mailing list