Music on Hold Problem - Streaming from MPD (Music Player Daemon)

guldevec
Joined: Mon 14 of Dec, 2009

Re: Music on Hold Problem - Streaming from MPD (Music Player Daemon)

Posted:Tue 15 of Dec, 2009 (06:59 UTC)
Thanks to Nigel...

got it working using the following in mohstream.sh

/usr/local/bin/ogg123 -q -d wav -f - http://192.168.71.100:8000/mpd.ogg | /usr/local/bin/sox -t wav - -b 16 -c 1 -s -t raw -r 8000 - vol 0.25
guldevec
Joined: Mon 14 of Dec, 2009

Music on Hold Problem - Streaming from MPD (Music Player Daemon)

Posted:Mon 14 of Dec, 2009 (07:11 UTC)
Hello,

I am currently trying to get MOH in Asterisk 1.4.25 on my server ( ICE ) to obtain it's MOH stream from another server in my network ( RAINDROP ) ..

I know the stream is running correctly as i can connect to it via winamp... I have had minor garbled audio from asterisk at times when testing but no real quality...

my mpd.conf on RAINDROP

music_directory "/usr/local/music"
playlist_directory "/usr/local/etc/mpd/playlists"
db_file "/usr/local/etc/mpd/mpd.db"
log_file "/usr/local/etc/mpd/mpd.log"
error_file "/usr/local/etc/mpd/mpd.error"
state_file "/usr/local/etc/mpd/mpdstate"

audio_output {
type "oss"
name "My OSS Device"
device "/dev/dsp" # optional
format "44100:16:2" # optional
mixer_device "/dev/mixer" # optional
mixer_control "PCM" # optional
}


audio_output {
type "httpd"
name "My HTTP Stream"
encoder "vorbis" # optional, vorbis or lame
port "8000"
bitrate "128" # do not define if quality is defined
format "44100:16:1"
}



I've been using phpmp and it's a great interface to change stuff...


On ICE ( the asterisk box - running FreeBSD 7.2 )

in musiconhold.conf i've tried the below with no luck

[mpdmoh]
mode=custom
dir=/usr/local/etc/asterisk/mohmp3-empty
application=/usr/local/bin/ogg123 -q -r 8000 -f 8192 -s --mono http://192.168.71.100:8000/

[sol]
mode=custom
directory=/usr/local/share/asterisk/mohmp3
application=/usr/local/etc/asterisk/mohstream.sh


where mohstream.sh is

#!/bin/csh
/usr/local/bin/wget -q -O - http://192.168.71.100:8000/mpd.ogg | /usr/local/bin/madplay -Q -z -o raw:- --mono -R 8000 -a -12 -



any suggestions ???