On 07/21/2010 04:35 PM, Danny Nicholas wrote: > Asterisk won’t be “happy” trying to play foobar.wav if it is actually a > .alaw file. Since you can’t rename the existing files, there’s no law > that says you can’t copy them and play them correctly. Assuming that > your calls are using the alaw codec, this snippet would do the trick > > > > Exten => 1234,1,answer > > Exten => 1234,n,System(/bin/cp foobar.wav /tmp/foobar.alaw) > > Exten => 1234,n,playback(/tmp/foobar) > > Exten => 1234,n,System(/bin/rm /tmp/foobar.alaw)
No, that won't work either, because a WAV file has a header, and a raw alaw file does not... so Asterisk will try to play the contents of that header as alaw data, presumably producing terrible noise. The best you can do is to use sox to convert them from alaw-in-WAV-container to raw-alaw. -- Kevin P. Fleming Digium, Inc. | Director of Software Technologies 445 Jan Davis Drive NW - Huntsville, AL 35806 - USA skype: kpfleming | jabber: [email protected] Check us out at www.digium.com & www.asterisk.org -- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
