Solved

Personalized ringback tones in Asterisk

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Inbound Internet connection - Temp 5 441
AIM-CUE installation on router 2811 2 75
Using 8x8, some callers get a busy signal when calling. 4 75
Shoretel Edge Gateway 5 63
The Zaptel people (www.zaptel.com) got kind of annoyed with the fact that they were getting bombarded with searches for the zaptel driver system for Asterisk (not to mention they own the trademark on zaptel). So, they kindly requested that Digium ch…
As companies replace their old PBX phone systems with Unified IP Communications, many are finding out that legacy applications such as fax do not work well with VoIP. Fortunately, Cloud Faxing provides a cost-effective alternative that works over an…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

786 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