[Asterisk-Users] Native MOH - Convert mp3 to ulaw
Doug Lytle
Support at drdos.info
Tue Mar 21 13:27:47 MST 2006
Douglas Garstang wrote:
> Tried it. It doesn't seem to like converting to ulaw, unless I'm doing something wrong. The man page mentions ulaw briefly, but doesn't say HOW to convert to it.
>
> Doug.
>
>
>> -----Original Message-----
>> From: Bob McDowell [mailto:bmcdowell at federalprotection.com]
>> Sent: Tuesday, March 21, 2006 12:58 PM
>> To: Asterisk Users Mailing List - Non-Commercial Discussion
>> Subject: RE: [Asterisk-Users] Native MOH - Convert mp3 to ulaw
>>
>>
>>
>> I don't know for sure about the formats, but I'd try sox. I'm pretty
>> sure pcm/ulaw is built in...
>>
I use the following script. Make sure there are no spaces in the filenames:
cat convert.sh
#!/bin/sh
for filename in *mp3
do
eval filename=`echo $filename | cut -f1 -d.`
echo Converting $filename
sox -V $filename.mp3 -t au -r 8000 -U -b -c 1 $filename.ulaw resample -ql
Doug
More information about the asterisk-users
mailing list