Need to set CDR(billsec)=0 when call are not answerd

i have inastelled asterisk version 1.8.3.

i have developed IVR .
calls are coming into server using [from-pstn] context successfully.
according to set ivrs prompt customer press input.when customer press 3 then i have forward all calls to the extension number “SIP/1003”.
whenthe extension is not availabe or busy or disconnected the calls in that situationscustomer are not able to communicate with the agent.

now movin on to Master.csv file
so in master.csv file show me 1 records it shows call_status(disposition)="Answer"

But what i need when the customer are not able to reach to the extension so it’s “billsec” should be ="0"
when calls are answerd and customer listening the IVRS prompt

If you only need to record the call after the outbound attempt starts, call ResetCDR before the the Dial.

No i need only 1 record in master.csv and the billsec="0"
when extension not answered finally call is hangup.

when i had set ResetCDR() before Dial it’s show ne 2 records entry in master.csv

Depends on the options you give to ResetCDR.

As it happens, we want both CDRs so we use the option to output the CDR before it is reset.

you can use mysql (asteriskcdrdb) and a trigger to perform this… easy
later you export these rows as csv…