CDR Documentation

Discussion in '3CX Phone System - General' started by beaton, Jan 10, 2012.

Thread Status:
Not open for further replies.
  1. beaton

    Joined:
    Jan 4, 2011
    Messages:
    11
    Likes Received:
    0
    I have been studying the CDR feature built into 3CX. After searching the forms and support blogs I still have some questions.

    After reading the following post - http://www.3cx.com/blog/docs/cdr-call-data-records/ it was clear how the process works. I am struggling to determine what each field represents. Some fields are obvious but others are not. Here are my guesses perhaps others can help fill in the blanks?

    idcallhistory3 - The ID number for this record.
    callid - The ID number for the call within the 3CX database somewhere?
    starttime - The Start time of the call
    answertime - When the call was picked up by ext (subtract 1 second to get the ring time)
    endtime - The time the call was ended
    from_no - Phone number that initiated the call (See CallerID)
    to_no - Phone number that was dialed (See DialedNumber)
    group_no - ????
    line_no - ????
    is_answ - Was the call answered
    is_fail - Did the call fail for some reason (i.e. Busy)
    is_compl - Call was completed successfully
    is_fromoutside - Did this call originate from outside of the office
    CallerID - ???? - The Caller ID of the first dialed number/ext
    DialedNumber - ???? - The Actual number/ext of the first dialed number
    lastCallerID - ???? - The Caller ID of the last dialed number/ext - perhaps this shows the last location in an IVR
    lastDialedNumber - ???? - The Actual number/ext of the last dialed number/ext - perhaps this shows the last location in IVR
    mediaType - The Codec used for this call
    Rate - Billing rate in currency - Defined in the Billing Info table within 3CX management console
    TotalCost - (endtime - answertime) * Rate
    BillPrefix - Country code as defined in the billing info table within 3CX management console
    BillRateName - Country Name as defined in the billing info table within 3CX management console
    GrpAnswDetail - ????
    NumDetails - ????

    In this section you can have one or more rows per call I am still not sure why a single call can have multiple detail records - i think this is used to track a callers progression from one extension to another - for example tracking their progress through an IVR

    DetailNum - ????
    IdCallHistory2 - ID number of this record
    ParentDetailNum - ???? - Perhaps the ID number of the parent which is idcallhistory3
    dest_dn - ????
    dest_num - Destination Number
    StartTime - Time this leg of the call was started
    Dur - Duration of this leg of the call
    AnswerTime - Answer Time on this leg of the call
    Status - ???? Perhaps there are codes for this field or it is similar to the call reporter - Answered/Not Answered?
    Is_Compl - Was this leg of the call was completed - what defines completion - Transfer/hangup
    SpecDstType - ????
    is_tooutside - ???? Show that this call was sent to an outside line?


    I know I am asking a lot here but I think it would be beneficial to the community if we had a post that clearly defined what each of these fields represent and how they might be used in our custom CDR implementations. I think it would also be useful if someone, who understands, would share an example where you may have more than one Detail record for a call.
     
  2. DavidISC

    Joined:
    Jul 18, 2014
    Messages:
    1
    Likes Received:
    0
    After all this time they still haven't provided information on field definitions?
     
  3. Elvar

    Joined:
    Sep 15, 2014
    Messages:
    1
    Likes Received:
    0
    Here is the information I have gathered. I'm sending the data to Logstash for parsing so I modify what is sent a bit (KV filter is easiest)

    Each call has a callhistory reference, shows how it goes through the system, who answered and so on. In the XML the first part is for the call and then there is a part called DetailsTemplate showing all the extra entries that go with the call.

    First the call
    Code:
    idcallhistory3 - The ID you can use to link the call do the details
    callid - I'm guessing this is for something internal, not of use.
    starttime - Start of the call, timestamp field
    answertime - Answer time, timestamp field
    endtime - End of the call, timestamp field
    from_no - If its direct then this is the same as CallerID, if its to a group the group number is shown here, also if the call goes through a call menu the number of it is shown here
    to_no - Who answered the call
    group_no - Blank if direct, otherwise the Group number
    line_no - The line number used, If you have a 50 line bulk then this will reference what line was used. Not sure how useful this field is.
    is_answ - Was the call answered
    is_fail - Did the call fail for some reason (i.e. Busy)
    is_compl - Call was completed successfully
    is_fromoutside - Did this call originate from outside of the office
    CallerID - Shows the number who called, if its from outside or inside. 
    DialedNumber - Same as to_no I think
    lastCallerID - ????
    lastDialedNumber - ????
    mediaType - The Codec used for this call
    Rate - Billing rate in currency - Defined in the Billing Info table within 3CX management console 
    TotalCost - (endtime - answertime) * Rate
    BillPrefix - Country code as defined in the billing info table within 3CX management console
    BillRateName - Country Name as defined in the billing info table within 3CX management console
    GrpAnswDetail - ????
    NumDetails - Number of detail entries that go with the call
    
    This shows the details, one line is included for every call. If there are transfers of the call then each transfer is a new detail line.

    Code:
    DetailNum - The number of the detail line. 0 is the first entry, 1 the second and so on. Useful for tracking the transfers.
    IdCallHistory2 - The reference ID that matches a idcallhistory3 call entry.
    ParentDetailNum - A reference to a DetailNum field. If we have a DetailNum of 1 then the PrantDetailNum would be 0
    dest_dn - Same as dest_num if internal, if it goes outside then I think this is the line used to call out.
    dest_num - Destination Number
    StartTime - Time this leg of the call was started, timestamp field
    Dur - Duration of this leg of the call
    AnswerTime - Answer Time on this leg of the call, timestamp field
    Status - Either Completed or NotAnswered
    Is_Compl - Either True or False. The field does not matter in the CDR context because 3CX only sends completed calls.
    SpecDstType - This is either None or Queue. Possibly if the call went to a queue or went directly to someone.
    is_tooutside - If this is a call outside
    
    I highly recommend using Logstash for call logs, requires some work but you get all the details. I will try and release my config when I'm done.
     
Thread Status:
Not open for further replies.