Solved

Personalized ringback tones in Asterisk

Posted on 2009-04-01
4
1,714 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

Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
There are no good configuration guides for HP-H3C router to LYNC on the web. :( Big statement, but we havent been able to find one yet. We did find the following document useful, but the information was not enough to use H3C router for use as a L…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

790 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