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

2007-05-05 Thread dave cantera
steve, thats Great... my C is old and ftw operated differently on sysV, solaris, sunos, ultrix, and osf... so I went back to bourne... couldn't work through the idiosyncracies of gnu autoconf, etc... although I have a many reasons to, I just couldn't get to production 'C' coding level...

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

2007-05-03 Thread Brandon Comouche
-Commercial Discussion Subject: [asterisk-users] using Playback() to play a random sound file 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

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

2007-05-03 Thread Steve Edwards
Steve Edwards wrote: On Tue, 1 May 2007, 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? I

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

2007-05-02 Thread Yuan LIU
From: Steve Edwards [EMAIL PROTECTED] Date: Tue, 1 May 2007 22:08:10 -0700 (PDT) On Tue, 1 May 2007, Yuan LIU wrote: From: Steve Edwards [EMAIL PROTECTED] Date: Tue, 1 May 2007 21:10:40 -0700 (PDT) On Tue, 1 May 2007, Jay Austad wrote: I've got a directory under /var/lib/asterisk/sounds

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

2007-05-02 Thread Steve Finkelstein
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

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

2007-05-02 Thread dave cantera
here is a way that I solved a similar problem... have a shell script that runs and indexes all the files in the directory into an ascii flat file with a format of filename 0001 directory/tt-weasels 0002 directory/tt-monkeys in your dialplan use the rand() to pick a number, pass it to the

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

2007-05-01 Thread Jay Austad
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 ___

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

2007-05-01 Thread Steve Edwards
On Tue, 1 May 2007, 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? I do this with an

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

2007-05-01 Thread Yuan LIU
From: Steve Edwards [EMAIL PROTECTED] Date: Tue, 1 May 2007 21:10:40 -0700 (PDT) On Tue, 1 May 2007, 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

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

2007-05-01 Thread Steve Edwards
On Tue, 1 May 2007, Yuan LIU wrote: From: Steve Edwards [EMAIL PROTECTED] Date: Tue, 1 May 2007 21:10:40 -0700 (PDT) On Tue, 1 May 2007, 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