&gt;&gt; Exten =&gt; 1234,n,System(/bin/cp foobar.wav /tmp/foobar.alaw)<br><br>it actually works, I made a link to the .wav file instead of copying it <br>ln -s foobar.wav foobar.alaw, and it works well.<br><br><br>&gt;&gt;No, that won&#39;t work either, because a WAV file has a header, and a raw<br>

&gt;&gt;alaw file does not... so Asterisk will try to play the contents of that<br>
&gt;&gt;header as alaw data, presumably producing terrible noise.<br><br>My .wav files are alaw file indeed. Here is the output from file command<br><br>$file 53.wav <br>53.wav: RIFF (little-endian) data, WAVE audio, ITU G.711 A-law, mono 8000 Hz<br>
<br>they&#39;ve just named as xxx.wav so I guess there is no problems with copying or linking solutions. <br><br>Thanks all,<br><br><div class="gmail_quote">On Wed, Jul 21, 2010 at 9:50 PM, Kevin P. Fleming <span dir="ltr">&lt;<a href="mailto:kpfleming@digium.com">kpfleming@digium.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div><div></div><div class="h5">On 07/21/2010 04:35 PM, Danny Nicholas wrote:<br>
&gt; Asterisk won’t be “happy” trying to play foobar.wav if it is actually a<br>
&gt; .alaw file.   Since you can’t rename the existing files, there’s no law<br>
&gt; that says you can’t copy them and play them correctly.    Assuming that<br>
&gt; your calls are using the alaw codec, this snippet would do the trick<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; Exten =&gt; 1234,1,answer<br>
&gt;<br>
&gt; Exten =&gt; 1234,n,System(/bin/cp foobar.wav /tmp/foobar.alaw)<br>
&gt;<br>
&gt; Exten =&gt; 1234,n,playback(/tmp/foobar)<br>
&gt;<br>
&gt; Exten =&gt; 1234,n,System(/bin/rm /tmp/foobar.alaw)<br>
<br>
</div></div>No, that won&#39;t work either, because a WAV file has a header, and a raw<br>
alaw file does not... so Asterisk will try to play the contents of that<br>
header as alaw data, presumably producing terrible noise.<br>
<br>
The best you can do is to use sox to convert them from<br>
alaw-in-WAV-container to raw-alaw.<br>
<br>
--<br>
Kevin P. Fleming<br>
Digium, Inc. | Director of Software Technologies<br>
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA<br>
skype: kpfleming | jabber: <a href="mailto:kfleming@digium.com">kfleming@digium.com</a><br>
Check us out at <a href="http://www.digium.com" target="_blank">www.digium.com</a> &amp; <a href="http://www.asterisk.org" target="_blank">www.asterisk.org</a><br>
<font color="#888888"><br>
--<br>
</font><div><div></div><div class="h5">_____________________________________________________________________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>
New to Asterisk? Join us for a live introductory webinar every Thurs:<br>
               <a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br>
<br>
asterisk-users mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
   <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><br>
</div></div></blockquote></div><br>