CDR Real-time Output Feature

  • Updated on September 15, 2023

This document introduces the CDR Real-Time Output feature added starting from firmware on UCM62xx/UCM6510 and starting from firmware on UCM630xA. While there are currently no issues with using UCM’s existing CDR tools are for generating reports, it is highly recommended to eventually implement integration with CDR Real-Time Output, which ensures that no records are overlooked and provides a simpler interface to work with than current methods. Additionally, this may improve 3rd party CDR integration and CTI application functionality.

This new feature uses a real-time CDR output module for Asterisk 11+ and offers the following functionality:

  • Connects to the configured server address/port and delivers CDR strings as soon as they are available in Asterisk.
  • Has buffer support. If the configured server is not available at the time of delivery, a buffer file will be created and will be delivered as soon as a connection is established.



To use this new feature, users need to deploy a CDR server to receive the records in real-time. The server’s IP address and the port number will then need to be configured on the UCM in Value-Added Features🡪API Configuration🡪CDR Real-Time Output Settings. When a CDR entry is generated, the UCM will immediately push the generated record to the configured server.

If the server connection fails, records will be cached in the UCM until the connection is reestablished. In order to avoid having the cache become too large, up to 10,000 records can be cached.

Currently, all available CDR fields and values are sent to the configured server. The following CDR fields will be sent when records are generated:

  • accountcode
  • src
  • dst
  • dcontext
  • clid
  • channel
  • dstchannel
  • lastapp
  • lastdata
  • start
  • answer
  • end
  • duration
  • billsec
  • disposition
  • amaflags
  • uniqueid
  • userfieldchannel_ext
  • dstchannel_ext
  • service
  • caller_name
  • recordfiles
  • dstanswer
  • chanext
  • dstchanext
  • session
  • action_owner
  • action_type
  • src_trunk_name
  • dst_trunk_name


Login to the UCM6XXX’s Web interface and navigate to Value-Added Features🡪API Configuration🡪CDR Real-Time Output Settings.

Figure 1: CDR Real-time Output Settings

On this page, users can configure the CDR receiving server details so the UCM can send CDR details in Real-Time to the configured Server. users can either send the data via TCP or HTTP/HTTPS in JSON and XML formats, below are fields and options descriptions.


Enables real-time CDR output module. This module connects to selected IP addresses and ports and posts CDR strings as soon as it is available.

Server Address

CDR server IP address


CDR server IP port

Delivery Method

Choose either TCP protocol or HTTP/HTTPS protocol


Choose either XML or JSON for CDR format


Enter the Username for authentication.


Enter the password for authentication.

Table 1: CDR Real-time Output Settings

Example of a Test Script

The following is a simple Python script to simulate the receiving CDR server.


# To test the cdr realtime sending function

import string import urllib2 import time import socket

port = raw_input("Please enter the bind port like: 1000\n")

#wait connect

def test():

server = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
address = ('', int(port)) //the local IP address

while 1:

data = s.recv(2048) print (data)


Whenever there is a call ending, the server will receive the corresponding CDR recording:

Figure 2: CDR Recording Output Example

Was this article helpful?

Related Articles

Need Support?
Can’t find the answer you’re looking for? Don’t worry we’re here to help!
Contact Support

Leave a Comment