Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CDR with netcat

Status
Not open for further replies.

ObLogic7

IS-IT--Management
May 19, 2011
31
0
0
US
I am having trouble collecting CDR data on my CentOS box following the instructions on the following post...


I have netcat listening successfully as confirmed by sending a request from my browser. I have the node-name and ip-service setup on my phone system as well as the configuration on 'ch sys cdr'. I am trying to setup the CDR data on CDR2 since CDR1 is in use by our Tapit system.

Even though netcat is listening on the correct port, the secondary CDR link shows that it is down and not sending data. I have tried to busy out and release the link, but it doesn't help.

Any ideas on why this is no longer working? Did something change with CM that prevents this from working? Currently running CM v5.2.1.
 
Have you verified on your linux box that you are not blocking that port in a firewall setting, can you ping the node-name from within the pbx? I am using port 9000, and had a bit of trouble to untill I made an exception on the firewall.
 
I do not have any ports blocked on my Linux box. I see a connection on netcat from my machine when I try to connect to the same port on my browser, so I'm pretty sure everything is working on that end.

When I try to ping the node-name from within ASA it tells me 'Must execute this command from the server.' If I SSH into the server, I can ping my Linux box and can SSH into it as well. However, I cannot telnet into the port that I have set netcat to listen on.

At this point, I'm not sure why it is not working or what to try next.
 
I'm on CM 3 using SUSE and netcat. My issue was the simple firewall was blocking the port I had pointed it at, after that it started going smooth. A few other things you can try....

Scan for open ports on the definity:
$ netcat -z 192.168.X.X 9000-9500 (or whatever)

Verify your Node-Name is set correct

Verify IP-Services and default Gateway settings are correct

Use another machine to test netcat:
$ netcat -l 9000 on one machine
and $ netcat (IP of machine listening)on seperate machine......
bang on the keyboard and see if the collection server sees it.

busy cdr secondary, rel cdr secondary

get a soda,smoke a cigerette,and try again :)

Not sure what all you have tried, but good luck!
 
I have already tested using the methods you have suggested. I can make a connection to netcat from other machines, just not from my CM servers. Does COM have a firewall that may be blocking the outbound connections? If so, where are the settings? That is all I can think of that would be causing this not to work.
 
Something else that I have noticed is that my CM server is actually attempting to make a connection. If I do 'netstat -a' I see that it is sending SYN, but not actually getting an ACK back to establish the connection. This makes me wonder if the incoming port is blocked on the CM server side and preventing the connection from being established.

Any other ideas of what to check? Firewalls on CM, etc?
 
I messed with this a long time ago, and used it pretty extensively. Had the data all getting pumped into a SQL database, had a bunch of .asp web pages written etc...

If you want an alternative to netcat, try Bytewedge, I think there is a trial. It will parse the data out for you however you want and into any kind of format you want.
 
I have also tried listening for the onnection using the following command...

socat tcp-listen:9002,reuseaddr -


However, it behaves the same as netcat. I can connect to both netcat and socat from my workstation. This tells me that there is something else (most likely on the CM server) that is preventing the connection.
 
Just curious, but what port is your real CDR application listening on? If it is listening on port 9002, and working, then there probably isn't an internal firewall blocking the connection. Maybe in 5.2 you need to define a “trusted server”? Can you install wireshark and get a better capture? CM should send CentOs a SYN, CentOs should reply with a SYNAck, and set the transmission and be all happy. If CM is sending a SYN I can’t imagine there would be an external firewall setting on the CM at all. Sorry, at this point I am just a sounding board and not really helping. Maybe someone out there could give better trouble shooting advice. You definitely have some conflicting results….. Is there a way you can try using the Avaya RDDT package. I haven’t used it, but maybe that will get you something you can use.
 
CaNiBuS,
Do you have any information you could share on how to get the data into a sql database?
Right now I'm using "ncat -l -p 50000 >> c:\my-billing.txt &" to send everything to a file. But I would like it to go to a database.
Do you still have the .asp code?
I'm just looking for a jump start, I guess.
 
Wow, I haven't messed with this in forever. I don't work at the company that I was doing this at anymore. Someone else actually wrote the port listener for me that was dumping it to the database. I wrote the .asp pages that displayed the data in web pages. The apps would have been specific to my environment anyway - digit length, etc... I still have the port listener app though, I think its written in .NET if you know how to program, I have the source files. I also found an .asp in some old emails you could use as a reference for developing your web pages.

An alternative to making your own port listener might be an app I discovered after the project - it is called ByteWedge. I think this will give you a more robust way to capture the data and store it to whatever you want - sql, .csv, database file, etc...
Ah...looks like I wrote a thread about back in 2008 - look at thread690-1486227

One of the important things to consider is error control. Sometimes the switch will spit out garbage, so you want to make sure that you check the records for validity (proper length, alpha when they should be alpha, numeric when they need to be numeric, etc...) so that you dont end up with garbage in your database.

The company I am at now uses an Avaya system, and they still run Lucent CAS! Until a few months ago, it was still running on its original pc on Windows 98. I got it running on a new machine in VMWare. Going physical to virtual with Windows 98 without reinstalling anything was a pain!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top