[Asterisk-Users] Creating CDR's with online connected time

el Flynn el_flynn at lanvik-icu.com
Mon Nov 22 16:55:54 MST 2004


Carsten Bock wrote:
> Hi there,
> 
> How do i setup asterisk, so that in the CDR's is only the time, which 
> the line actually was connected? Not the time, the line was up, but the 
> time the user was able to talk to another user.
> 

isn't it already in there?

if you're using cdr_csv.so, the following information is recorded:

accountcode, source, destination, destination context, callerid,
channel, destination channel, last application, last app argument, start
time, answer time, end time, duration, billable seconds, disposition,
amaflags, uniqueid, userfield

so what you want is "answer time".

if using SQL-based CDRs, you'll have to do some calculations to get to
the time the call was answered/connected:

calldate + (duration - billsec)

flynn





More information about the asterisk-users mailing list