Re: [asterisk-users] Voicemail- Recorded Mesage Low Volume

2008-06-30 Thread Daniel Hazelbaker

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

Re: [asterisk-users] Voicemail- Recorded Mesage Low Volume

2008-06-30 Thread Steve Edwards
On Mon, 30 Jun 2008, Daniel Hazelbaker wrote:

 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.

If you are using RedHat or CentOS, installing sox should be as simple as:

sudo yum install sox

Other distros have similar commands.

 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.

I think this is a bad approach. It's going to be a big gotcha down the 
road for somebody :)

 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.

A quick grep through the Asterisk (1.2.28) sources shows res_monitor using 
soxmix if the channel variable MONITOR_EXEC is not defined -- but nothing 
in app_voicemail. Am I missing something?

Thanks in advance,

Steve Edwards  [EMAIL PROTECTED]  Voice: +1-760-468-3867 PST
Newline Fax: +1-760-731-3000

___
-- 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


Re: [asterisk-users] Voicemail- Recorded Mesage Low Volume

2008-06-30 Thread Tzafrir Cohen
On Mon, Jun 30, 2008 at 11:32:58AM -0700, Steve Edwards wrote:

  To do anything useful you would have to get sox installed on your 
  server.
 
 If you are using RedHat or CentOS, installing sox should be as simple as:
 
   sudo yum install sox
 
 Other distros have similar commands.

One gotcha with Debian Lenny:

libsox-dev - Development files for the SoX library
libsox-fmt-all - All SoX format libraries
libsox-fmt-alsa - SoX alsa format I/O library
libsox-fmt-ao - SoX Libao format I/O library
libsox-fmt-base - Minimal set of SoX format libraries
libsox-fmt-ffmpeg - SoX ffmpeg format library
libsox-fmt-flac - SoX FLAC format library
libsox-fmt-gsm - SoX GSM format library
libsox-fmt-mp3 - SoX MP3 format library
libsox-fmt-ogg - SoX OGG Vorbis format library
libsox-fmt-oss - SoX OSS format I/O library
libsox-fmt-sndfile - SoX libsndfile format library
libsox0 - SoX library
sox - Swiss army knife of sound processing

Installing sox does not automatically install support for all the
formats. To install support for all the output formats, install
libsox-fmt-all as well, or just the specific libsox-fmt packages you
need.

-- 
   Tzafrir Cohen
icq#16849755  jabber:[EMAIL PROTECTED]
+972-50-7952406   mailto:[EMAIL PROTECTED]
http://www.xorcom.com  iax:[EMAIL PROTECTED]/tzafrir

___
-- 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


Re: [asterisk-users] Voicemail- Recorded Mesage Low Volume

2008-06-30 Thread Daniel Hazelbaker
On Jun 30, 2008, at 1:04 PM, [EMAIL PROTECTED]  
wrote:


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.


I think this is a bad approach. It's going to be a big gotcha down  
the

road for somebody :)


Agreed. :)  It would be nice if there was something similar to  
externnotify that was not just a notification but a pipe that you  
could modify/filter etc the audio file before it continues on its  
merry way.


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.


A quick grep through the Asterisk (1.2.28) sources shows res_monitor  
using
soxmix if the channel variable MONITOR_EXEC is not defined -- but  
nothing

in app_voicemail. Am I missing something?


It is possible this is a 1.4.x feature, and specifically it is for the  
e-mail sending system which as I am thinking about it is a 1.4  
feature.  I don't use 1.2.x and never have, I started with 1.4.  The  
other option, again I don't know if this is available in 1.2, is to  
use the externnotify option.  When a voicemail is left this script/ 
program is called with the context, extension and number of new  
voicemail messages.  With a little bit of shell scripting you could  
walk the list of all messages and process any left (modified) within  
the last 20 seconds via sox.  It is a little more iffy and prone to  
race conditions, but it should work.


Unfortunately I couldn't give you a specific example of doing it this  
way as I use the e-mail style.


Daniel



Thanks in advance,

Steve Edwards  [EMAIL PROTECTED]  Voice: +1-760-468-3867  
PST


___
-- 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

Re: [asterisk-users] Voicemail- Recorded Mesage Low Volume

2008-06-30 Thread CunningPike
Well, that was sorta my point.

CP

Steve Edwards wrote:
 A quick grep through the Asterisk (1.2.28) sources shows res_monitor using 
 soxmix if the channel variable MONITOR_EXEC is not defined -- but nothing 
 in app_voicemail. Am I missing something?
 


___
-- 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


Re: [asterisk-users] Voicemail- Recorded Mesage Low Volume

2008-06-27 Thread CunningPike
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.

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


Re: [asterisk-users] Voicemail- Recorded Mesage Low Volume

2008-04-02 Thread Daniel Hazelbaker

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


Re: [asterisk-users] Voicemail- Recorded Mesage Low Volume

2008-04-02 Thread John Meksavan

Thanks.  I will give this a try.

-John

 From: [EMAIL PROTECTED]
 To: asterisk-users@lists.digium.com
 Date: Wed, 2 Apr 2008 09:29:48 -0700
 Subject: Re: [asterisk-users] Voicemail- Recorded Mesage Low Volume
 
 
 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

_
More immediate than e-mail? Get instant access with Windows Live Messenger.
http://www.windowslive.com/messenger/overview.html?ocid=TXT_TAGLM_WL_Refresh_instantaccess_042008___
-- 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

Re: [asterisk-users] Voicemail- Recorded Mesage Low Volume

2008-04-01 Thread Doug Lytle
John Meksavan wrote:
 level high and still, the same problem. I tried to increase the rxgain 
 to 12.2 in the zapata.conf file and it had no affect 


You'd want to fiddle with the txgain(Transmit)

Doug

-- 
 
Ben Franklin quote:

Those who would give up Essential Liberty to purchase a little Temporary 
Safety, deserve neither Liberty nor Safety.


___
-- 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


Re: [asterisk-users] Voicemail- Recorded Mesage Low Volume

2008-04-01 Thread Mojo with Horan Company, LLC
Doug Lytle wrote:
 John Meksavan wrote:
   
 level high and still, the same problem. I tried to increase the rxgain 
 to 12.2 in the zapata.conf file and it had no affect 
 


 You'd want to fiddle with the txgain(Transmit)

 Doug

   
He might actually want to deal with rxgain, because it could be 
perceived as a low volume coming into the box from the PSTN, hence being 
'received' into asterisk...?

___
-- 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