[asterisk-dev] Wrong CDR values in my code, but correct in the master.csv file

Joel Jn-Francois voirtech at gmail.com
Wed Jul 15 08:03:27 CDT 2009


Thanks for the feedback. I know for sure that the code is being executed at
the same time.  I will take a look at the channels and see if its losing its
value at some point.  However, the exact code worked on asterisk 1.4.20 on
another 32 bit Linux box running Fedora core.

On Wed, Jul 15, 2009 at 4:49 AM, Kai Hoerner <kai at ciphron.de> wrote:

> 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
>
>
> _______________________________________________
> --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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-dev/attachments/20090715/361b9425/attachment-0001.htm 


More information about the asterisk-dev mailing list