FreePBX/PIAF – how to change default music on hold (MOH)

May 3rd, 2009

Before I go into showing how to change the default music on hold, I want to mention streaming MOH, there’s a great tutorial in this forum post “streaming music on hold“.

here’s a quick recap how to:

1. log into our asterisk server:

ssh user@AsteriskServerIP

2. install mpg123

cd /usr/bin
wget http://apt.sw.be/redhat/9/en/i386/RPMS.dag/mpg123-1.6.3-1.rh9.rf.i386.rpm
rpm -ivh mpg*.rpm
rm mpg123-1.6.3-1.rh9.rf.i386.rpm
amportal restart

3. log into your Asterisk web portal.
Music on hold > add streaming category >
Sample fields:
Category Name: Twitlive stream
Application: /usr/bin/mpg123 -q -s –mono -r 8000 -f 8192 -b 0 http://www.twit.am/listen
Optional Format: blank

4. now that you have your stream setup, you can select the MOH in your inbound routes.

but what about the internal extensions, whenever I put them on hold, they still hear the default MOH, so this is how you change the default:

5. edit /etc/asterisk/musiconhold_additional.conf

you should see the following:

[default]
mode=files
directory=/var/lib/asterisk/mohmp3/
random=yes
[none]
mode=files
directory=/dev/null
[twitlive-stream]
mode=custom
application=/usr/bin/mpg123 -q -s –mono -r 8000 -f 8192 -b 0 http://www.twit.am/listen

All you need to do is duplicate, the [twitlive-stream], rename it as default, and comment out the origina default with semi-colons, like this:

;[default]
;mode=files
;directory=/var/lib/asterisk/mohmp3/
;random=yes
[default]
mode=custom
application=/usr/bin/mpg123 -q -s –mono -r 8000 -f 8192 -b 0 http://www.twit.am/listen
[none]
mode=files
directory=/dev/null
[online-music]
mode=custom
application=/usr/bin/mpg123 -q -s –mono -r 8000 -f 8192 -b 0 http://www.twit.am/listen

Share this post:
  • digg
  • blinkbits
  • BlinkList
  • blogmarks
  • del.icio.us
  • Fark
  • feedmelinks
  • Furl
  • LinkaGoGo
  • NewsVine
  • Reddit
  • Spurl
  • Wists
  • YahooMyWeb

Entry Filed under: Tutorials

1 Comment Add your own

  • 1. Sam  |  May 27th, 2009 at 9:15 am

    test comment

Leave a Comment

You must be logged in to post a comment.

Trackback this post  |  Subscribe to the comments via RSS Feed


Calendar

February 2010
M T W T F S S
« May    
1234567
891011121314
15161718192021
22232425262728

Most Recent Posts