11-23-2016 03:28 AM - edited 03-17-2019 06:30 PM
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
11-24-2016 11:59 AM
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
04-10-2017 12:54 AM
Hi Jason,
Please explain how to use your cdr receiver script.
Thank you
04-10-2017 04:20 PM
Assuming you have python installed and working, and you have the python file in the directory C:\CDRs.
python C:\CDRs\cdr_receiver.
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
Jason
04-10-2017 10:49 PM
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
04-12-2017 06:44 PM
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
04-18-2017 07:52 AM
Hi Jason,
It's work. I'm beginner for python. Thank you so much.
08-14-2017 04:04 AM
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?
08-14-2017 04:54 PM
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
12-12-2018 07:12 AM
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,
04-08-2020 02:51 PM
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'
07-06-2017 03:30 AM
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
07-24-2017 05:31 AM
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
07-25-2017 03:08 AM
Hi Petar,
Please try using Python version 3.5.
Thanks
Jason
09-26-2017 02:26 AM
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.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide