Free call logging and detail reporting in Asterisk/Trixbox.

I need to be able to log a few different things within our Asterisk 1.4 phone system.  I need to know what number an incoming call is from, which DID it is going to (not the final ring roup as the built-in CDR module does, but the actual  DID number that people are calling), how long the call rang before someone picks it up, whether the call was answered or not, and the call duration if answered.  

Does anyone know of a free or open source solution that will allow me to do the above?
OAC TechnologyProfessional NerdsAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

The asterisk built in logging to postgres database will do that. To record the original did you will need to record it in the dialplan and write it to either the custom or accountcode field in the cdr. For ring duration you could calculate the difference between the total call length and the length of the audio conversation
OAC TechnologyProfessional NerdsAuthor Commented:
Is there a guide on how to do either of those?

grbladesCommented: covers setting up the postgres database. is a similar guide if you would prefer to use mysql. lists the various CDR variable.

So the following will set the userfield to the incoming DID. It will need to be set before the call is diverted to any other extension.

duration-billsec will be the total time for the call minus the time the call was connected for. This should be the time it was ringing for before it was answered.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
IP Telephony

From novice to tech pro — start learning today.