Recorded Conversations

How would I go about combining the 2 .wav files from call recordings. Asterisk currently has 2 files, in & out.

Thanks.

.

You can use the m flag or Mix: 1 from the manager interface. Then when recording finishes, Asterisk will execute a unix program to combine the two sound files into a single sound file. By default, Asterisk will execute soxmix and then delete the original two sound files. You may specify a different mixing method by setting the MONITOR_EXEC channel variable to the path of the unix program you wish executed, then call Monitor to begin recording. At the completion of recording, the specified unix program will be executed with three command-line parameters: the two sound files and the filename where the program should save the combined sound file. In this situation, earlier versions of Asterisk will not delete the two original sound files; it’s up to your program to do that if you need/wish to. The “m” flag is settable through the manager interface.
(voip-info.org/tiki-index.php … md+Monitor)

This is a copy of part of the logs from asterisk.

monitor executing ( nice -n 19 soxmix “/var/spool/asterisk/monitor/20050718-102829-1121696909.1917-in.WAV” “/var/spool/asterisk/monitor/20050718-102829-1121696909.1917-out.WAV” “/var/spool/asterisk/monitor/20050718-102829-1121696909.1917.WAV” && rm -f “/var/spool/asterisk/monitor/20050718-102829-1121696909.1917-*” )

Soxmix is installed:
[root@pbx monitor]# soxmix
soxmix: Usage: [ gopts ] [ fopts ] ifile [ fopts ] ofile [ effect [ effopts ] ]

Failed: Not enough input files specified

For some reason I’m not getting the output, also the old files are not being removed.

Any ideas?

Here is what i did. this combines the files once the call is completed. assumes that sox is already installed on your box.

exten => _3XX,n,Monitor(gsm,/var/lib/asterisk/recording/${CALLERIDNUM}/${TIMESTAMP},mb)

the m at then end of the command is what forces the combining of the files.