[asterisk-dev] ANSWERED channel chan->cdr->billsec=0 ?
ast guy
astguy at gmail.com
Mon May 8 23:46:57 MST 2006
On 5/4/06, Russell Bryant <russell at digium.com> wrote:
> ast guy wrote:
> > Any way how do I access the billsecond variable with correct value
> > from channel after call, in my application ?
>
> In Asterisk 1.2, the billsec CDR variable is not calculated until the
> CDR is being posted. However, this has been changed in the trunk so
> that it is calculated when the CDR is ended using the ast_cdr_end() API
> call. This lets you access the value in the 'h' extension in the dialplan.
>
> Since you're doing this inside of an application, you can calculate the
> value yourself. Call ast_cdr_end() to end to CDR, then take the
> difference between the CDR end time and the CDR answer time.
>
> Russell
> _______________________________________________
thanks for the feedback Russell, I was able to resolve problem by
getting ast_cdr.answer.tv_sec variable, I'll give a try to your
suggestion,
regards,
-ag
More information about the asterisk-dev
mailing list