[asterisk-users] using Playback() to play a random sound file

Steve Finkelstein sf at stevefink.net
Wed May 2 07:47:33 MST 2007


Unless there is some native rand() function available in Asterisk, I'd
look into writing a simple AGI using Perl, PHP or Python to return back
a random file to Playback().

More information here: http://www.voip-info.org/wiki-Asterisk+AGI

HTH

- sf

Jay Austad wrote:
> I've got a directory under /var/lib/asterisk/sounds which contains a
> bunch of sound files.  I would like to call the Playback command to play
> the files, but I need it to select a file to play randomly.  Is there
> any way to do this?
> 
> ~jay
> _______________________________________________
> --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
> 
> !DSPAM:1020,46380d8a549331644115261!
> 


More information about the asterisk-users mailing list