[arm-allstar] HamVoIP scripts and non-GSM sound files

Patrick Perdue borrisinabox at gmail.com
Sat Apr 18 13:17:11 EDT 2020


Hi all:

It occurs to me that, if you, like myself, use sound files that are not 
in .gsm format, lots ofHamVoIP specific scripts will not work.

It could be, and has been argued that we should all just use GSM, 
because it's smaller, and everything is already set up for that, but 
some things, like the RC-850 sound pack, really just sound better, even 
over the tinniest of HT's, in ulaw format.

Thus, I propose a change to the HamVoIP scripts that play sound files to 
the node so that, no matter if your sounds are gsm, ulaw or sln, that 
they will continue to work without having to do a wholesale find/replace 
of .gsm to.ulaw or .sln, which reverts every time a HamVoIP update happens.

I'm not the greatest shell scripter out there, but basically, I would do 
something like this...

Look for a specific base filename (without extension) in 
/var/lib/asterisk/sounds/rpt. Let's use connected as an example. Extract 
the file extension of connect.gsm or connected.ulaw, which ever is in 
the path, and export as a variable, say, $extn. Then, instead of 
localplay /var/lib/asterisk/sounds/rpt/connected.gsm, localplay 
/var/lib/asterisk/sounds/rpt/connected.$extn. This export of file 
extension as a variable could be done for each script individually, or 
with a one-time run script that runs at boot, or maybe when Asterisk is 
loaded. Of course, this assumes that every sound file in 
/var/lib/asterisk/sounds/rpt is in the same format as every other file 
in /var/lib/asterisk/sounds, so it isn't necessarily fool-proof.

Just an idea.



More information about the ARM-allstar mailing list