[asterisk-dev] Wrong CDR values in my code, but correct in the master.csv file
Kai Hoerner
kai at ciphron.de
Wed Jul 15 03:49:01 CDT 2009
Hi Joel,
if your data structure does not actually represent a call but the
resulting CSV does, i see two possible reasons for this:
1) you code handles another channel than is written to CSV. where does
"chan" come from?
2) your code is executed during an active call - the CDR is populated
later. when does asterisk execute your code?
Regards,
Kaii
Joel Jn-Francois schrieb:
> Hi everyone,
>
> I am running Opensuse 11.0 on an AMD dual core 64 bit machine. On
> either asterisk 1.6.1 or 1.4.25.1 using asterisk-addons-1.6.1.0 I or
> asterisk-addons-1.4.8, I get incorrect CDR values. cdr->billsec,
> ast_cdr_disp2str(cdr->disposition) and cdr->duration seem to all have
> wrong values. cdr->billsec is always equal to zero and
> ast_cdr_disp2str(cdr->disposition) is always equal to 'NO ANSWER' and
> cdr->duration is equal to zero. However the values in the cdr
> master.csv file has the correct values.
>
> Here are a list of CDR methods and members I am using in my software.
> Some of these methods seem to be working fine, but the values they
> generate are wrong. Should I be using different functions to
> accomplish the same thing instead of having to depend on the cdr routines?
>
>
> ast_cdr_setaccount(chan, chan->exten);
> ast_cdr_setapp(chan->cdr, app, cd->destination);
> cdr->lastdata
> cdr->channel
> cdr->uniqueid
> ast_cdr_disp2str(cdr->disposition)
> cdr->billsec
> ast_cdr_end(cdr);
>
>
> Thanks so much for your help.
>
> Joel
> ------------------------------------------------------------------------
>
> _______________________________________________
> --Bandwidth and Colocation Provided by http://www.api-digital.com--
>
> asterisk-dev mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-dev
More information about the asterisk-dev
mailing list