Icecast stream for MOH for radio show

I’m trying to get streaming MOH to work. This is for a call-in radio show/podcast. Just as in a real radio station, I want people to be able to hear the live program feed that’s coming out of my mixer. It’s coming into my computer just fine via USB.

I’ve created an icecast server on my local machine, configured it with but(t) encoder and it’s streaming just fine. I can open the stream in VLC and it plays fine.

When I copy the IP address of the icecast server into the streaming string in the MOH settings of FreePBX (mpg 123 string), save the config etc, when I put a call on hold, I just get silence. I’ve verified this is working because I’ve copied other IPs of internet radio stations and they work just fine.

In but(t), I’m using MP3 codec at 8 khz. What am I doing wrong?

I’m using the default IP address that icecast gives which is []. I’ve also used the localhost:8000 address with no results.I could shoutcast the program feed out to the internet… but it would be delayed and from what I’ve read here on the forum can actually bog down the server quite a bit if there are multiple people on hold.

I see that there are older topics on this, but they mostly have to do with inserting a physical audio IN, and routing that to the MOH.

Are there only certain stream types that Asterisk uses?

Thanks for any help.

MP3 not natively supported by asterisk, best to use a mono 16 bit 8k sample rate stream ( 16bit signed PCM, ‘wav’ all describe the same) it also needs to be readable by the asterisk user. ffmpeg can inline convert.

1 Like

So ffmpeg can conver the mp3 stream to pcm stream?

mpg123, ffmpeg, sox (maybe you need to install libsox-fmt-mp3 ), vlc or any number of others, choose your weapon of choice.

Thanks for the info. I’m not familiar with how to do this. Is there an article you can point me to? The stream is coming out of Icecast as m3u. I tried

/usr/bin/mpg123 -q -s --mono -r 8000 -f 8192 -b 1024 -w output.wav input.mp3 http://‘’/stream.m3u

used quotes on the IP because i’m a new user, haha.

generally linux uses ‘-’ as a file descriptor for stdin and sdout , so for streaming, you would use ‘-’ as the input file and ‘-’ for the output file, when you do that , there is no “file extension” so you need to define exactly the input and output format , to use the stream as a Music-On-Hold destination, google and the wiki above are good sources of recipes.

1 Like

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.