Colin:
You'll need the loadmodule "/usr/local/lib/ser/modules/acc.so" loaded but
you have already done this.
The log_flag is still used and must be set on INVITE and BYE messages. As
a simple test place if (method=="INVITE"){setflag(-your log_flag-)}; at the
beginning of route block 0. If everything else is working this should
generate
accounting records for INVITEs. These records appear in mysql>ser>acc
table.
The db_url parameter needs to point to your ser database instead of the
flatstore file as mentioned earlier. Something like:
modparam("acc", "db_url","mysql://ser:heslo@localhost/ser")
should do it.
Otherwise make sure you have modified the acc module Makefile,
rebuilt the module and restart your server. That should do it.
-Steve
Colin Jordan wrote:
Hi Steve
I am still having problems. How can I get it working on mysql?
Kind regards,
Colin
-----Original Message-----
From: Steve Blair [mailto:blairs@isc.upenn.edu]
Sent: Thursday, October 27, 2005 2:09 PM
To: Colin Jordan
Subject: Re: [Serusers] FW: Call logs
Colin:
I use flatstore module for accounting data. MySQL tables filled up too
quickly
for my taste. Below is what I do:
Load modules:
loadmodule "/usr/local/lib/ser/modules/acc.so" # enables
accounting
loadmodule "/usr/local/lib/ser/modules/flatstore.so" # flatstore
acc module
Define module parameters:
# ------------- accounting parameters
#
modparam("acc", "db_url",
"flatstore:/usr/local/var/ser")
modparam("acc", "db_flag", 1)
modparam("acc", "log_level", 1 )
modparam("acc", "log_flag", 1 )
modparam("acc", "log_fmt", "cdfsum" )
modparam("acc", "early_media", 0 )
modparam("acc", "report_ack", 0 ) # def=1
modparam("acc", "report_cancels", 0 )
modparam("acc", "failed_transactions", 0 )
Then use log_flag in your ser.cfg file to mark a particular transaction for
accounting. Be careful here because the placement of the setflag command
can cause extraneous (or missing) accounting records.
if (method=="INVITE" || method=="BYE")
{
setflag(1); # account for only one instance of call
};
Then enable accounting by uncommenting the DEFS+=-DSQL_ACC in
sip_router/modules/acc Makefile and rebuild at least the acc module.
Rebuilding
the entire package will not hurt.
If this all works (and you use flatstore) then in the db_url directory
you will
see multiple files of the format acc_6.log. Each ser child process
creates it's own
file to avoid delay due to record locking. To produce a billing report
you will
need to "munge" all of these files together.
-Steve
Colin Jordan wrote:
Hi there
Will you kindly send me an example script of this?
Kind regards,
Colin
-----Original Message-----
From: Steve Blair <blairs(a)isc.upenn.edu>
To: Colin Jordan <cjordan(a)econetwireless.com>
Date: Wed, 26 Oct 2005 07:53:09 -0400
Subject: Re: [Serusers] FW: Call logs
You want to load and enable accounting then use
the setflag command
to
set whichever flag is identified in the modparam("acc", "log_flag",
X)
command
as your accounting flag. I happen to use flag #1 but the choice is
yours.
Also you want to uncomment DEFS+=-DSQL_ACC and rebuild the
accounting module if you want data to goto mysql.
Colin Jordan wrote:
I can not find where the call logs are in the ser
database. What can
I
do to enable call information logging (time
stamps, destination, exc)
?
DISCLAIMER: The information in this message is
confidential and is
legally
privileged. It is intended solely for the
addressee. Access to this
message by
anyone else is unauthorized.If receiving in error please accept our
apologies
and notify the sender immediately. You must also delete the original
message from your machine. If you are not the intended recipient, any
use,
disclosure, copying, distribution or action taken
in reliance of it,
is prohibited
and maybe
unlawful.
----------------------------------------------------------------------
--
_______________________________________________
Serusers mailing list
serusers(a)lists.iptel.org
http://lists.iptel.org/mailman/listinfo/serusers
--
ISC Network Engineering
The University of Pennsylvania
3401 Walnut Street, Suite 221A
Philadelphia, PA 19104
voice: 215-573-8396
215-746-8001
fax: 215-898-9348
sip:blairs@upenn.edu
DISCLAIMER: The information in this message is confidential and is legally
privileged. It is intended solely for the addressee. Access to this message
by
anyone else is unauthorized.If receiving in error
please accept our
apologies
and notify the sender immediately. You must also
delete the original
message from your machine. If you are not the intended recipient, any use,
disclosure, copying, distribution or action taken in reliance of it, is
prohibited
and maybe
unlawful.
--
ISC Network Engineering
The University of Pennsylvania
3401 Walnut Street, Suite 221A
Philadelphia, PA 19104
voice: 215-573-8396
215-746-8001
fax: 215-898-9348
sip:blairs@net.isc.upenn.edu
DISCLAIMER: The information in this message is confidential and is legally
privileged. It is intended solely for the addressee. Access to this message by
anyone else is unauthorized.If receiving in error please accept our apologies
and notify the sender immediately. You must also delete the original
message from your machine. If you are not the intended recipient, any use,
disclosure, copying, distribution or action taken in reliance of it, is prohibited
and maybe
unlawful.
--
ISC Network Engineering
The University of Pennsylvania
3401 Walnut Street, Suite 221A
Philadelphia, PA 19104
voice: 215-573-8396
215-746-8001
fax: 215-898-9348
sip:blairs@net.isc.upenn.edu