Custom Music on Hold for Asterisk
Thu Jul 02 05:50:15 -0700 2009
I needed to change the music on hold for my Asterisk servers…
First, find your favorite music files in basically any format, get them somewhere where you can access them.
Then make sure you have ffmpeg installed, for mac users you can just do “port install ffmpeg” which can take a while as it has to install all the audio and video format libraries.
Go into the folder where you put the music files, and run the following (assuming you are on a UNIX client)
1 2 3 4 5 |
for f in `ls *.mp3` ; do FILE=$(basename $f .mp3) ; ffmpeg -i $FILE.mp3 -ar 8000 -ac 1 -ab 64 $FILE.wav \ -ar 8000 -ac 1 -ab 64 -f mulaw $FILE.pcm \ -map 0:0 -map 0:0 ; done |
This will change your “MP4” files into a PCM (ulaw) and WAV file format.
Then move the existing music on hold directory in asterisk to another name:
1 2 |
# mv /var/lib/asterisk/moh /var/lib/asterisk/moh-original # mkdir /var/lib/asterisk/moh |
Then install your new music files
1 2 |
# cp ~/*.pcm /var/lib/asterisk/moh/ # cp ~/*.wav /var/lib/asterisk/moh/ |
Then reload Asterisk and you should be good to go!
Mikel
Latest comments
- Mikel Lindsaar
Fixed now, thanks for the alert...
- Vidmantas
Hey, I think this one is unfini...
- Адриан
Думаю, эта тема с...
- Karl
I use this for email validation...
- karl baum
I use this for email validation...
- karl baum
I use this for email validation...
- Millisami
Evne in Rails 2.3.4, I'm having...
- Joel
speaking of bounced emails, doe...
- Brian McQuay
The TMail stuff isn't valid as ...
- Andrew Selder
I've noticed the same thing. Th...
- ara.t.howard
in all the years i've been vali...
- Francesco
grazie :)))...
- Валентин Родионов
Интересный пост, ...
- John H
Thanks. After10 minutes of pan...
- Khim
Thank you very much!!!!!!!! Tri...
- Joe
Terminator isn't working for me...
- Julio Lima
I've the same issue Pat is repo...
- Warren Stark
That was great. Thanks for the...
- Mario
How are you handling when your ...
- Georg Ledermann
After struggling with TMail in ...
Categories
Pages
Tag Cloud
AJAX ARGH! ActiveRecord Ajax Apache Apple Asterisk Australia Copy Database Development Feedburner Gem server Google Human Rights Javascript L. Ron Hubbard MS SQL Server MacOSX Mail Mephisto Not Programming OpenBSD Opensource Performance Personal Integrity PostgreSQL Programming Prototype Puzzle RDoc REST RESTful Rails RSPec RSpec Rails Rails Tips Rspec Ruby Ruby on Rails Ruby on Rails Tips Ruby on rails Tips SQL SQLServer SVN Scientologist Scientology Site Stats Soekris Soekris net5501 TMail Textmate Tips Windows World about mikel anti drug apache contributing daemon documentation drugs illustrator javascript lambda mail mephisto newspapers nitro open source opensource photoshop productivity programming railscasts rspec ruby ruby on rails rubyforge scientology seo sitemap sqlserver tips tmail tom cruise unix tricks vector graphicsArchives
- November 2009 (1)
- October 2009 (2)
- September 2009 (2)
- August 2009 (0)
- July 2009 (1)
- June 2009 (0)
- May 2009 (1)
- April 2009 (0)
- March 2009 (0)
- February 2009 (0)
- January 2009 (2)
- December 2008 (0)
- November 2008 (5)
- October 2008 (0)
- September 2008 (1)
- August 2008 (0)
- July 2008 (2)
- June 2008 (13)
- May 2008 (7)
- April 2008 (18)
- March 2008 (8)
- February 2008 (5)
- January 2008 (7)
- December 2007 (20)
- November 2007 (22)
No responses to “Custom Music on Hold for Asterisk”
Leave a Reply