Solved

Personalized ringback tones in Asterisk

Posted on 2009-04-01
4
1,741 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

Suggested Solutions

In my office we had 10 Cisco 7940G IP phones that were useless as they were showing PROTOCOL APPLICATION INVALID when started. I searched through Google and worked for a week continuously on those phones, and finally got them working. This is a di…
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…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

730 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