<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; ">Hi Daniel,<br><br>I'm intrigued by this and wanted to try it out - but I'm wondering how<span class="Apple-converted-space"> </span><br>you get Asterisk to call sox at all during Voicemail()? Our server<span class="Apple-converted-space"> </span><br>doesn't even have sox installed, so I'm not sure how to go about<span class="Apple-converted-space"> </span><br>tricking Asterisk into running a different one.</span></blockquote><div><br></div>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.</div><div><br></div><div>Daniel</div><div><br></div><div><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; ">CP<br><br>Daniel Hazelbaker wrote:<br><blockquote type="cite">On Apr 1, 2008, at 5:22 PM,<span class="Apple-converted-space"> </span><a href="mailto:asterisk-users-request@lists.digium.com">asterisk-users-request@lists.digium.com</a><span class="Apple-converted-space"> </span> <br></blockquote><blockquote type="cite">wrote:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><blockquote type="cite">Can the volume of the recorded voice mail message be changed? If<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">so, what I am doing wrong? Any input would be greatly appreciated.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Thanks.<br></blockquote></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I had a similar problem in our setup where we e-mail the recorded <br></blockquote><blockquote type="cite">messages to e-mail retrieval. But this also helps standard phone <br></blockquote><blockquote type="cite">retrieval too. What I did was edit the /usr/sbin/safe_asterisk script <br></blockquote><blockquote type="cite">and add:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">PATH="/usr/local/bin:$PATH"<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">At the top of the script. This would let me override the default sox <br></blockquote><blockquote type="cite">implementation that Asterisk uses. Then I loaded in a script (called <br></blockquote><blockquote type="cite">sox) that would compress and normalize the recorded audio (It <br></blockquote><blockquote type="cite">compresses to deal with the spikes of the noise of the handset being <br></blockquote><blockquote type="cite">hung up, etc.). It works pretty well for us and makes the volume <br></blockquote><blockquote type="cite">pretty good so we don't have to crank up the volume on our computers <br></blockquote><blockquote type="cite">or phones to listen to voicemail messages. And we can't adjust the <br></blockquote><blockquote type="cite">rxgain as it is already a good volume for normal calls.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Daniel<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">--CUT--<br></blockquote><blockquote type="cite">#!/bin/sh<br></blockquote><blockquote type="cite">#<br></blockquote><blockquote type="cite"># $1 = -v<br></blockquote><blockquote type="cite"># $2 = number<br></blockquote><blockquote type="cite"># $3 = inFile<br></blockquote><blockquote type="cite"># $4 = outFile<br></blockquote><blockquote type="cite">#<br></blockquote><blockquote type="cite">REALSOX="/usr/bin/sox"<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">if [ "$1" != "-v" ]; then<br></blockquote><blockquote type="cite"> $REALSOX $*<br></blockquote><blockquote type="cite"> exit $?<br></blockquote><blockquote type="cite">fi<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">INFILE="$3"<br></blockquote><blockquote type="cite">OUTFILE="$4"<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">#<br></blockquote><blockquote type="cite"># Perform the gain adjustment.<br></blockquote><blockquote type="cite">#<br></blockquote><blockquote type="cite">$REALSOX "$INFILE" "$OUTFILE" compand 0.1,0.3 <br></blockquote><blockquote type="cite">-60,-60,-30,-15,-20,-12,-4,-8,-2,-7 0 0 0.2<br></blockquote><blockquote type="cite">--CUT--<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">_______________________________________________<br></blockquote><blockquote type="cite">-- Bandwidth and Colocation Provided by<span class="Apple-converted-space"> </span><a href="http://www.api-digital.com">http://www.api-digital.com</a><span class="Apple-converted-space"> </span>--<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">asterisk-users mailing list<br></blockquote><blockquote type="cite">To UNSUBSCRIBE or update options visit:<br></blockquote><blockquote type="cite"> <a href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br></blockquote></span><br class="Apple-interchange-newline"></blockquote></div><br></body></html>