Language Translator

Hacking Zone

Hacking Tools
Attacking

Configure Windows

Windows Configuration

Novels

Mix Novels

Human Personality

Body Language
VoIPowering Your Office with Asterisk: Soothing the Savages with Hold Music PDF Print E-mail
Written by Carla Schroder   
Saturday, 19 January 2008
Article Index
VoIPowering Your Office with Asterisk: Soothing the Savages with Hold Music
Page 2
 

 

Configuring Asterisk
To use your nicely converted sound files, copy them to the /var/lib/asterisk/mohmp3 directory on your Asterisk server. Then edit /etc/asterisk/musiconhold.conf:


; Music on Hold
[default]
mode=files
directory=/var/lib/asterisk/mohmp3
random=yes
Asterisk will play them in sequence if you leave off the "random=yes" option.

Testing your new Hold Music
Create a test extension, using a high-numbered extension to avoid conflict with your real extensions. Add these lines to /etc/asterisk/extensions.conf:


exten => 9000,1,Answer
exten => 9000,n,SetMusicOnHold(default)
exten => 9000,n,WaitMusicOnHold(15)
exten => 9000,n,Hangup
Asterisk will answer this extension with music from the "Default" class for 15 seconds, then hang up.

Now restart Asterisk from the Asterisk CLI (see VoIPowering Your Office With Asterisk: Moving to the Grownup Version to learn about basic commands) to load the new sound files:

# asterisk -r
*CLI> restart gracefully

Now call extension 9000 and listen to your customized tunes.

Different sounds for different occasions
You may create a variety of directories containing sound files for different occasions. This is called creating music classes. Create a new sound files directory, then edit /etc/asterisk/musiconhold.conf to add the new class:


# mkdir /var/lib/asterisk/mohmp3/newclass

[newclass]
mode=files
directory=/var/lib/asterisk/mohmp3/newclass
You can test this new class just like the default class:

exten => 9000,1,Answer
exten => 9000,n,SetMusicOnHold(newclass)
exten => 9000,n,WaitMusicOnHold(15)
exten => 9000,n,Hangup
Sound files can go into any directory, as long as you enter the correct directory in the class definition.

Using streaming audio
If you have a reliable MP3 streaming audio source, such as Internet radio, you can pipe it into your Asterisk hold music. First create an empty directory, which in this example is /var/lib/asterisk/mohmp3/streaming. Then create the class this way, using the IP address of the stream:


[streaming]
/var/lib/asterisk/mohmp3/streaming,http://12.34.56.78/
 




Digg!Reddit!Del.icio.us!Google!Live!Facebook!Slashdot!Netscape!Technorati!StumbleUpon!Spurl!Wists!Simpy!Newsvine!Blinklist!Furl!Fark!Blogmarks!Yahoo!Smarking!Netvouz!Shadows!RawSugar!Ma.gnolia!PlugIM!Squidoo!BlogMemes!FeedMeLinks!BlinkBits!Tailrank!linkaGoGo!Free social bookmarking plugins and extensions for Joomla! websites! title=
Comments
Add NewSearch
Only registered users can write comments!

Copyright (C) 2007 Alain Georgette / Copyright (C) 2006 Frantisek Hliva. All rights reserved.



Last Updated ( Saturday, 19 January 2008 )
 
< Prev   Next >
Your Ad Here

Donate us!!

Enter Amount:

RSS socialnet

Add to MyYahoo!
Subscribe in NewsGator Online
Add to Newsburst
Add to Google
Add to My AOL
Add to Pluck
Subscribe in FeedLounge
Add to Windows Live
Add to NetVibes
Subscribe in Rojo
Subscribe in Bloglines
Add to MyMSN
Add to Plusmo for your cellphone
Add to PageFlakes
Add to Technorati
Add to BlinkBits