In theory, you can use something like Hyperterm to capture the SMDR logs.
Somewhere (maybe somewhere on this forum) someone wrote a perl package that will capture it.
When I get some time I'll poke around to see if I can find it.
But as V2win mentioned, to do it right you need a professional call accounting package.
Ralph