<div dir="ltr"><div><div><div>The acc table:<br><br>CREATE TABLE `acc` (<br> `id` int(10) unsigned NOT NULL AUTO_INCREMENT,<br> `method` char(16) NOT NULL DEFAULT '',<br> `from_tag` char(64) NOT NULL DEFAULT '',<br>
`to_tag` char(64) NOT NULL DEFAULT '',<br> `callid` char(64) NOT NULL DEFAULT '',<br> `sip_code` char(3) NOT NULL DEFAULT '',<br> `sip_reason` char(32) NOT NULL DEFAULT '',<br> `time` datetime NOT NULL,<br>
`cdr_id` bigint(11) NOT NULL DEFAULT '0',<br> `duration` int(11) unsigned NOT NULL DEFAULT '0',<br> `setuptime` int(11) unsigned NOT NULL DEFAULT '0',<br> `created` datetime DEFAULT NULL,<br> `src_uri` varchar(250) DEFAULT NULL,<br>
`caller_domain` varchar(250) DEFAULT NULL,<br> `dst_uri` varchar(250) DEFAULT NULL,<br> `callee_domain` varchar(250) DEFAULT NULL,<br> `legtype` varchar(250) DEFAULT NULL,<br> PRIMARY KEY (`id`),<br> KEY `callid_idx` (`callid`)<br>
) ENGINE=MyISAM AUTO_INCREMENT=61660 DEFAULT CHARSET=latin1<br><br><br></div>Modparam extra information:<br><br>modparam("acc", "db_extra", "src_uri=$fU;caller_domain=$fd;dst_uri=$rU;callee_domain=$rd;legtype=$avp(s:LEG)")<br>
<br><br></div>On your route you need to call the DB_FLAG where you call the ACC_DO<br><br></div>With this you should get in your acc table the INVITE and BYE method, with this information, the stored procedure from opensips-cp should work fine.<br>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/8/2 Nandini madhu <span dir="ltr"><<a href="mailto:sermj2012@gmail.com" target="_blank">sermj2012@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div><div><div><div><div><div><div>Hi Mike Tesliuk,<br><br></div>Thank for your prompt response. I am giving you the acc module parameters in from my table and also the script. <br></div>Please have a glance on these and help me <br>
<br></div>Acc table:<br>+------------+------------------+------+-----+---------+----------------+<br>| Field | Type | Null | Key | Default | Extra |<br>+------------+------------------+------+-----+---------+----------------+<br>
| id | int(10) unsigned | NO | PRI | NULL | auto_increment |<br>| method | char(16) | NO | | | |<br>| from_tag | char(64) | NO | | | |<br>
| to_tag | char(64) | NO | | | |<br>| callid | char(64) | NO | MUL | | |<br>| sip_code | char(3) | NO | | | |<br>
| sip_reason | char(32) | NO | | | |<br>| time | datetime | NO | | NULL | |<br>| cdr_id | bigint(11) | NO | | 0 | |<br>
| duration | int(11) unsigned | NO | | 0 | |<br>| setuptime | int(11) unsigned | NO | | 0 | |<br>| created | datetime | YES | | NULL | |<br>
+------------+------------------+------+-----+---------+----------------+<br>12 rows in set (0.00 sec)<br><br></div>And this is my script:<div class="im"><br><br>loadmodule "acc.so"<br>modparam("acc", "failed_transaction_flag", 1)<br>
modparam("acc", "report_cancels", 0)<br>##modparam("acc", "report_ack", 0)<br>modparam("acc", "early_media", 0)<br>modparam("acc", "log_level", 1)<br>
modparam("acc", "log_flag", 1)<br>modparam("acc", "log_missed_flag", 1)<br></div>modparam("acc", "cdr_flag", "CDR_FLAG")<br>modparam("acc", "db_flag", "DB_FLAG")<br>
modparam("acc", "db_missed_flag", "DB_MISSED_FLAG")<div class="im"><br>modparam("acc", "db_url", "mysql://opensips:opensipsrw@opensips/opensips")<br>modparam("acc", "db_table_acc", "acc")<br>
modparam("acc", "acc_method_column", "method")<br>modparam("acc", "acc_from_tag_column", "from_tag")<br>modparam("acc", "acc_to_tag_column", "to_tag")<br>
modparam("acc", "acc_callid_column", "callid")<br>modparam("acc", "acc_sip_code_column", "sip_code")<br>modparam("acc", "acc_sip_reason_column", "sip_reason")<br>
modparam("acc", "acc_time_column", "time")<br><br></div>route{<br> if (!mf_process_maxfwd_header("10")) {<br> sl_send_reply("483","Too Many Hops");<br>
exit;<br>
}<br><br> if (has_totag()) {<br> # sequential requests within a dialog should<br> # take the path determined by record-routing<br> if (loose_route()) {<br> if (is_method("BYE")) {<br>
setflag(ACC_DO); # do accounting ...<br> setflag(ACC_FAILED); # ... even if the transaction fails<br> } else if (is_method("INVITE")) {<br> # even if in most of the cases is useless, do RR for<br>
# re-INVITEs alos, as some buggy clients do change route set<br> # during the dialog.<br> record_route();<br> }<br><br> # route it out to whatever destination was set by loose_route()<br>
# in $du (destination URI).<br> route(relay);<br> } else {<br> if ( is_method("ACK") ) {<br> if ( t_check_trans() ) {<br> # non loose-route, but stateful ACK; must be an ACK after <br>
# a 487 or e.g. 404 from upstream server<br> t_relay();<br> exit;<br> } else {<br> # ACK without matching transaction -><br> # ignore and discard<br>
exit;<br> }<br> }<br> sl_send_reply("404","Not here");<br> }<br> exit;<br> }<br><br> # CANCEL processing<br> if (is_method("CANCEL"))<br>
{<br> if (t_check_trans())<br> t_relay();<br> exit;<br> }<br><br> t_check_trans();<br><br> if ( !(is_method("REGISTER") ) ) {<br> if (from_uri==myself)<br> {<br>
} else {<br> # if caller is not local, then called number must be local<br> if (!uri==myself) {<br> send_reply("403","Rely forbidden");<br> exit;<br>
}<br> }<br> }<br><br> # preloaded route checking<br> if (loose_route()) {<br> xlog("L_ERR",<br> "Attempt to route with preloaded Route's [$fu/$tu/$ru/$ci]");<br>
if (!is_method("ACK"))<br> sl_send_reply("403","Preload Route denied");<br> exit;<br> }<br><br> # record routing<br> if (!is_method("REGISTER|MESSAGE"))<br>
record_route();<br><br> # account only INVITEs<br> if (is_method("INVITE")) {<br> setflag(ACC_DO); # do accounting<br> }<br><br> <br> if (!uri==myself) {<br> append_hf("P-hint: outbound\r\n"); <br>
route(relay);<br> }<br><br> # requests for my domain<br> if (is_method("PUBLISH|SUBSCRIBE"))<br> {<br> sl_send_reply("503", "Service Unavailable");<br> exit;<br>
}<br><br> if (is_method("REGISTER"))<br> {<br> if ( 0 ) setflag(TCP_PERSISTENT);<br><br> if (!save("location"))<br> sl_reply_error();<br><br> exit;<br> }<br>
<br> if ($rU==NULL) {<br> # request with no Username in RURI<br> sl_send_reply("484","Address Incomplete");<br> exit;<br> }<br><br> # do lookup with method filtering<br> if (!lookup("location","m")) {<br>
t_newtran();<br> t_reply("404", "Not Found");<br> exit;<br> } <br><br> # when routing via usrloc, log the missed calls also<br> setflag(ACC_MISSED);<br> route(relay);<br>
}<br><br><br>route[relay] {<br> # for INVITEs enable some additional helper routes<br> if (is_method("INVITE")) {<br> t_on_branch("per_branch_ops");<br> t_on_reply("handle_nat");<br>
t_on_failure("missed_call");<br> }<br><br> if (!t_relay()) {<br> send_reply("500","Internal Error");<br> };<br> exit;<br>}<br><br><br>branch_route[per_branch_ops] {<br>
xlog("new branch at $ru\n");<br>}<br><br><br>onreply_route[handle_nat] {<br> <br> xlog("incoming reply\n");<br>}<br><br><br>failure_route[missed_call] {<br> if (t_was_cancelled()) {<br> exit;<br>
}<br><br> # uncomment the following lines if you want to block client <br> # redirect based on 3xx replies.<br> ##if (t_check_status("3[0-9][0-9]")) {<br> ##t_reply("404","Not found");<br>
## exit;<br> ##}<br><br>}<br><br></div>Thanks in advance.<br><br></div>Regards<br></div>sermj<br></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Aug 2, 2013 at 2:16 AM, Mike Tesliuk <span dir="ltr"><<a href="mailto:mike@ultra.net.br" target="_blank">mike@ultra.net.br</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>The CDR module from opensips-cp use the table cdrs, the acc module use the table acc , the opensips-cp use a procedure on mysql to get the information from acc and generate the data on cdrs, this happen through a cron script .<br>
<br></div>you need to generate the accounting to your INVITE too, becuase the procedore check the INVITE and BYE status on the acc table.<br><br><br><br><br></div><div><div><div class="gmail_extra">
<br><br><div class="gmail_quote">
2013/8/1 Nandini madhu <span dir="ltr"><<a href="mailto:sermj2012@gmail.com" target="_blank">sermj2012@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div><div><div><div>Dear Shahzad,<br></div>Greetings.<br><br></div>Thanks for the input i will try as per your suggestions and get back to you.<br><br></div>Regards,<br></div>sermj<br></div><div>
<div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Wed, Jul 31, 2013 at 8:55 PM, Muhammad Shahzad <span dir="ltr"><<a href="mailto:shaheryarkh@gmail.com" target="_blank">shaheryarkh@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div>The acc module params are missing flags for db, you only have flags for logging, which actually logs acc data to syslog, also note that flags MUST be quoted strings as integer flags have been deprecated in opensips 1.9.x. See below link for details,<br>
<br><a href="http://www.opensips.org/html/docs/modules/1.9.x/acc.html#id293425" target="_blank">http://www.opensips.org/html/docs/modules/1.9.x/acc.html#id293425</a><br><br></div><div>Thank you.<br><br></div><div><br><br>
</div></div><div><div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Wed, Jul 31, 2013 at 12:07 PM, Nandini madhu <span dir="ltr"><<a href="mailto:sermj2012@gmail.com" target="_blank">sermj2012@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div><div><div><div>Dear Shahzad,<br><br></div>I have tried the above options to know the status. But still i am facing the same problem.<br><br></div>I am giving my acc module configuration list please have a glance and advice me please.<br>
<br>loadmodule "acc.so"<br>modparam("acc", "failed_transaction_flag", 1)<br>modparam("acc", "report_cancels", 0)<br>##modparam("acc", "report_ack", 0)<br>
modparam("acc", "early_media", 0)<br>modparam("acc", "log_level", 1)<br>modparam("acc", "log_flag", 1)<br>modparam("acc", "log_missed_flag", 1)<br>
modparam("acc", "cdr_flag", 1)<br>modparam("acc", "db_url", "mysql://opensips:opensipsrw@opensips/opensips")<br>modparam("acc", "db_table_acc", "acc")<br>
modparam("acc", "acc_method_column", "method")<br>modparam("acc", "acc_from_tag_column", "from_tag")<br>modparam("acc", "acc_to_tag_column", "to_tag")<br>
modparam("acc", "acc_callid_column", "callid")<br>modparam("acc", "acc_sip_code_column", "sip_code")<br>modparam("acc", "acc_sip_reason_column", "sip_reason")<br>
modparam("acc", "acc_time_column", "time")<br><br></div><div>i have given super privileges to opensips user in mysql database<br></div><div><br></div><div>Please advice<br></div><div><br></div>
regards<br></div>sermj<br></div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jul 31, 2013 at 1:09 PM, Nandini madhu <span dir="ltr"><<a href="mailto:sermj2012@gmail.com" target="_blank">sermj2012@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Dear <span name="Muhammad Shahzad">Shahzad,<br><br></span></div><span name="Muhammad Shahzad">Thank you for your prompt response. i will follow your suggestions and let you know thank you.<br>
<br></span></div><span name="Muhammad Shahzad">regards <br>sermj<br></span></div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jul 31, 2013 at 11:48 AM, Muhammad Shahzad <span dir="ltr"><<a href="mailto:shaheryarkh@gmail.com" target="_blank">shaheryarkh@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Check if,<br><br></div>1. you have set required module parameters for acc module as well, most importantly accounting flags.<br>
</div>2. you have set those accounting flags in appropriate routes in opensips.cfg.<br>
</div>3. you acc table is accessible and permitted for opensips (check connection string, the user used in it is allowed to insert rows in acc table etc).<br><div><div><div>4. you can connect to mysql or whatever backend you are using, and see acc table is being populated by opensips during / end of calls.<br>
</div><div>5. your opensips-cp has correct db connection string set to access acc table.<br></div><div><br></div><div>one of above should solve your problem.<br><br></div><div>Thank you.<br><br></div><div><br></div></div>
</div></div><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div>On Wed, Jul 31, 2013 at 8:06 AM, Nandini madhu <span dir="ltr"><<a href="mailto:sermj2012@gmail.com" target="_blank">sermj2012@gmail.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr"><div><div><div><div><div>Hi all,<br><br></div>I am using opensips-cp 5.0 . domain andrtpproxy modules are working fine on myserver (opensips-1.9.1-tls). But i am unable to see CDRviewer in my GUI.<br>
<br></div>
I hav loaded required acc module parameters in opensips.cfg file.<br><br></div>Please help me<br><br></div>Regards,<br></div>sermj<br></div>
<br></div></div>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div><span><font color="#888888"><br><br clear="all"><br>-- <br><div><span style="color:rgb(136,136,136);font-size:13px;font-family:arial,sans-serif">Mit freundlichen Grüßen</span></div><span style="color:rgb(136,136,136);font-size:13px;font-family:arial,sans-serif">Muhammad Shahzad</span><br style="color:rgb(136,136,136);font-size:13px;font-family:arial,sans-serif">
<span style="color:rgb(136,136,136);font-size:13px;font-family:arial,sans-serif">------------------------------</span><span style="color:rgb(136,136,136);font-size:13px;font-family:arial,sans-serif">-----</span><br style="color:rgb(136,136,136);font-size:13px;font-family:arial,sans-serif">
<span style="color:rgb(136,136,136);font-size:13px;font-family:arial,sans-serif">CISCO Rich Media Communication Specialist (CRMCS)</span><br style="color:rgb(136,136,136);font-size:13px;font-family:arial,sans-serif">
<span style="color:rgb(136,136,136);font-size:13px;font-family:arial,sans-serif">CISCO Certified Network Associate (CCNA)</span><br style="color:rgb(136,136,136);font-size:13px;font-family:arial,sans-serif">
<span style="color:rgb(136,136,136);font-size:13px;font-family:arial,sans-serif">Cell: <a href="tel:%2B49%20176%2099%2083%2010%2085" value="+4917699831085" target="_blank">+49 176 99 83 10 85</a></span><br style="color:rgb(136,136,136);font-size:13px;font-family:arial,sans-serif">
<span style="color:rgb(136,136,136);font-size:13px;font-family:arial,sans-serif">MSN: </span><a href="mailto:shari_786pk@hotmail.com" style="color:rgb(17,85,204);font-size:13px;font-family:arial,sans-serif" target="_blank">shari_786pk@hotmail.com</a><br style="color:rgb(136,136,136);font-size:13px;font-family:arial,sans-serif">
<span style="color:rgb(136,136,136);font-size:13px;font-family:arial,sans-serif">Email: </span><a href="mailto:shaheryarkh@googlemail.com" style="color:rgb(17,85,204);font-size:13px;font-family:arial,sans-serif" target="_blank">shaheryarkh@googlemail.com</a>
</font></span></div>
<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br><div><span style="color:rgb(136,136,136);font-size:13px;font-family:arial,sans-serif">Mit freundlichen Grüßen</span></div><span style="color:rgb(136,136,136);font-size:13px;font-family:arial,sans-serif">Muhammad Shahzad</span><br style="color:rgb(136,136,136);font-size:13px;font-family:arial,sans-serif">
<span style="color:rgb(136,136,136);font-size:13px;font-family:arial,sans-serif">------------------------------</span><span style="color:rgb(136,136,136);font-size:13px;font-family:arial,sans-serif">-----</span><br style="color:rgb(136,136,136);font-size:13px;font-family:arial,sans-serif">
<span style="color:rgb(136,136,136);font-size:13px;font-family:arial,sans-serif">CISCO Rich Media Communication Specialist (CRMCS)</span><br style="color:rgb(136,136,136);font-size:13px;font-family:arial,sans-serif">
<span style="color:rgb(136,136,136);font-size:13px;font-family:arial,sans-serif">CISCO Certified Network Associate (CCNA)</span><br style="color:rgb(136,136,136);font-size:13px;font-family:arial,sans-serif">
<span style="color:rgb(136,136,136);font-size:13px;font-family:arial,sans-serif">Cell: <a href="tel:%2B49%20176%2099%2083%2010%2085" value="+4917699831085" target="_blank">+49 176 99 83 10 85</a></span><br style="color:rgb(136,136,136);font-size:13px;font-family:arial,sans-serif">
<span style="color:rgb(136,136,136);font-size:13px;font-family:arial,sans-serif">MSN: </span><a href="mailto:shari_786pk@hotmail.com" style="color:rgb(17,85,204);font-size:13px;font-family:arial,sans-serif" target="_blank">shari_786pk@hotmail.com</a><br style="color:rgb(136,136,136);font-size:13px;font-family:arial,sans-serif">
<span style="color:rgb(136,136,136);font-size:13px;font-family:arial,sans-serif">Email: </span><a href="mailto:shaheryarkh@googlemail.com" style="color:rgb(17,85,204);font-size:13px;font-family:arial,sans-serif" target="_blank">shaheryarkh@googlemail.com</a>
</div>
</div></div><br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br></div>