Make sure that your sox/soxmix has MP3 encoding support, by executing "soxmix -h". If you have mp3 support, you will see it listed in the supported filetypes. If soxmix says mp3 (readonly), your version of sox was compiled without lame mp3 encoder support.

On my debian system I had to download the lame mp3 encoder source, compile and install, then download sox source, compile and install. The "apt-get install sox" version of sox doesn't include lame mp3 encoding support.

1. Download L.A.M.E. from:http://lame.sourceforge.net/using.html

2. Download sox form:http://sox.sourceforge.net/

3. Extract lame, then ./configure ; make ; make install

4. Same for sox.

note: on current debian unstable, you might need to "apt-get install g++" before compiling lame or sox, I had c pre-processor (cpplus1) problems after upgrading some debian packages to current, including gcc, installing g++ resolved it.

;Clean up after outbound calls which have been recorded.; Combines the two files from asterisk and makes into one audio file.exten => h,1,System(/usr/bin/soxmix ${DIREC}/${CALLFILENAME}-in.gsm ${DIREC}/${CALLFILENAME}-out.gsm ${DIREC}/${CALLFILENAME}.gsm)

;Remove the two files which we have converted to one.exten => h,2,System(rm ${DIREC}/${CALLFILENAME}-in.gsm ${DIREC}/${CALLFILENAME}-out.gsm)

You will need soxmix compiled to do the combine of the two audio files.

After you have hung up, you will land up with one audio file of the conversation which has a file name that has the number dialed in it, the extension making the call and the time date stamp.

Bare in mind that the timestamp is different than the one in cdr log as the timestamp on the file is the time at the begining of the call and not the end, as it is in cdr. If you minus duration of the call from the timestamp in cdr you will get the timestamp on the audio file.

by , Friday 05 of November, 2004 (12:12:08 UTC)

soxmix. not somix

Obviously a typo.It is soxmix not somix as originally stated.

by , Wednesday 27 of October, 2004 (20:12:10 UTC)

Yes, soxmix

From man sox:

sox infile outfile...soxmix infile1 infile2 outfile...soxmix is functionally the same as the command line program soxexpect [sic] that it takes two files as input and mixes theaudio together to produce a single file as output. It has arestriction that both input files must be of the same datatype and sample rates.

This is simply another way to call sox. If you do not see thisoption in your distribution, try upgrading sox.

by , Friday 15 of June, 2012 (06:50:06 UTC)

Somix?

I have no idea what "somix" is. I know what, and have used "sox" for ages. The page above points to "sox", not "somix", and a search on the main "sox" page does not show anything called "somix".

If people are referring to sox, a common application, then please call it what it's page, and the application are called. "Sox", not "somix". If people are referring to "somix", which I can't find, then please point it to the somix page, or to the part of the Sox page that talks about somix...

Thanks

by , Wednesday 29 of September, 2004 (01:04:24 UTC)

Doesn't seem to work if called from an AGI Script

I set up the example as shown and it works for a phone dialing 8 then the number, but when called by a dial command from an agi script it stops working.The only difference I see is that there is an extra answer on the console.Any ideas?Thanks.