Asterisk: Streaming source for Music On Hold
Sunday, July 27th, 2008I didn’t install voicemail, sounds etc. I have no mp3 files on my asterisk.
Jan 1 00:44:48 NOTICE[1254]: res_musiconhold.c:507 monmp3thread: Request to schedule in the past?!?!
Jan 1 00:44:48 WARNING[1254]: res_musiconhold.c:336 spawn_mp3: /var/lib/asterisk/mohmp3 is not a valid directory
Jan 1 00:44:48 WARNING[1254]: res_musiconhold.c:488 monmp3thread: Unable to spawn mp3player
Shoutcast Music On Hold
You can have asterisk use a streaming source for on-hold music.
Make a directory and put a 0 size file ending in .mp3.
I called my directory: /var/lib/asterisk/mohmp3-empty
in musiconhold.conf, add a line such as:
default => mp3:/var/lib/asterisk/mohmp3-empty,http://www.waixwave.com:8000/
Alternative method –
The initial method seems to not work in 1.2 & +. You can use the method below, doing a custom application and calling mpg123, and specifying your shoutcast source.
default
mode=custom
dir=/var/lib/asterisk/mohmp3-empty
application=/usr/local/bin/mpg123 -q -r 8000 -f 8192 -s –mono http://213.186.41.160:8000/
