Call detail API

Discussion in 'CRM / Helpdesk / App Integration' started by Goga, Mar 26, 2018.

  1. Goga

    Mar 31, 2017
    Likes Received:
    Is it possible to retrieve all below information from Call Detail API.

    Agent Name , Agent ID, Extension, Call Handled, Call Presented, Handle Ratio, Handle Time (Avg, Max), Talk time (Avg, Max) , Hold time (Avg,Max), Work time(Avg, max), Idle Time(Avg,Max).

    Or which API can help me to retrieve all above information.

    Attached Files:

  2. edossantos

    edossantos Support Team
    Staff Member 3CX Support

    Jun 27, 2007
    Likes Received:
    No API will give you all that information ready. You need to process the information of the calls, make your calculations and get your final numbers. The easiest way in my opinion is taking the information from CDRs, so you can post process it.

    For some of the fields, like the agent name for example, you can use the 3CX Call Control API. Using that API you can get the extension details from the extension number:

    Kind regards.
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. voiptoys

    voiptoys Member

    Feb 13, 2013
    Likes Received:
    I concur with Ernesto. The best, supported, source for this data are the CDR files that 3CX can generate automatically for you. You will have to process the text files to get the data into a database so that you can create reports from the data, but that's fairly simple using our 3CX Exporter tool. These CDR files should have all the information you need to calculate the values you want. Pulling extension details using the Call Control API can be a bit challenging for some, but it is absolutely possible.

    A 3rd option is to pull the data from the 3CX PostgreSQL database. I suggest you to use the PostgreSQL database as your option of last resort simply because 3CX doesn't like you directly accessing the database. Our Exporter tool can also be used to synchronize the data in the PostgreSQL database with either SQL Server or MySQL. It's been in use now for 7 - 8 years (I forget exactly how long) with no reported issues, so if you must get the data from PostgreSQL, then 3CX Exporter is a safe way to do it. If you choose to go the PostgreSQL route, the table you want is callcent_queuecalls.
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...