This document introduces the CDR Real-Time Output feature added starting from firmware 1.0.17.16 on UCM62xx/UCM6510 and starting from firmware 1.0.5.4 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.
Implementation
Description
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
Configuration
Login to the UCM6XXX’s Web interface and navigate to Value-Added Features🡪API Configuration🡪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.
Enable | 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 |
Port | CDR server IP port |
Choose either TCP protocol or HTTP/HTTPS protocol | |
Format | Choose either XML or JSON for CDR format |
Username | Enter the Username for authentication. |
Password | Enter the password for authentication. |
Example of a Test Script
The following is a simple Python script to simulate the receiving CDR server.
#!/bin/python
# 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 = ('192.168.124.16', int(port)) //the local IP address
server.bind(address)
server.listen(10)
while 1:
s,addr=server.accept()
data = s.recv(2048) print (data)
s.close()
test()
Whenever there is a call ending, the server will receive the corresponding CDR recording:
