[Serusers] MySql Accounting

samuel samu60 at gmail.com
Thu Jun 7 14:08:59 CEST 2007


If you see my post (and Michal's one on serdev) you can see there's a
problem in the

@to.tag==""

because it does not work when the to tag is empty.

This means that the FLAG_ACC is never set in your next code:

        # lets account all initial INVITEs
        # further in-dialog requests are accounted by a RR cookie (see
below)
        if (method=="INVITE" && @to.tag=="") {

                setflag(FLAG_ACC);
        }

And that's why accounting is not working.

Vaclav posted a workaround while this bug is being solved. So instead the
above check, use the next one:
if ((method=="INVITE" && (!@to.tag) || (@to.tag=="")) || method=="BYE") {

So, change

@to.tag=="" for (!@to.tag) || (@to.tag=="") to detect empty to tags.

Hope Michal can find a solution soon because all config example uses this
checks and the list is going to be full of related questions..


Thanks all,
Samuel.





2007/6/7, KUMAR <kumar.kisalaya at gmail.com>:
>
> Here's the ser.cfg that i've changed to enable accounting in MySql.
> But I still don't see anything in the database. Isn't it supposed to
> show up in acc table?
> Thank You
> kumar
>
> On 6/7/07, Eneref <eneref at arcdiv.com> wrote:
> > Is there a convenient way to write both in SER 2.0? In SER 0.9.6, I
> > simply had 1 flag, and the acc module abstracted all the necessary
> > details out for me. Depending upon how I'd compiled it, my 1 flag
> > allowed me to write to mysql, syslog, and/or radius in whatever
> > combination I wished.
> >
> > Now that the abstraction of a single, simple logging class has been
> > replaced by the increased complexity of 3 separate logging classes, that
> > methodology is no longer possible. Does one now simply set several flags
> > at each turn to determine where to log the data?
> >
> > N.
> >
> >
> > Hendrik Scholz wrote:
> > > Hi!
> > >
> > > KUMAR wrote:
> > >
> > >> Thank you Hendrik for pointing out the mistake. But I also cannot see
> > >> any accounting information in the MySql Database. Can you tell me
> why?
> > >> Obviouly I am missing something here.
> > >>
> > >
> > > You are using acc_syslog and not acc_db.
> > > acc_syslog writes syslog entries whereas acc_db relies on a database
> > > backend.
> > >
> > > Cheers,
> > >  Hendrik
> > >
> > >
> >
> >
>
> _______________________________________________
> Serusers mailing list
> Serusers at lists.iptel.org
> http://lists.iptel.org/mailman/listinfo/serusers
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20070607/a3f5131b/attachment.htm>


More information about the sr-users mailing list