<br><font size=2 face="sans-serif">Thanks first of all Bogdan,</font>
<br><font size=2 face="sans-serif">But what is relevence of the acc table
in database. it seems much like raw CDR record.</font>
<br><font size=2 face="sans-serif">My problem is it is not getting updated
at all. bit sip-trace table is getting the SIP messages recorded..</font>
<br><font size=2 face="sans-serif">Even if I would populate acc table online
is like an achivement for me. but how to do it from configuration.</font>
<br><font size=2 face="sans-serif">Thanks again,</font>
<br><font size=2 face="sans-serif">Madhusudan</font>
<br>
<br>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>Bogdan-Andrei Iancu <bogdan@voice-system.ro></b>
</font>
<p><font size=1 face="sans-serif">10/19/2006 01:18 AM</font>
<td width=59%>
<table width=100%>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">To</font></div>
<td><font size=1 face="sans-serif">Madhusudan.Jarhad@lntinfotech.com</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td><font size=1 face="sans-serif">users@openser.org</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Subject</font></div>
<td><font size=1 face="sans-serif">Re: [Users] How to configure acc modue</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br><font size=2><tt>Hi,<br>
<br>
the acc module does not generate CDRs, but start / stop events you can
<br>
use for generating CDRs<br>
<br>
do you get the logs? be sure to set in the scrip the configured acc flags!!<br>
<br>
regards,<br>
bogdan<br>
<br>
Madhusudan.Jarhad@lntinfotech.com wrote:<br>
<br>
><br>
> Dear All,<br>
> Here is very basic question from me.<br>
> I have installed openser 1.1.0. I want to record the CDR / Accounts
of <br>
> calles and messages being processed. I have acc module in my <br>
> opense.cfg and parameter setting is as follows<br>
><br>
> # ----------------- SETTING MODULE-SPECIFIC PARAMETERS ---------------<br>
><br>
> ## - - - - - - - - - - XLOG PARAMETERS - - - - - - - - - - - - - -
-<br>
> modparam("xlog", "force_color", 0)<br>
><br>
> # - - - - - - - - - USRLOC PARAMS - - - - - - - - - - - - - - - -
- -<br>
><br>
> #modparam("usrloc", "db_mode", 1)<br>
><br>
> # Uncomment this if you want to use SQL database<br>
> # for persistent storage and comment the previous line<br>
> modparam("usrloc", "db_mode", 2)<br>
> modparam("usrloc", "db_url", <br>
> "mysql://openser:openserrw@localhost/openser")<br>
><br>
><br>
> # - - - - - - AUTH PARAMS - - - - - - - - - - - -<br>
> # Uncomment if you are using auth module<br>
> #<br>
> modparam("auth_db", "calculate_ha1", yes)<br>
> #<br>
> # If you set "calculate_ha1" parameter to yes (which true
in this <br>
> config),<br>
> # uncomment also the following parameter)<br>
> #<br>
> modparam("auth_db", "password_column", "password")<br>
> #modparam("alias_db", "user_column", "username")<br>
> modparam("auth_db", "password_column", "password")<br>
><br>
> ## - - - - - AUTH RADIUS - - - - -<br>
> #modparam("auth_radius", "radius_config", <br>
> "/usr/local/etc/radiusclient-ng/radiusclient.conf")<br>
> #modparam("auth_radius", "service_type", 15)<br>
><br>
> ## - - - - - RR MODULE PARAMETERS - - - - -<br>
> # add value to ;lr param to make some broken UAs happy<br>
> modparam("rr", "enable_full_lr", 1)<br>
> modparam("rr", "append_fromtag", 1)<br>
> modparam("rr", "enable_double_rr", 1)<br>
> modparam("rr", "add_username", 1)<br>
><br>
> ## - - - - - ACCOUNTING PARAMETERS - - - - - - - -<br>
> modparam("acc", "detect_direction", 1)<br>
> modparam("acc", "failed_transaction_flag", 1)<br>
> modparam("acc", "report_cancels",1)<br>
> modparam("acc", "report_ack", 1)<br>
> modparam("acc", "early_media", 1)<br>
> modparam("acc", "detect_direction", 1)<br>
> modparam("acc", "report_cancels", 1)<br>
> modparam("acc", "log_level", 1)<br>
> modparam("acc", "log_flag", 1)<br>
> modparam("acc", "log_missed_flag", 1)<br>
> #modparam("acc", "log_extra", "ua=$hdr(User-Agent);uuid=$avp(i:123)")<br>
> modparam("acc", "service_type", 15) # user 16
to set to Radius<br>
> modparam("acc", "db_flag", 2)<br>
> modparam("acc", "db_missed_flag", 3)<br>
> modparam("acc", "db_url", "mysql://openser:openserrw@localhost/openser")<br>
> modparam("acc", "db_table_acc", "acc")<br>
> modparam("acc", "db_table_missed_calls", "missed_calls")<br>
> modparam("acc", "db_missed_flag", 3)<br>
> modparam("acc", "acc_sip_method_column", "sip_method")<br>
> modparam("acc", "acc_from_uri_column", "from_uri")<br>
> modparam("acc", "acc_fromtag_column", "fromtag")<br>
> modparam("acc", "acc_to_uri_column", "to_uri")<br>
> modparam("acc", "acc_totag_column", "totag")<br>
> #modparam("acc", "acc_cseqno_column", "cseq_no")<br>
> modparam("acc", "acc_sip_callid_column", "sip_callid")<br>
> modparam("acc", "acc_time_column", "time")<br>
> # for mysql-based accouting, use the names of the columns<br>
> # for RADIUS-based accouting, use the names of the RADIUS AVPs<br>
> #modparam("acc", <br>
> "multi_leg_info","RAD_LEG_SRC=$avp(src);RAD_LEG_SRC=$avp(dst)")<br>
><br>
> #modparam("acc", "multi_leg_info","leg_src=$avp(src);leg_dst=$avp(dst)")<br>
> #modparam("avpops", "avp_aliases", "uuid=I:50")<br>
> modparam("acc", "radius_config", <br>
> "/usr/local/etc/radiusclient-ng/radiusclient.conf")<br>
> #modparam("acc", "radius_config", "/etc/openser/radius/client.conf")<br>
> #modparam("acc", "radius_flag", 2)<br>
> #modparam("acc", "diameter_missed_flag", 3)<br>
><br>
> #modparam("acc", "radius_extra",
"Sip-RPid=$avp(s:rpid) <br>
> Source-IP=$si; Source-Port=$sp"<br>
> #
Canonical-URI=$avp($can_uri);
\<br>
> #
<br>
> Billing-Party=$avp($billing_party); \<br>
> #
<br>
> Divert-Reason=$avp(s:divert_reason); \<br>
> #
<br>
> X-RTP-Stat=$avp(s:rtp_statistics); \<br>
> #
From-Header=$hdr(from);
\<br>
> #
User-Agent=$hdr(user-agent);
\<br>
> #
Contact=$hdr(contact);
\<br>
> #
Event=$hdr(event)")<br>
><br>
> ## - - - - - - JABBER SERVER CONFIGURATION - - - - - - - - -<br>
> modparam("jabber", "jdomain", "jabber.sipserver.com=*")<br>
> modparam("jabber", "db_url", <br>
> "mysql://openser:openserrw@localhost/openser")<br>
><br>
> modparam("jabber", "jdomain", "sipx.vshodc.lntinfotech.com")<br>
><br>
><br>
> ## - - - - - - - - - - - SIPTRACE MODULES PARAMETERS - - - - - - -
- -<br>
> modparam("siptrace", "trace_flag", 0)<br>
> modparam("siptrace", "db_url", <br>
> "mysql://openser:openserrw@localhost/openser")<br>
> modparam("siptrace", "trace_on", 1)<br>
> modparam("siptrace", "table", "sip_trace")<br>
> modparam("siptrace", "duplicate_uri", "sip:172.17.85.51:5888")<br>
><br>
><br>
><br>
> # ------------------------- request routing logic -------------------<br>
><br>
> # main routing logic<br>
><br>
> route{<br>
><br>
> ## ADDED BY MADHUSUDAN<br>
> # avp_write("caller_id", $avp(name); #"$uuid");<br>
> # avp_printf("i:20", "$avp($uuid): $fu");<br>
> # xdbg("$Cbgi:20$Cxx [$avp(i:20)] $Cbrcseq$Cxx=[$hdr(cseq)]\n");<br>
> # setflag(1); /* set for accounting (the same value as in log_flag!)*/<br>
> # t_relay(); /* enter stateful mode now */<br>
><br>
> ##<br>
><br>
><br>
> sip_trace();<br>
> # xlog("L_ERR", "time [$Tf] method
<$rm> r-uri <$ru> 2nd via <br>
> <$hdr(via[1])>\n");<br>
> # setflag(1); /* set for accounting (the same
value as in <br>
> log_flag!)*/<br>
> # t_relay(); /* enter stateful
mode now */<br>
><br>
> # if (t_newtran()) {<br>
> # log("UAS logic");<br>
> # t_reply("999","hello");<br>
> # } else sl_reply_error();<br>
><br>
> ################<br>
> if (t_local_replied("all"))
{<br>
> log ("no
reply received\n");<br>
> }<br>
><br>
> # initial sanity checks -- messages with<br>
> # max_forwards==0, or excessively long
requests<br>
> if (!mf_process_maxfwd_header("10"))
{<br>
> sl_send_reply("483","Too
Many Hops");<br>
> exit;<br>
> };<br>
><br>
> if (msg:len >= 2048 ) {<br>
> sl_send_reply("513",
"Message too big");<br>
> exit;<br>
> };<br>
><br>
> # we record-route all messages -- to make
sure that<br>
> # subsequent messages will go through
our proxy; that's<br>
> # particularly good if upstream and downstream
entities<br>
> # use different transport protocol<br>
> if (!method=="REGISTER")<br>
> record_route();<br>
><br>
> # subsequent messages withing a dialog
should take the<br>
> # path determined by record-routing<br>
> if (loose_route()) {<br>
> # mark routing
logic in request<br>
> append_hf("P-hint:
rr-enforced\r\n");<br>
> route(1);<br>
> };<br>
><br>
> if (!uri==myself) {<br>
> # mark routing
logic in request<br>
> append_hf("P-hint:
outbound\r\n");<br>
> # if you have
some interdomain connections via TLS<br>
> #if(uri=~"@tls_domain1.net")
{<br>
> #
t_relay("tls:domain1.net");<br>
> #
exit;<br>
> #} else if(uri=~"@tls_domain2.net")
{<br>
> #
t_relay("tls:domain2.net");<br>
> #
exit;<br>
> #}<br>
> route(1);<br>
> };<br>
><br>
> # if the request is for other domain use
UsrLoc<br>
> # (in case, it does not work, use the
following command<br>
> # with proper names and addresses in it)<br>
> if (uri==myself) {<br>
><br>
> if (method=="REGISTER")
{<br>
><br>
>
# Uncomment this if you want to use digest <br>
> authentication<br>
>
#if (!www_authorize("openser.org", <br>
> "subscriber")) {<br>
>
# www_challenge("openser.org",
"0");<br>
>
# exit;<br>
>
#};<br>
><br>
>
save("location");<br>
>
exit;<br>
> };<br>
><br>
> lookup("aliases");<br>
> if (!uri==myself)
{<br>
>
append_hf("P-hint: outbound alias\r\n");<br>
>
route(1);<br>
> };<br>
><br>
> # native SIP
destinations are handled using our USRLOC DB<br>
> if (!lookup("location"))
{<br>
>
sl_send_reply("404", "Not Found");<br>
>
exit;<br>
> };<br>
> append_hf("P-hint:
usrloc applied\r\n");<br>
> };<br>
><br>
> route(1);<br>
> }<br>
><br>
><br>
> route[1] {<br>
> # send it out now; use stateful forwarding
as it works reliably<br>
> # even for UDP2TCP<br>
> if (!t_relay()) {<br>
> sl_reply_error();<br>
> };<br>
><br>
> exit;<br>
> }<br>
><br>
><br>
> onreply_route[1] {<br>
> if (t_check_status("1[0-9][0-9]"))
{<br>
> setflag(1);<br>
> log("provisional
reply received\n");<br>
> if (t_check_status("183"))<br>
>
drop;<br>
> }<br>
> if (t_was_cancelled()) {<br>
> log("transaction was
cancelled by UAC\n");<br>
> }<br>
><br>
> }<br>
><br>
> ###################################################################<br>
> My need is to get the CDRs for events and volume like MESSAGES
and <br>
> download/file transfer respectively.<br>
> Please help<br>
> ______________________________________________________________________<br>
><br>
>------------------------------------------------------------------------<br>
><br>
>_______________________________________________<br>
>Users mailing list<br>
>Users@openser.org<br>
>http://openser.org/cgi-bin/mailman/listinfo/users<br>
> <br>
><br>
<br>
<br>
______________________________________________________________________<br>
</tt></font>
<br>
<BR>
______________________________________________________________________<BR>