CDR Records To Web Service

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

  1. John Dugan

    Joined:
    Mar 13, 2018
    Messages:
    10
    Likes Received:
    0
    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?
    Thanks!
     

    Attached Files:

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

    edossantos Support Team
    Staff Member 3CX Support

    Joined:
    Jun 27, 2007
    Messages:
    908
    Likes Received:
    70
    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...