Stereo Recordings not lining up

I;ve been working to get our call recordings set to stereo (transmit in left channel, receive in Right channel).

after a lot of work, I have stereo files! yay!..
but… they don’t align to each other?

Does anyone have any suggestions or experience with Merging a left/right channel for a call, and keeping the call flow aligned?

/etc/asterisk/globals_custom.conf:

SS=$

MIXMON_DIR=/var/spool/asterisk/monitor/

MONITOR_REC_OPTION=br(${SS}{MIXMON_DIR}${SS}{YEAR}/${SS}{MONTH}/${SS}{DAY}/recv_${SS}{CALLFILENAME}.${SS}{MON_FMT})t(${SS}{MIXMON_DIR}${SS}{YEAR}/${SS}{MONTH}/${SS}{DAY}/trans_${SS}{CALLFILENAME}.${SS}{MON_FMT})

MIXMON_POST=/usr/bin/mix-stereo.sh ${SS}{MIXMON_DIR}${SS}{YEAR}/${SS}{MONTH}/${SS}{DAY}/ ${SS}{CALLFILENAME}

and my mix script:

#!/bin/bash

SOX="/usr/bin/sox"
RM="/bin/rm"

IN="${1}recv_$2.wav"
OUT="${1}trans_$2.wav"
MIXDESTINATION="${1}$2_stereo.wav"
MERGEDESTINATION="${1}$2_mono.wav"

#echo "ran ${2}" >> /var/log/recordingtest.txt
$SOX -M $IN $OUT $MIXDESTINATION && $SOX -m $IN $OUT $MERGEDESTINATION && $RM $IN $OUT

in the resulting output audio files… I can complete an entire response before the remote party asks a question.

… perhaps its just because i have the b flag on one leg of my recording?.. going to test

b
Don’t begin recording unless a call is bridged to another channel.


If you want to keep the caller’s preamble, you could use sox’ reverse on both channels before mixing then reverse the resultant -c 2 file

so to see if i understand it:
the 1st output would be “END == END”, and play the files backwards. (4,4. 3,3. 2,2, ,1)
then reverse the full thing so I have {
,1. 2,2. 3,3. 4,4 }
?

adding a second B (delay until bridged) has resolved this for me:

MONITOR_REC_OPTION=br(${SS}{MIXMON_DIR}${SS}{YEAR}/${SS}{MONTH}/${SS}{DAY}/recv_${SS}{CALLFILENAME}.${SS}{MON_FMT})bt(${SS}{MIXMON_DIR}${SS}{YEAR}/${SS}{MONTH}/${SS}{DAY}/trans_${SS}{CALLFILENAME}.${SS}{MON_FMT})
1 Like

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.