Asterisk tips Music Player Daemon as Music on Hold

Music Player Daemon is a centralized music player that i've falling in love with over the past weeks.
I listen to it all the time , at home , at work , and now , on asterisk aswell :)
This way , i never need to move mp3s around if i want to listen to some music i have, i can just connect to my stream , and continue listening where i left off.

These are just the config file changes i had to make to get this working ..

First some changes to asterisk :


default => custom:/var/lib/asterisk/mohmp3/,/usr/bin/


  1. !/bin/sh
/usr/bin/ogg123 -b 512 -p 50 -q -d raw -f - \
| /usr/bin/sox -w -s -t raw -r 44100 -c 2 - -b -c 2 -s -t raw -r 8000 - vol 0.25


exten => 4666,1,Answer
exten => 4666,2,Playback(pls-hold-while-try)
exten => 4666,3,SetMusicOnHold,default
exten => 4666,4,WaitMusicOnHold,300
exten => 4666,5,Hangup

Then some changes to music player daemon :


audio_output {
type "shout"
name "buZz"
host "localhost"
port "8000"
mount "/mpd.ogg"
password "xxxxxxxx"
quality "4.0"
format "44100:16:2"



Always remember to hardkill asterisk when making changes to this (just 'reload' on CLI wont work) , and killall -9 ogg123 when asterisk is not running ..
Created by: buzztiaan, Last modification: Sun 12 of Feb, 2006 (13:37 UTC)
Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+