Have you checked this aptly named wiki section?

http://wiki.freeswitch.org/wiki/CDR#Putting_Together_CDRs

-Avi