One Unified Global Perspective
Communications with a Global Perspective
Home
Intro
Contact Us
Voice over IP
PBX Solutions
Services
Support
Glossary
Open Source
Blog
Forum

WebMail





2007 Feb 08 - Thu

Cisco Callmanager Call Detail Records (CDR) with Perl

It is possible to obtain Cisco Callmanager Call Detail Records through Perl. However, there are a few prepatory steps to make it work.

Because Cisco recommends that Callmanager not be a member of a domain, it isn't possible to use flow through authentication to access the SQL Database server when on a host other than Callmanager. Cisco therefore suggests that SQL Authentication be changed to 'Mixed Mode'. This can be accomplished by starting sQL Enterprise Manager on the Callmanager Server containing the CDRs (there should only be one server in the cluster with CDR responsibilites), right click on the server name and select properties, select the security tab, and choose 'SQL Server and Windows' for authentication. Callmanager will need to be restarted.

To connect to the database tables, one could code the sa username and password into the queries, but that probably isn't a very good thing. Instead, I'd suggest creating a new login, call it cdr_reader, and assign it to the CDR database with public and db_owner roles.

Perl DBD drivers for Sybase can be used for connecting to the SQL 2000 database tables in Callmanager 3.3 and 4.X. For those who aren't using Debian, steps outlined at Linux Journal and FreeTDS: Tabular Data Stream.

For Debian users, obtaining the package is as simple as running 'apt-get install libdbd-sybase-perl' from unstable or testing. As of the time of this writing, I don't think Stable has the most recent and appropriate version.

I then modified the example from a Perl HowTo slightly to give it a try:

#!/usr/bin/perl

#-- open database
use DBI;
my $dbh = DBI->connect('DBI:Sybase:server=10.10.10.10','cdr_reader','password') or die $DBI::errstr;
$dbh->do("use CDR");

#-- sample query
my $rows = $dbh->selectrow_array("SELECT COUNT(*) FROM CallDetailRecord");
print "CDR has $rows records\n" if ( defined $rows );

That turned out to be quite straightforward. I'll publish another article with some perl queries and summaries I've used.



Blog Content ©2009
Ray Burkholder
All Rights Reserved
ray@oneunified.net
(441) 505 7293
Available for Contract Work
Resume

RSS: Click to see the XML version of this web page.

twitter
View Ray 
Burkholder's profile on LinkedIn
technorati
Add to Technorati Favorites



February
Su Mo Tu We Th Fr Sa
       
8
     


Main Links:
Monitoring Server
SSH Tools
QuantDeveloper Code

Special Links:
Frink

Blog Links:
Sergey Solyanik
Marc Andreessen
HotGigs
Micro Persuasion
... Reasonable ...
Chris Donnan
BeyondVC
lifehacker
Trader Mike
Ticker Sense
HeadRush
TraderFeed
Stock Bandit
The Daily WTF
Guy Kawaski
J. Brant Arseneau
Steve Pavlina
Matt Cutts
Kevin Scaldeferri
Joel On Software
Quant Recruiter
Blosxom User Group
Wesner Moise
Julian Dunn
Steve Yegge
Max Dama

2007
Months
Feb




Mason HQ

Disclaimer: This site may include market analysis. All ideas, opinions, and/or forecasts, expressed or implied herein, are for informational purposes only and should not be construed as a recommendation to invest, trade, and/or speculate in the markets. Any investments, trades, and/or speculations made in light of the ideas, opinions, and/or forecasts, expressed or implied herein, are committed at your own risk, financial or otherwise.