Saturday, May 26, 2012

Adding Music on Hold Via The Logitech Media Server



Adding Music on Hold Via The Logitech Media Server (aka Squeezebox Server)

I had an AHA moment this morning when I thought about my abismal music on hold situation on my asterisk server.   I checked my logs for the first time in awhile and found out that people waiting on hold hadn't been receiving music while on hold for quite some time because I migrated to a different mount point for a new raid array.


I did a little research and found out this article (Using Slimserver for Music on Hold )that I could already use the  Logitech Media Server's mp3 stream to loop thru a playlist of selected songs.



Here's how it works.


mkdir /var/lib/asterisk/mohmp3-dummy
touch /var/lib/asterisk/mohmp3-dummy/dummy.mp3

Install mpg123 if you don't have it already
Edit your musiconhold.conf. and note the location of mpg123.

[default]
mode=custom
dir=/var/lib/asterisk/mohmp3-dummy {COMMENT}daab{/COMMENT}
application=/usr/bin/mpg123 -q -r 8000 -f 8192 -s --mono http://localhost:9000/stream.mp3



Reload asterisk
asterisk -rx 'reload'


Go to your Logitech Media Server/Squeezebox server's website.   Usually http://ip:9000.  Click on the player pulldown and you should see an entry for mpg123 from ipaddress.


From there  start creating a playlist and don't forget to save it and set it on repeat.

No comments: