Suggestion for you: exten => _X.,n,MP3Player(/dir/to/your/mp3/directory/)
You could try changing /usr/bin/wget -q -O - $1 | /usr/bin/madplay -Q -z -o raw:- --mono -R to something like /bin/cat $1/`ls $1 | shuf | head -1` | /usr/bin/madplay -Q -z -o raw:- --mono -R Sorry, didn't notice the version in the 1st post. Good luck On Fri, Apr 30, 2010 at 5:54 PM, Alexandre Vézina <avez...@vencomm.ca> wrote: > 2010/4/30 Motiejus Jakštys <desired....@gmail.com> >> >> Hi, >> please always add asterisk version to your query. > > I am using Asterisk 1.4.17~dfsg-2ubuntu1.1 on an Ubuntu 8.04.4 server. > >> >> I managed to run internet radio (that streams MP3) within asterisk. >> Minor change is nescesarry to make it work with random MP3s. >> >> My Dialplan: >> exten => _X.,n,Answer() >> exten => _X.,n,MP3Player(http://stream.m-1.fm/m1/mp3) >> >> $ cat /usr/bin/mpg123 >> >> #!/bin/bash >> /usr/bin/wget -q -O - $1 | /usr/bin/madplay -Q -z -o raw:- --mono -R >> 8000 -a -6 - >> >> You should change the WGET part to something that better suits your needs. >> >> Tested on asterisk 1.4.27 > > Good. > Is there a way to set random in "files" mode? > > > > -- > _____________________________________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > New to Asterisk? Join us for a live introductory webinar every Thurs: > http://www.asterisk.org/hello > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users > -- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users