In a previous post about busy/release of CDR, I asked if anyone was curious about capturing CDR from Avaya Communication Manager using a Kiwi Syslog server. At least one of you was, so here it is.
There are two parts of course. One part is programming the phone system to send CDR. And the other part is programming Kiwi to capture CDR. These can be done in either order, but if you program the phone system first, the CDR buffer will fill as is tries to establish the connection with Syslog.
So let’s start with Kiwi. Your version may differ. In my case, the network team already had a rather powerful installation of Kiwi on some great hardware. All I had to do was configure it to capture Avaya CDR. So when you launch the Kiwi dashboard, click File->Setup and in the “Server Setup” window, scroll to the bottom for “Inputs”.
In the TCP section, tell Kiwi to listen for TCP messages on whatever port you wish. I’m using 5013 – probably because I saw it in an Avaya doc somewhere. But you can use any port.
Then scroll up to the “Rules” section and configure a new rule to match for messages from your Avaya Communication Manager.
In my case, I named my rule “Call Records from LA PBX”. I set a filter by IP address. If you also send any other information to Kiwi from the CMs, then you’ll want to filter by the Priority field. You want the Local7 field to be Debug. I don’t recall why this works. I think I was looking at the data one day to try to separate the CDR from the other syslog messages from Avaya and this seemed the easiest way to do it.
Once you have those two filters – IP address and Local7.Debug, you need to create an action. My action above is a little misleading. All you really need is one that logs to a file, then stops processing. If you’d like, you can also display it to one of the virtual displays in Kiwi. I log to a text file on the local file system:
Now, if we program our PBX correctly, we should get CDR to these text files!
Step 2 – Program the Avaya Communication Manager
Programming the Communication Manager is three steps: Add the node-name, set the ip-services, and change the system-parameters cdr.
To set the node name, ‘change node-name ip’ and create an entry for the IP address of your Kiwi server. This is basically the DNS lookup for the CM. This sets the name and IP address. Any name will do. Enter the IP address of your Kiwi server.
change node-names ip Page 1 of 2 IP NODE NAMES Name IP Address SL_LSP 10.10.60.10 CHA_LSP 10.10.1.10 Chicago 10.10.148.2 Chicago_LSP 10.30.10.10 DO_LSP 10.20.16.10 Smoot 10.87.176.11 Gateway006 10.46.12.1 LA 10.10.19.6 LA_ESS 10.44.192.10 LE_ESS 10.58.200.10 LA_SM 10.59.29.16 ( 16 of 44 administered node-names were displayed ) Use 'list node-names' command to see all the administered node-names Use 'change node-names ip xxx' to change a node-name 'xxx' or add a node-name
Next, set the ip-services. I have squeezed all three screens here. The important thing here is page three. We need to set the “Reliable Protocol” to n. I think Avaya defaults this to y and it works great for their pre-packaged CDR partners. For home-grown syslog, we set this to n. It may not hold up in court if there’s ever a dispute.
change ip-services Page 1 of 3 IP SERVICES Service Enabled Local Local Remote Remote Type Node Port Node Port CDR1 procr 0 la_syslog 5013 CDR2 procr 0 prognosis 50000 change ip-services Page 2 of 3 IP SERVICES Service Enabled Local Local Remote Remote Type Node Port Node Port change ip-services Page 3 of 3 SESSION LAYER TIMERS Service Reliable Packet Resp Session Connect SPDU Connectivity Type Protocol Timer Message Cntr Cntr Timer CDR1 n 10 3 3 10 CDR2 n 10 3 3 10
And last step – set the system-parameters for CDR. Here’s the thing. You have lots of options here. You can define fields, separators, etc. But I discovered that there is a line length limit that is not obvious. Also, the caller-id name is surprisingly absent. Rather than customize the CDR, I have gone back to “unformatted” and let further processing figure it out.
change system-parameters cdr Page 1 of 1 CDR SYSTEM PARAMETERS Node Number (Local PBX ID): 2 CDR Date Format: month/day Primary Output Format: unformatted Primary Output Endpoint: CDR1 Secondary Output Format: unformatted Secondary Output Endpoint: CDR2 Use ISDN Layouts? n Enable CDR Storage on Disk? n Use Enhanced Formats? n Condition Code 'T' For Redirected Calls? n Use Legacy CDR Formats? y Remove # From Called Number? n Modified Circuit ID Display? n Intra-switch CDR? y Record Outgoing Calls Only? n Outg Trk Call Splitting? y Suppress CDR for Ineffective Call Attempts? n Outg Attd Call Record? y Disconnect Information in Place of FRL? y Interworking Feat-flag? n Force Entry of Acct Code for Calls Marked on Toll Analysis Form? n Calls to Hunt Group - Record: member-ext Record Called Vector Directory Number Instead of Group or Member? n Inc Trk Call Splitting? n Record Non-Call-Assoc TSC? n Call Record Handling Option: warning Record Call-Assoc TSC? n Digits to Record for Outgoing Calls: dialed Privacy - Digits to Hide: 0 CDR Account Code Length: 15 Remove '+' from SIP Numbers? y
I have a perl script that parses unformatted cdr. Anyone want to see it?
UPDATE 2021-09-15 – I posted the Perl script to process unformatted Avaya CDR here.
Anyway, when you have this set up, you can status CDR to make sure the link is up:
status cdr-link CDR LINK STATUS Primary Secondary Link State: up up Date & Time: 2016/04/17 08:43:29 2016/05/09 10:12:20 Forward Seq. No: 0 0 Backward Seq. No: 0 0 CDR Buffer Full: 0.00 0.00 Reason Code: OK OK
The good news here is the link state(s) are “up” and the CDR buffer full is 0. If you have trouble, you can “busy cdr primary” and “release cdr primary” to close and open the socket. You should see a blip in the Kiwi server when this happens.
Make a call and watch Kiwi! You may need to check the log files rather than rely on the Kiwi display. The extra CR/LF will sometimes make Kiwi look funky but the text file is usually just fine.
Let me know how it goes for you!
Roger
This is very timely. Thank you very much. I shall try and put this to good purpose.
Hey it worked!
Great! Funny – I thought your first post was spam. I’m so glad it worked!
Roger, I have tried to collect CDR from an Avaya and am not getting it. IDK what I need to collect the data. I have an IP address for the CDR output on the PBX and I have pinged it successfully. When I try to connect to it using Putty and telnet port 23, I get prompted for a login. The header is BITStream SDT, BillingIT. Is this a separate appliance that I am trying to connect to, or is this how the Avaya PBX sends data?
Typically any product that accepts CDR will receive it on an upper port like 5000 or something. When you ‘status cdr’ I assume the CDR link is down? So the PBX just throws it out at the end of every call, and something on the other side is supposed to catch it. Any syslog server can do it. But there are specialized products that are designed for it also. It looks like you have BillingIT (billingit.com). Try to hit that internal IP address with a browser (both http: and https:) and see if you get a login.
Roger, the CDR link is not down when I stat cdr
Roger, can we use multiple Avaya system to send CDR to 1 KIWI application with different ports.
we do manage services for multiple customer and we are trying to provide them a CDR reports… we have a IBM tool who can parse the data in un formatted data.. but they need it as a file.
SO ideally my qustion is
will KIWI supports multiple Avaya systems
Is it a freeware
Sure. Kiwi only listens on ONE TCP port, so you’ll have to configure all your PBXs to send to the same port. But in Kiwi, you create a rule for each IP address so each PBX can log to a different file (unless all your PBXs are the same IP address). I don’t think Kiwi is freeware. It’s from Solar Winds. But there are lots of freeware options. I’m especially excited about the ELK stack and hope to convert my CDR (and all syslogging from my PBXs) to ELK someday since it seems to have some great analysis and UI. And it’s completely free.
I do have a perl script that listens for unformatted CDR and dumps it into database. Would that be helpful to see?
Yes I for one would like to see the perl script.
Thanks
I have a perl script that parses unformatted cdr. Anyone want to see it?
I want to see it 🙂
Thanks Tommy. I’ll get it posted!
Roger, you’re the best! Thanks for being so generous with your info.
Fan from many years.. Thanks
Wow, thanks Michael! I’m sorry I’ve been neglecting this blog. I have a lot to tell you.
Hi Roger,
Do you mind sharing the Perl script please. Btw, did you manage to get th SLK stack up and running to parse the logs to CDR.
I am working on an Audiocodes gateway which spits out the CDR in syslog format and I am loooking at ways to collect them with an option for resilience.
Regards
Robert
Hi Robert – I’m just going through some old comments and realized I never responded to you. I did post this perl script – probably because of your comment. I apologize for not responding. The blog post is here: http://rogerthephoneguy.com/how-to-parse-avaya-cdr-into-mysql-database-with-perl/