Author Topic: Recorder channels are overlapping  (Read 5169 times)

samir.sakhare

  • Newbie
  • *
  • Posts: 9
    • View Profile
Recorder channels are overlapping
« on: August 05, 2016, 12:01:45 AM »
Hi,

    I have been using Yate ( ver 3.0 ) since 3 years. It is very good and
stable for me.

    Now I am implementing call recording feature using Yate. I have made
external script for call recording and calls get recorded into two
    channels. If you play signal channel  of recording, it is OK. But
when merge two channels into one then recorder channels are overlapping
( time shifted to each other )
   Please give me solution for this.

Thanks

Samir

evgeniy

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Recorder channels are overlapping
« Reply #1 on: August 05, 2016, 02:10:16 AM »
Hi,
How you merge records, with sox? Post a command you use for this.
Also please post your chan.record message with parameters.

samir.sakhare

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: Recorder channels are overlapping
« Reply #2 on: August 05, 2016, 03:24:52 AM »
Yes,  I used  sox . First I convert file .mulaw to wav, then merge two wav files into one.
Convert .mulaw to wav
1) sox --channels 1 --type raw --rate 8000 -e mu-law 20160804_1030_A.mulaw 20160804_1030_A.wav
Merge two files
2) sox -M 20160804_1030_A.wav 20160804_1030_B.wav  20160804_1030_C.wav

This is my chan.record command

$m = new Yate("chan.masquerade");
                    $m->id = ""; // don't notify about message result
                    $m->params["message"] = "chan.record";
                    $m->params["id"] = $id;
                    $m->params["peer"] = "wave/record/$path/$rec$ext1";   
                    $m->params["call"] = "wave/record/$path/$rec$ext2";
                    $m->Dispatch();

Thanks
Samir

evgeniy

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Recorder channels are overlapping
« Reply #3 on: August 05, 2016, 03:59:38 AM »
I use this sox command to convert and merge, and everything is ok:
sox -b 16 -t raw -r 8k -e signed-integer 1469707832-54117-call.slin -b 16 -t raw -r 8k -e signed-integer 1469707832-54117-peer.slin -M -C 96 -t mp3 test.mp3

Also look at this method to records calls, I used it, and it works fine without extmodule:
http://forum.yate.ro/index.php?topic=458.msg1414#msg1414

Also I faced with overlapping on some kind of devices(I don't know exactly which), for example HOLD or voice detection can broke call record.
« Last Edit: August 05, 2016, 04:06:29 AM by evgeniy »

samir.sakhare

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: Recorder channels are overlapping
« Reply #4 on: August 05, 2016, 05:42:32 AM »
I tried your solution but still it is overlapping.