Cdr

Hi,

I have a problem with my CDR. It has been stored on MySql Database. In the field ‘disposition’, i have only ‘ANSWER’ or ‘NOANSWER’. Some times, I send a CONGESTION/BUSY command (During or after the dial) on a channel and on the CDR I have always ‘ANSWER’. I don’t understand why in my CDR, i don’t have any trace of the hangup cause.

Help me please^^

Because you explicitly, or implicitly, answered the incoming leg before Dialing the outgoing leg. If you want to distinguish the outgoing leg, and really need to answer the incoming one early, you will need to use ResetCDR (or possibly ForkCDR).

Many dialplans call Answer unnecessarily.

i don’t understand what is exactly ResetCDR and ForkCDR.

ForkCDR create 2 CDR entries. I don’t understand the mechanism.

ResetCDR : After this command for each action a ligne is create. For example, if my dialplan is like this :

ResetCDR ()
Dial(…)
Congestion()

What’s happen? I have 2 ligne one for Dial, and one for Congestion? That right?

I never really worked out ForkCDR. ResetCDR, with the right options, can be used to remove the answered status from the CDR, so that it is able to receive other statuses. With the right option, you will get a line for ResetCDR itself. I am not sure whether you can force the status after a timed out Dial, but it at least allows you to report the status from Dial. We don’t try and manipulate the status, other than by further ResetCDRs, so I’m not sure of the details.

If you want to do anything clever, you should use call even logging, not CDRs.