Hello
Happy New Year! I succesfully installed the Ports of Zaptel BSD 1.4.0
and Asterisk 1.4.13 (that's the latest in the Ports). To save CPU, I'd
like to play PCM WAV files instead of eg. GSM. Per...
www.voip-info.org/wiki/view/Convert+WAV+audio+files+for+use+in+Asterisk
... I recorded a sample of my voice using XP's Sound Recorder, then
ran the following :
sox test_wav.wav -r 8000 -c 1 -s -w test_wav_out.wav resample -ql
But it seems like I'm missing the codec or something:
==========  -- Executing [s at default:2]
Playback("SIP/2000-0871d000",
"/usr/local/lib/asterisk/test_wav_out.wav") in new stack
WARNING[37390]: file.c:563 ast_openstream_full: File
/usr/local/lib/asterisk/test_wav_out.wav does not exist in any format
WARNING[37390]: file.c:866 ast_streamfile: Unable to open
/usr/local/lib/asterisk/test_wav_out.wav (format 0x4 (ulaw)): No such
file or directory
==========
Here's what "core show file formats" says:
==========Format     Name       Extensions
gsm        wav49      WAV|wav49
slin       wav        wav
adpcm      vox        vox
slin       sln        sln|raw
g722       g722       g722
ulaw       au         au
alaw       alaw       alaw|al
ulaw       pcm        pcm|ulaw|ul|mu
ilbc       iLBC       ilbc
h264       h264       h264
h263       h263       h263
gsm        gsm        gsm
g729       g729       g729
g726       g726-16    g726-16
g726       g726-24    g726-24
g726       g726-32    g726-32
g726       g726-40    g726-40
g723       g723sf     g723|g723sf
18 file formats registered.
==========
Am I missing something in the configuration files, or maybe I'm
missing some module?
Thank you.
Godson Gera
2008-Jan-01  11:53 UTC
[asterisk-users] [1.4 + FreeBSD 6.2] Playing WAV PCM file?
On Jan 1, 2008 3:36 PM, Vincent <vincent.delporte at bigfoot.com> wrote:> Hello > > Happy New Year! I succesfully installed the Ports of Zaptel BSD 1.4.0 > and Asterisk 1.4.13 (that's the latest in the Ports). To save CPU, I'd > like to play PCM WAV files instead of eg. GSM. Per... > > www.voip-info.org/wiki/view/Convert+WAV+audio+files+for+use+in+Asterisk > > ... I recorded a sample of my voice using XP's Sound Recorder, then > ran the following : > > sox test_wav.wav -r 8000 -c 1 -s -w test_wav_out.wav resample -ql > > But it seems like I'm missing the codec or something: > > ==========> -- Executing [s at default:2] Playback("SIP/2000-0871d000", > "/usr/local/lib/asterisk/test_wav_out.wav") in new stack > > WARNING[37390]: file.c:563 ast_openstream_full: File > /usr/local/lib/asterisk/test_wav_out.wav does not exist in any format > > WARNING[37390]: file.c:866 ast_streamfile: Unable to open > /usr/local/lib/asterisk/test_wav_out.wav (format 0x4 (ulaw)): No such > file or directory > ==========>Happy New Year! It seems from the console output that you have specified the extension of the filename in your dialplan. That doesn't work with asterisk. All you need to do is specify the name of the file you want to play without the extension like s,2,Playback(/usr/local/lib/asterisk/test_wav_out) And asterisk will automatically pickup the file that it can play with any asterisk supported format from the specified path. -- Godson Gera, http://godson.in Asterisk India -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20080101/902c361f/attachment.htm
Godson Gera
2008-Jan-01  15:35 UTC
[asterisk-users] [1.4 + FreeBSD 6.2] Playing WAV PCM file?
On Jan 1, 2008 3:36 PM, Vincent <vincent.delporte at bigfoot.com> wrote:> Hello > > Happy New Year! I succesfully installed the Ports of Zaptel BSD 1.4.0 > and Asterisk 1.4.13 (that's the latest in the Ports). To save CPU, I'd > like to play PCM WAV files instead of eg. GSM. Per... > > <http://www.voip-info.org/wiki/view/Convert+WAV+audio+files+for+use+in+Asterisk> >Asterisk automatically takes care of saving CPU issue as it picks the file that have less translation cost (in other words it picks the file that gives the best CPU performance based on call situations like in which codec format the call is bridged ). That way you don't have to worry about specifying particular format moreover there is no provision to do that in Playback application. You can see translation costs by typing the following in console. core show translation -- Godson Gera, http://godsongera.blogspot.com Asterisk India Developer -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20080101/6237e371/attachment.htm
dave cantera
2008-Jan-01  16:27 UTC
[asterisk-users] [1.4 + FreeBSD 6.2] Playing WAV PCM file?
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffcc" text="#330000">
vincent,<br>
here is a script that I used to convert a single wav file or the entire
directory... no file specified on launch, converts all files in the
current directory...<br>
creates a logfile, although trivial... <br>
daveC<br>
<br>
<tt>#!/bin/sh<br>
#<br>
#    convert-all.sh<br>
#<br>
#    convert all *.wav files to .gsm .au
formats<br>
#<br>
<br>
if [ "null${1}" == "null" ]<br>
then<br>
    FILE_LIST=`ls *.wav`<br>
else<br>
    FILE_LIST=`ls ${1}*.wav`<br>
fi<br>
<br>
LOG="./log_convert.log"<br>
echo "=======================================================
">>${LOG}<br>
echo
"       
started at
`date`        
" >>${LOG}<br>
<br>
echo " Removing all current .gsm files..."<br>
rm -f *.gsm<br>
<br>
for FNAME in ${FILE_LIST}<br>
do<br>
    echo "----  
-------   ----- "<br>
    echo "----   "
>>${LOG}<br>
    echo " Processing ${FNAME}...
"<br>
    echo " Processing ${FNAME}... "
>>${LOG}<br>
    BASEFNAME=`echo ${FNAME} | awk '{print
substr($0,1,length($0)-4)}'`<br>
<br>
    echo
"        
making ${BASEFNAME}.gsm... "<br>
    echo
"        
making ${BASEFNAME}.gsm... " >>${LOG}<br>
    #sox -q -V -c 1  ${FNAME} -r 8000 -c 1
-w ${BASEFNAME}.gsm resample
-ql  2>>${LOG}<br>
    sox -q -V ${FNAME} -r 8000 -c 1 ${BASEFNAME}.gsm
resample -ql 
2>>${LOG}<br>
    echo "----   "
>>${LOG}<br>
    echo
"        
making ${BASEFNAME}.au... "<br>
    echo
"        
making ${BASEFNAME}.au... " >>${LOG}<br>
    sox -q -V ${FNAME} -t au -r 8000 -c 1 -w
${BASEFNAME}.au resample
-ql 2>>${LOG} <br>
done</tt><br>
<br>
<br>
<br>
<br>
<br>
<br>
Vincent wrote:
<blockquote cite="mid:8p3kn3limg3rvdt127057g675k5o8r16qe@4ax.com"
 type="cite">
  <pre wrap="">Hello
Happy New Year! I succesfully installed the Ports of Zaptel BSD 1.4.0
and Asterisk 1.4.13 (that's the latest in the Ports). To save CPU, I'd
like to play PCM WAV files instead of eg. GSM. Per...
<a class="moz-txt-link-abbreviated"
href="http://www.voip-info.org/wiki/view/Convert+WAV+audio+files+for+use+in+Asterisk">www.voip-info.org/wiki/view/Convert+WAV+audio+files+for+use+in+Asterisk</a>
... I recorded a sample of my voice using XP's Sound Recorder, then
ran the following :
sox test_wav.wav -r 8000 -c 1 -s -w test_wav_out.wav resample -ql
But it seems like I'm missing the codec or something:
==========  -- Executing [s@default:2] Playback("SIP/2000-0871d000",
"/usr/local/lib/asterisk/test_wav_out.wav") in new stack
WARNING[37390]: file.c:563 ast_openstream_full: File
/usr/local/lib/asterisk/test_wav_out.wav does not exist in any format
WARNING[37390]: file.c:866 ast_streamfile: Unable to open
/usr/local/lib/asterisk/test_wav_out.wav (format 0x4 (ulaw)): No such
file or directory
==========
Here's what "core show file formats" says:
==========Format     Name       Extensions
gsm        wav49      WAV|wav49
slin       wav        wav
adpcm      vox        vox
slin       sln        sln|raw
g722       g722       g722
ulaw       au         au
alaw       alaw       alaw|al
ulaw       pcm        pcm|ulaw|ul|mu
ilbc       iLBC       ilbc
h264       h264       h264
h263       h263       h263
gsm        gsm        gsm
g729       g729       g729
g726       g726-16    g726-16
g726       g726-24    g726-24
g726       g726-32    g726-32
g726       g726-40    g726-40
g723       g723sf     g723|g723sf
18 file formats registered.
==========
Am I missing something in the configuration files, or maybe I'm
missing some module?
Thank you.
_______________________________________________
--Bandwidth and Colocation Provided by <a
class="moz-txt-link-freetext"
href="http://www.api-digital.com">http://www.api-digital.com</a>--
asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   <a class="moz-txt-link-freetext"
href="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users</a>
  </pre>
</blockquote>
<br>
<pre class="moz-signature" cols="132">-- 
My wife's sister is in California.  
I should buy her a Videophone2008!
Truly, The Next Best Thing to Being There!
--
WorldWideVideoPhones.com
856.380.0894
</pre>
</body>
</html>