Dismiss Notice
We would like to remind you that we’re updating our login process for all 3CX forums whereby you will be able to login with the same credentials you use for the Partner or Customer Portal. Click here to read more.

CDR Records To Web Service

Discussion in 'CRM / Helpdesk / App Integration' started by John Dugan, Apr 1, 2018.

Thread Status:
Not open for further replies.
  1. John Dugan

    Mar 13, 2018
    Likes Received:
    Hi Folks,

    I am looking to send CDR records to an web service I am building. I am running 3CX on Debian. I assume that the CDR service needs to be setup as a client (see screenshot).

    A few questions:
    1. Can a fully qualified domain name be used instead of an IP?
    2. Is the CDR record data sent to the IP (or FQDN) as JSON?
    3. Is that API call made immediately when the phone call is completed and the CDR record is generated? Or are multiple phone calls batched in a single CDR payload?
    4. Are my assumptions about the CDR setting in 3CX even right to begin with?

    Attached Files:

    • cdr.png
      File size:
      43.6 KB
  2. edossantos

    edossantos Support Team
    Staff Member 3CX Support

    Jun 27, 2007
    Likes Received:
    Hello @John Dugan,

    If you select the "client / active socket" option, then 3CX will try to establish a connection to your server at the specified IP address and port number. Once connected, it will send the information for every call in CSV format (you can also disable the comma delimiter and use fixed field length format).

    3CX will not use JSON or any other custom format. The format is the same no matter if the information is sent to a server via TCP/IP or saved to a file on disk. That is, one line per CDR, with CSV or fixed field length format.

    You can't use an FQDN in the CDR configuration. Only the IP address is allowed.

    The information is sent a few seconds after the call has finished.

    If you need to use a web service receiving JSON data, then you will need an intermediate process to reformat the information for you. For example, you can create a socket server program to receive the information as 3CX generates it, and then send it to your web service in JSON format.

    Kind regards.
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Thread Status:
Not open for further replies.