Discussion: Asterisk cmd Ices

Comments Filter

Re: yeah, but what about mp3 streams?

Got streaming to ICECAST in OGG format. Need it in MP3.... tried your steps and my results are that the mountpoint is created for a few seconds but then goes away. Not sure what the issue is... do you have any updates to your instructions?

by jbarnes, Saturday 10 of March, 2012 (13:33:25 UTC)
This is how you would save/record mp3 streams

ices provided the configfile option to save .ogg stream. If you wanted to do the same for mp3 streams, you need to do the following.

In the step 6 above of creating mp3 streams, use the following script and rename it as ices as mentioned in that step.

"lame -r -x -s 8 -m mono --preset cbr 64 - - 2> /dev/null | tee filename | ezstream -qvc $1"

The unix 'tee' command will save the mp3 audio to a file called 'filename' as well send it to stdout.

by madhuri, Thursday 27 of September, 2007 (06:46:55 UTC)
yeah, but what about mp3 streams?

ices2 does not handle mp3 streams. ices0 does, but can only take input from a file, not from stdin - which means you cannot stream live audio. you may use ezstream to feed your icecast server with mp3. this is what you need.

(1) if you havent done so already, download and install lame (the mp3 encoder). make sure you read the licensing info at the end of the faq on their web page.

(2) download an install ezstream.

(3) create a config file for ezstream, call it asterisk-ezstream.xml, with this contents:

<!-- used for mp3 streaming from asterisk, input source is lame output -->
<!-- icecast server data -->

<!-- we get the input from stdin -->

<!-- stream information - personalize this -->
<svrinfoname>dude, i'm streaming audio from asterisk!</svrinfoname>
<svrinfodescription>blah blah</svrinfodescription>

(4) asterisk's app_ices sends the audio output (pcm samples) to stdout. these will be encoded to mp3 with lame. lame will also send its output to stdout, and ezstream will take over to feed it to your icecast server.

(5) asterisk's app_ices hardcodes the name of the application to call. it expects an executable called ices in /usr/bin/ or /usr/local/bin/ so we have to make it happy. therefore instead of launching the real ices, we will replace it with a script. well, ok, this doesnt sound very nice, so later on you may want to transform app_ices into app_streaming, get a choice of the application you want to run, have a different name to put in extensions.conf for it, and so on. for this quick and dirty demo though, read on.

(6) create a script in /usr/local/bin/

lame -r -x -s 8 -m mono --preset cbr 64 - - 2> /dev/null | ezstream -qvc $1

name it "ices" and chmod and chown it to make it executable.

(7) replace the name of the file in exten => 103,2,... in barton's example with the path and filename of your ezstream config file, and do an extensions reload.

(8) do that trick with generating the calls.

(9) point your browser to the ices server. according to the ezstream config file above, the url should be http://my.server.com:8000/mountpoint.m3u (notice the m3u at the end).

(10) enjoy the sound of elevator music.

by radum, Thursday 19 of July, 2007 (15:04:02 UTC)
volume problems

This page is great - it's basically the only documentation I've found for this command anywhere at all. I've been using it for a while, and the audio stream is created just fine, and I can connect and listen without trouble.

The only issue I've been finding is that the volume level is very low - it's audible, but it's much quieter to listen to the channel via icecast than over the normal asterisk channels (dialing in to the same meetme conference). Any idea what could be the problem here? Or is there a way to boost the volume?

by jaddle, Friday 11 of May, 2007 (16:10:50 UTC)