[App_rpt-users] Custom Sound Files

Stephen Rodgers sales at qrvc.com
Fri Jul 31 00:21:33 EDT 2009

Eagle Link Customer Service wrote:
> Here's a challenge for the people who know the programming.  I'm trying to 
> figure out how to make the repeater play a sound file when enableing or 
> disableing things.  Right now it just says the letters one at a time, like 
> RPTENA or TOTENA/TOTDIS.  I would like it to be able to play a custom sound 
> file (if it exists) in the sounds/rpt directory.  I tried playing around 
> with the source code a bit to make this happen for the last 3 hours, but I 
> failed.  Surprisingly I didn't run into many errors compiling (I did fix the 
> ones I got), but I just couldn't get it to play anything.  Any ideas?
> Jeff
> _______________________________________________
> App_rpt-users mailing list
> App_rpt-users at qrvc.com
> http://qrvc.com/mailman/listinfo/app_rpt-users


The sayfile() function is your friend.

How to cleanly implement: Look for a file stem in
/var/lib/asterisk/sounds/rpt/cop with the same name as the COP neumonic
and play that file if it exists. (eg rptena.ulaw, rptdis.gsm, etc).
There is already a piece of code you could steal which does just this
when announcing node names called saynode() which could be copied and
modified to do the a similar sort of thing with cop neumonics. This
saycop() function would attempt to look up a substitute sound file
and play the neumonic if one isn't found.

If you get it working, I'd like to have a look at your code and if it is
cleanly done, merge it in to the source repository. There are not enough
programmers on this project to support all the ideas and things everyone


More information about the App_rpt-users mailing list