Solved

Personalized ringback tones in Asterisk

Posted on 2009-04-01
4
1,655 Views
Last Modified: 2013-12-21
In Asterisk, when I use the Dial() application to connect a call, I need to play music to the caller instead of the normal ringback tone. I have used the m option to specify the music-on-hold class - e.g. exten=5000,1,Dial(5000,10,m(${ClassName})). This allows me to select one of a pre-defined set of music-on-hold classes.
However, I need more flexibility. I need to be able to specify the music filename on a per-call basis e.g. exten=5000,1,Dial(5000,10,m(${FileName}).
Is there a way to do this?
0
Comment
Question by:EHeaney
  • 2
  • 2
4 Comments
 
LVL 36

Expert Comment

by:grblades
ID: 24047580
The only way to do it would be to create lots of classes with each one configured to play back a specific filename. If you create a class with the same name as the filename to be played back then you can just specify that class name in the dial command.
0
 

Author Comment

by:EHeaney
ID: 24049072
Thanks grblades. Unfortunately, I can't use that approach.
What I am trying to do is to allow each Asterisk user to record his/her own set of MOH files. When a caller calls that user, a higher-level application will determine which of these files to play (instead of ring-back tone), on a per-call basis.
If I use the MOH classes, I would need to create an entry in the musiconhold.conf file for every music file in the system. This could number in the thousands (100 users with 10 files each).
Looks like re-design time...
0
 
LVL 36

Accepted Solution

by:
grblades earned 125 total points
ID: 24049378
http://blog.tmcnet.com/blog/tom-keating/asterisk/asterisk-160-beta5.asp
"* In conjunction with the realtime music on hold, a general section has
been added to musiconhold.conf, its sole variable is cachertclasses. If this
is set, then music on hold classes found in realtime will be cached in memory."

http://www.voip-info.org/wiki-Asterisk+RealTime

You should be able to have the musiconhold configuration stored in a database. The dialplan could then choose which file to play and update the music on hold configuration dynamically using a database call and then call the dial command to use that music on hold class.

I have never tried using asterisk realtime but its the only way I can think of doing it given the fact you want the audio to be played while the phone is ringing.
0
 

Author Closing Comment

by:EHeaney
ID: 31565480
Thanks for your help.
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Although VoiceOver IP has been around for a while, internet connections have only recently become fast enough to provide good call quality. Now, VoIP has become a real option for businesses looking at ways to improve their business model. In this ar…
Every year the snow affects people and businesses. According to the Federation of Small Businesses (FSB), in 2009, UK businesses lost an estimated £1.2bn (http://news.bbc.co.uk/1/hi/business/7864804.stm) because of bad weather. This article was c…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now