[asterisk-users] Asterisk stopping for no reason

Motiejus Jakštys desired.mta at gmail.com
Mon May 3 01:03:46 CDT 2010


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 <avezina at vencomm.ca> wrote:
> 2010/4/30 Motiejus Jakštys <desired.mta at 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
>



More information about the asterisk-users mailing list