CDR to MYSql Database

Discussion in '3CX Phone System - General' started by Yennick, Mar 6, 2018.

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

    Joined:
    Feb 15, 2018
    Messages:
    4
    Likes Received:
    0
    is it possible to add cdr call logs to a mysql database .
    i need to show these call logs on my webpage.But we cant put it in a local textfile since the company we do a project for can't do it that way or doesn't want it that way
     
  2. Saqqara

    Saqqara Active Member

    Joined:
    Mar 12, 2014
    Messages:
    877
    Likes Received:
    135
    Not by default - cdr option will only output to a text file.

    You would have to create a application to read the text file and import into mysql
     
  3. mariosM_3CX

    mariosM_3CX Support Team
    Staff Member 3CX Support

    Joined:
    Nov 1, 2017
    Messages:
    401
    Likes Received:
    36
    Hello @Yennick

    As per this https://www.3cx.com/community/threa...-count-how-many-calls-each-phone-takes.54619/ , yes this is possible but not directly from the PBX.
    PBX will merely output the CDRs to a socket (or a file). Then it's up to you how will you read these and import them in the Database.

    I would go with creating a small passive server application, listening for connections from the PBX. (so PBX will act as a client - active CDR mode) Every time a call is done, PBX will connect to this application and write the CDR. All this server application will do is wait for connections from the PBX. Once a connection is established, read the CDR and insert into the Database.
    Now from your webpage read the DB and refresh as needed.

    Let me know if you need any clarification.
     
Thread Status:
Not open for further replies.