Showing results for 
Search instead for 
Did you mean: 

CMS 2.x configure for write and export CDR on CDR Receiver

Dear all,

I have configured the CMS 2.0.7 (ex Acano) and everything works, I now have to configure the CDR to control calls statistics. I followed the CDR and API guides to create the CDR Receiver ... like this We have tried via GUI and via API....

API 2.0 - CDR 2.0

I don't have Acano Manager,it is not necessary according to the guide.
The CMS does not report connection errors.

I have not found what are the characteristics of "CDR Receiver", IIS, WEBDAV, Apache, SFTP, FTP, Share...etc.

If the CMS has to write the files, how it does?

Any help is appreciated.

Thanks a lot


16 Replies 16

Jason Neurohr
Level 1
Level 1

Hi Massimo,

You don't need Acano Manager but, you do need something that can receive the CDR data and parse it. Essentially you need a web service that will accept POST requests from the CMS and then handle the data in a useful way.

What is in your post?

Acano/CMS do not store the CDR data in a file that you can access, so the CDR receiver is required.

If you're at all familiar with python, I wrote a small script which run's as a listener that you can configure as the CDR receiver, it can be found here:


Hi Jason,

Please explain how to use your cdr receiver script.

Thank you

Assuming you have python installed and working, and you have the python file in the directory C:\CDRs.

python C:\CDRs\ -f C:\CDRs\cdr_log.txt

This will start the listener on TCP port 9999 (so make sure this is open on any host firewall or firewall between the CMS and the server running the script). CDRs will be written to the cdr_log.txt file in the same directory (designated by the -f <file_path>)

Then in CMS either through web admin or the API, add a CDR receiver in the form of http://<ip_address_of_receiver_host>:9999/<CMS Name>


Hi Jason

I can't run because it is <!DOCTYPE html>.

Please suggest for edit or setting script.

Thank you so much

It sounds like you haven't downloaded it properly. Simplest method is to go to the repo page here:

On the right side, there is a green button called Clone or download, Click that.

Click Download ZIP

Once downloaded, extract the zip file and then try what I described above again.


Hi Jason,

It's work. I'm beginner for python. Thank you so much.

HI Jason,

Thanks for the script, may i know what is <CMS Name> in the above example? where do we need to pass server address?

Hi Suresh,

In this version of the script <CMS Name> is not used currently. It is for future use if the script is extended. The intention is for <CMS Name> to be the hostname of the server to uniquely identify it via the POST URL request itself.


Hi Jason,


I trying enable the CRD with the step of your post, but I couldn't do it. 


Where do I need to apply this command?

python C:\CDRs\ -f C:\CDRs\cdr_log.txt


I have installed the python 3.7.1

Do I need to do something with file and cdr_log.txt.

I just put both of them in the path c:CDRs.





Hi Jason,


I can run the script. Thank you so much.

There isn't a problem about SIP call but when i call on CMA (webrtc), I get this error.


Traceback (most recent call last):
File "C:\Users\194123\AppData\Local\Programs\Python\Python37-32\lib\", line 316, in _handle_request_noblock
self.process_request(request, client_address)
File "C:\Users\194123\AppData\Local\Programs\Python\Python37-32\lib\", line 347, in process_request
self.finish_request(request, client_address)
File "C:\Users\194123\AppData\Local\Programs\Python\Python37-32\lib\", line 360, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "C:\Users\194123\AppData\Local\Programs\Python\Python37-32\lib\", line 720, in __init__
File "C:\Users\194123\AppData\Local\Programs\Python\Python37-32\lib\http\", line 426, in handle
File "C:\Users\194123\AppData\Local\Programs\Python\Python37-32\lib\http\", line 414, in handle_one_request
File "", line 48, in do_POST
self.parse_cdr(record_type, cdr, session_id, callbridge_id)
File "", line 217, in parse_cdr
if 'duration' in cdr['callLeg']['rxAudio']['packetStatistics']['packetLossBursts']:
KeyError: 'packetStatistics'




Thanks Jason. 

This is most useful. 

Quick question though. I simply want to write out the inputs (rather than convert to JSON) as I've written an XML parser. I assume the input is contained in post_body and I can call write_to_disk with it immediately after this line:

post_body = 

Please let me know



Thanks for the script.

After executing, I am always getting:

Traceback (most recent call last):
File "C:\CMS_CDRs\", line 354, in <module>
File "C:\CMS_CDRs\", line 351, in main
File "C:\Python27\lib\", line 231, in serve_forever
File "C:\Python27\lib\", line 150, in _eintr_retry
return func(*args)

Can you help please?



Hi Petar,

Please try using Python version 3.5.



Hi Jason,


after executing, I got the message:


Traceback (most recent call last):
File "C:\cmscdr\", line 2, in <module>
import xmltodict
ImportError: No module named 'xmltodict'


please help, thanks.