[Asterisk-Users] still some moh troubles

Matt Roth mroth at imminc.com
Thu Apr 20 11:31:01 MST 2006


 >> Bart van Daal wrote:
 >> Hi,
 >>
 >>  After following the suggestions on the mailing lists and the wiki 
I'm still
 >>  experiencing
 >>  choppy moh. The song plays but with frequent noise parts.
 >>
 >>  - I'm using asterisk 1.2.4 on our production server and 1.2.7 on 
the test
 >>  server.
 >>  - native moh with .gsm and .pcm formats (according to
 >>    
 >
 > Doug Lytle wrote:
 >
 > Actually, you'll want to use ulaw for Native MOH.
 >
 > --------CUT
 >
 > #!/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
 >
 > done

--------CUT

Doug,

The required formats for native MOH are entirely dependent on the codecs 
being used for calls.  As such, there is no single format that is the 
right one.  Looking at the original post, I'd assume Bart is using both 
the GSM and ULAW codecs on his system.  If that is the case, he should 
transcode all of his MOH files to both GSM and PCM formats.  Asterisk 
will take care of matching the formats to the codecs being used on each 
individual call.

In addition to this, the two methods mentioned in this thread for 
transcoding files are almost identical.  They both produce a file in the 
ULAW format.  To demonstrate this, I took the same WAV file and ran the 
following two commands against it:

sox test.wav -t au -r 8000 -U -b -c 1 test.ulaw
sox test.wav -t ul -r 8000 -b -c 1 test.pcm

The only difference between "test.ulaw" and "test.pcm" is that the 
former has a 41 byte header and the latter doesn't.  Discounting the 
unnecessary header, the files are identical.

As for the OP, I'm not sure what the source of his problem is.  There is 
a lot of information out there about MOH, some of it good, some of it 
bad.  Hopefully, someone that has experienced a problem similar to his 
can help him out.  It would be helpful if we were sure of the codecs he 
is using.

Matthew Roth
InterMedia Marketing Solutions
Software Engineer and Systems Developer



More information about the asterisk-users mailing list