Hi Daniel,

I'm intrigued by this and wanted to try it out - but I'm wondering how
you get Asterisk to call sox at all during Voicemail()? Our server
doesn't even have sox installed, so I'm not sure how to go about
tricking Asterisk into running a different one.

To do anything useful you would have to get sox installed on your server. But to get asterisk to run a different/fake sox, just install whatever you want to run as /usr/local/bin/sox and then edit your safe_asterisk script as I mentioned below. Asterisk runs the program 'sox' using the first match in your $PATH, so by updating the $PATH before asterisk runs you can direct it to run a different sox program. Be aware that this could pose a security issue as some systems allow regular users to modify /usr/local/bin. So people could install other programs that asterisk runs into that directory as well to get elevated privileges. For me it is not a concern as the machine is used only for Asterisk and only accessed by our IT department.

Daniel

CP

Daniel Hazelbaker wrote:
On Apr 1, 2008, at 5:22 PM, [EMAIL PROTECTED]
wrote:

Can the volume of the recorded voice mail message be changed?  If
so, what I am doing wrong?  Any input would be greatly appreciated.
Thanks.

I had a similar problem in our setup where we e-mail the recorded
messages to e-mail retrieval.  But this also helps standard phone
retrieval too. What I did was edit the /usr/sbin/safe_asterisk script
and add:

PATH="/usr/local/bin:$PATH"

At the top of the script. This would let me override the default sox
implementation that Asterisk uses.  Then I loaded in a script (called
sox) that would compress and normalize the recorded audio (It
compresses to deal with the spikes of the noise of the handset being
hung up, etc.). It works pretty well for us and makes the volume
pretty good so we don't have to crank up the volume on our computers
or phones to listen to voicemail messages.  And we can't adjust the
rxgain as it is already a good volume for normal calls.

Daniel

--CUT--
#!/bin/sh
#
# $1 = -v
# $2 = number
# $3 = inFile
# $4 = outFile
#
REALSOX="/usr/bin/sox"

if [ "$1" != "-v" ]; then
  $REALSOX $*
  exit $?
fi

INFILE="$3"
OUTFILE="$4"

#
# Perform the gain adjustment.
#
$REALSOX "$INFILE" "$OUTFILE" compand 0.1,0.3
-60,-60,-30,-15,-20,-12,-4,-8,-2,-7 0 0 0.2
--CUT--


_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2008 - September 22 - 25 Phoenix, Arizona
Register Now: http://www.astricon.net

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to