This document introduces the CDR Real-Time Output feature added starting from firmware 220.127.116.11 on UCM62xx/UCM6510 and starting from firmware 18.104.22.168 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:
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.
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.
CDR server IP address
CDR server IP port
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.
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")
server = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
address = ('192.168.124.16', int(port)) //the local IP address
data = s.recv(2048) print (data)
Whenever there is a call ending, the server will receive the corresponding CDR recording: