Overlapping recorded files (out of sync)-Monitor application

Hi guys, need your help
We are using asterisk 1.2.10, sox-12.17.5-3, CentOS4.3 on HP Proliant, with Asterisk Real-time config, sip servers are centralized on 1 mysql server,recorded file output is wav format, and soxmix doing the mixing

problem is recorded output files in /var/spool/asterisk/monitor is unsynchronized, the recorded conversation overlaps when reached after more or less 7 mins. here’s the test done to resolve issue

  1. followed 1 suggestion posted on bugs.digium.com/view.php?id=6691 to edit channel.c then recompile
    result: error during compiling , it says make: *** [channel.o] Error 1

  2. tried to hack the dial plan (lists.digium.com/pipermail/aster … 11097.html), instead of setting the “m” flag by Monitor not to mix it via soxmix, we tried to add to reverse the in and out audio leg, then soxmix it, then reverse it again via sox.
    result:
    1.manually executing the script via CLI, it worked, reverse output has the same size w/ the original, problem is if we create a macro something like this:
    exten => s,10,System(/usr/bin/sox ${CALLFILENAME}-in.WAV ${CALLFILENAME}-in-rev.WAV reverse)

result is the reverse output size is different from the original

here are my questions:
1.why is it if sox command is executed manually, it’s ok but when added
on dial plan via the asterisk cmd System, it doesn’t work?tried to change permission thru chmod and umask , but no luck?
2. is there any other way to solve this issue, any available patch to resolve this

thx in advance,

[quote=“planetdar420”]Hi guys, need your help
We are using asterisk 1.2.10, sox-12.17.5-3, CentOS4.3 on HP Proliant, with Asterisk Real-time config, sip servers are centralized on 1 mysql server,recorded file output is wav format, and soxmix doing the mixing

problem is recorded output files in /var/spool/asterisk/monitor is unsynchronized, the recorded conversation overlaps when reached after more or less 7 mins. here’s the test done to resolve issue

  1. followed 1 suggestion posted on bugs.digium.com/view.php?id=6691 to edit channel.c then recompile
    result: error during compiling , it says make: *** [channel.o] Error 1

  2. tried to hack the dial plan (lists.digium.com/pipermail/aster … 11097.html), instead of setting the “m” flag by Monitor not to mix it via soxmix, we tried to add to reverse the in and out audio leg, then soxmix it, then reverse it again via sox.
    result:
    1.manually executing the script via CLI, it worked, reverse output has the same size w/ the original, problem is if we create a macro something like this:
    exten => s,10,System(/usr/bin/sox ${CALLFILENAME}-in.WAV ${CALLFILENAME}-in-rev.WAV reverse)

result is the reverse output size is different from the original

here are my questions:
1.why is it if sox command is executed manually, it’s ok but when added
on dial plan via the asterisk cmd System, it doesn’t work?tried to change permission thru chmod and umask , but no luck?
2. is there any other way to solve this issue, any available patch to resolve this

thx in advance,[/quote]

for item 1, it is already resolve, it seems there was a problem on the dial plan sequence, that’s why it did not execute properly after the call was hang up.
any comment guys?

I’m also having the same problem. I tried editing channel.c but I get these errors:

channel.c:87: error: syntax error before "if"
channel.c: In function ast_begin_shutdown': channel.c:237: error:shutting_down’ undeclared (first use in this function)
channel.c:237: error: (Each undeclared identifier is reported only once
channel.c:237: error: for each function it appears in.)
channel.c: In function ast_cancel_shutdown': channel.c:267: error:shutting_down’ undeclared (first use in this function)
channel.c: In function ast_shutting_down': channel.c:273: error:shutting_down’ undeclared (first use in this function)
channel.c: In function ast_channel_alloc': channel.c:528: error:shutting_down’ undeclared (first use in this function)

here’s my monitor entry in extensions.conf

exten => 62761XXXXXXXXXX,n,Monitor(wav|${TIMESTAMP}${EXTEN:5}OUTBOUND${CALLERIDNAME}|b)

How did you get the recorded files to synchronize?

I’m also have the same problem, and look foward to find the solution quickly.

We use Asterisk Business Edition B1.3 and Redhat AS4.

In order to remain the origin voice files (IN and OUT),
I use Monitor(wave49|…|mb) to record and set globle varible MONITOR_EXEC = nice -n 19 soxmix
so, varible delfiles default is 0, then remain all origin files.

//see res_monitor.c (asterisk 1.2)
execute = pbx_builtin_getvar_helper(chan, “MONITOR_EXEC”);
00284 if (ast_strlen_zero(execute)) {
00285 execute = “nice -n 19 soxmix”;
00286 format = get_soxmix_format(format);
00287 delfiles = 1;
00288 }