Showing results for 
Search instead for 
Did you mean: 

Collect CDR from Cisco voice gateway into a Realtime database





Customers have requirement to log Call Detail Records (CDRs) from Voice over IP (VoIP) systems for accounting or billing purposes. The recommended way to do this is with an external authentication, authorization, and accounting (AAA) server (RADIUS or TACACS). These AAA systems often provide CDR logging, post call record processing, and a billing report generation facility.


This document provides a sample configuration for collecting CDR from Media Gateways in to Realtime database Servers.




This is enables the Mediagateway to generate CDRs and send them to the AAA Radius/TACACS Server or Syslog Server.





To  enable an accounting method for collecting call detail  records (CDRs),  use the gw-accounting command in global   configuration mode. To disable an accounting method, use the no form of this command.


gw-accounting {aaa | file | syslog [stats] }


no gw-accounting {aaa | file | syslog [stats] }



gw-accounting {h323 [vsa] | syslog | voip}


no gw-accounting {h323 [vsa] | syslog | voip}


Syntax Description




Enables accounting through the AAA system and sends call  detail records to the RADIUS server in the form of vendor-specific attributes  (VSAs).




Enables the file accounting method to store call detail  records in .csv format.




Enables the system logging facility to output accounting  information in the form of a system log message.




(Optional) Enables voice quality statistics to be sent to the  system log.




Enables standard H.323 accounting using Internet Engineering  Task Force (IETF) RADIUS attributes.




(Optional) Enables H.323 accounting using RADIUS VSAs.




Enables generic gateway-specific accounting.



Configuration for sending CDR to AAA server (Radius)


Configuration for sending CDR to AAA Server (Radius or TACACS)



router (config) # aaa new-model


router (config) #aaa group server radius cdradius

server auth-port 1645 acct-port 1646


router (config) #aaa authentication login default none

! -- Enables AAA to prevent Telnet authentication via AAA.


router (config) #aaa accounting connection h323 start-stop group cdradius

! -- Generates the H.323 call start/stop CDRs.


router (config) #aaa session-id common


router (config) #gw-accounting aaa

! -- Sends the H.323 CDRs to the AAA Server



router (config) #line vty 0 4

exec-timeout 0 0

password 7 121A0C521104




Configuration for sending CDR to Syslog server


There can be some situations where the AAA server is not available, but there is still a requirement for CDR logging. In such a case, it is possible to use the syslog capabilities of the Cisco gateway or router to log VoIPCDRs to an external syslog server. These records are in comma separated variable (CSV) format. They can easily be loaded and processed by an external software application such as a spreadsheet or a database. The syslog server software can run on a basic PC.


router(config)#aaa new−model
router(config)#aaa authentication login default none
! -- Enables AAA to prevent Telnet authentication via AAA.

router(config)#aaa accounting connection h323 start−stop radius
! -- Generates the H.323 call start/stop CDRs.

router(config)#gw−accounting syslog
! -- Sends the H.323 CDRs to the syslog server.

! -- The IP address of the syslog server. Multiple syslog servers can be specified for redundancy.



NTP must run on the Cisco IOS router or gateway to ensure the H.323  start/stop records have the correct time value.


Related Information




This document was generated from the following thread: Collect cdr from cisco gateway AS5300 into a database in realtime



can we get CDR for multiple FTP server? like CUCM?


Hi Muthurani,

This is very useful information.

This CDR accounting can be used with SIP calls as well or only for h323? Also it requires some radius software like to store these CDRs right?




Content for Community-Ad

This widget could not be displayed.