Recording calls

I have a problem with the calls. I only want that the recording call begins when the call are answered, my currently problem is that the call are recording since the telephone rings.

The calls are recorded from the moment they are “answered”, I use sox to trim silence from the beginning of the recorded file and the end after removing the last hangup “click” in my post record script. the bit that does that is

sox temp.wav out.wav silence 1 0.1 0.1% reverse trim 0 0.25 silence 1 0.1 0.1% reverse

But my recordings start when the telephone rings, can I change this?

If the recording includes the ring back, it shouldn’t, then i can’ help. Sorry

On outbound calls the recording starts once the call is ringing.

Tony, Can I change this? :smiley:

Actually, to be specific, the recording starts when the call is started there will be no sound until technically “answered” , Asterisk will for convenience and comfort play ringtone to the caller until that happens. The Asterisk derived convenience tone will not be in your recorded file. If your ISP “gives answer” the recording will start at that point in time and I assume so will your charges, even if eventually there is nobody there. I know of no easy way to change that behavior, the call is either answered or not, the recording is what your vsp sends, and not what asterisk generates.


Remember recording is not handled in 2.10 like 2.9 was. its all handled in FreePBX with scripts now not using default recording in asterisk because of all the issues with call recordings on transfer calls and permissions over call recordings. Once the channels are bridged on outgoing the call recording will start.

Thank you Tony, I will so remember albeit I was not specifically aware of that change even though I try to keep up with all published Changelogs, I guess I missed it in the Dev’s section also, Mea Culpa.

Its all in the source code as we all know. Change logs only show what comments are added. Looking at the code quickly on outbound from a extension it should start recording on answer so if you are using analog trunks or a SIP carrier who sends back answer right away then plays ringing as a audio stream that will be in the recording.

Remember on a outbound call ringing can be done in 3 ways.

  1. Asterisk plays it when sent a ringing packet
  2. The carrier answers the outbound calls and plays ringing in the audio path.
  3. The carrier sends the ringing as early media.