cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
7634
Views
25
Helpful
16
Replies

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 http://10.10.10.10/CMSCDR. 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

Massimo 

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 http://10.10.10.10 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: https://github.com/jasonneurohr/acano_cdr_receiver

Jason

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\cdr_receiver.py -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>

Jason

Hi Jason

I can't run acano_cdr_receiver.py 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: https://github.com/jasonneurohr/acano_cdr_receiver

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.

Jason

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.

Jason

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\cdr_receiver.py -f C:\CDRs\cdr_log.txt

 

I have installed the python 3.7.1

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

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

 

Thanks,

 

 

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\socketserver.py", line 316, in _handle_request_noblock
self.process_request(request, client_address)
File "C:\Users\194123\AppData\Local\Programs\Python\Python37-32\lib\socketserver.py", line 347, in process_request
self.finish_request(request, client_address)
File "C:\Users\194123\AppData\Local\Programs\Python\Python37-32\lib\socketserver.py", line 360, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "C:\Users\194123\AppData\Local\Programs\Python\Python37-32\lib\socketserver.py", line 720, in __init__
self.handle()
File "C:\Users\194123\AppData\Local\Programs\Python\Python37-32\lib\http\server.py", line 426, in handle
self.handle_one_request()
File "C:\Users\194123\AppData\Local\Programs\Python\Python37-32\lib\http\server.py", line 414, in handle_one_request
method()
File "acano_cdr_receiver.py", line 48, in do_POST
self.parse_cdr(record_type, cdr, session_id, callbridge_id)
File "acano_cdr_receiver.py", 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 = self.rfile.read(content_len) 

Please let me know

Thanks

Craig

Thanks for the script.

After executing, I am always getting:

Traceback (most recent call last):
File "C:\CMS_CDRs\cms_cdr_receiver.py", line 354, in <module>
main(sys.argv[1:])
File "C:\CMS_CDRs\cms_cdr_receiver.py", line 351, in main
httpd.serve_forever()
File "C:\Python27\lib\SocketServer.py", line 231, in serve_forever
poll_interval)
File "C:\Python27\lib\SocketServer.py", line 150, in _eintr_retry
return func(*args)

Can you help please?

Regards,

Petar

Hi Petar,

Please try using Python version 3.5.

Thanks

Jason

Hi Jason,

 

after executing, I got the message:

 

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

 

please help, thanks.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: