<div dir="ltr"><div><div>Nandini, <br><br></div>If you have the INVITE and BYE on the acc table, the problem is just on the procedure, did you try to call the procedure manually as flavio suggest ? did you configure a cron job to run the procedure ?<br>
</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/8/7 Nandini madhu <span dir="ltr">&lt;<a href="mailto:sermj2012@gmail.com" target="_blank">sermj2012@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div>Hi Flavio,<br></div>Greetings.<br><br><div><div><div><div><div><div>Hi Bodgan.<br></div>Greetings.<br><br></div>I have seen some INVITES and BYES in my acc table. I have enabled CDR_FLAG in my script and loaded the module too.<br>

<br></div>But i am unable to get the data in cdrviewer.<br>
<br></div>Please help me<br><br></div><div>My script is as below:<div><br># main request routing logic<br><br>route{<br>    if (!mf_process_maxfwd_header(&quot;10&quot;)) {<br>        sl_send_reply(&quot;483&quot;,&quot;Too Many Hops&quot;);<br>


        exit;<br>    }<br><br></div>    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(&quot;BYE&quot;)) {<br>


                <b>setflag(CDR_FLAG); # ... even if the transaction fails<br>                create_dialog();<br>                setflag(TRACE_FLAG);<br>                setflag(DB_FLAG); # do accounting ...</b><br>            } else if (is_method(&quot;INVITE&quot;)) {<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(&quot;ACK&quot;) ) {<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 -&gt;<br>                    # ignore and discard<br>                    exit;<br>                }<br>            }<br>


            sl_send_reply(&quot;404&quot;,&quot;Not here&quot;);<br>        }<br>        exit;<br>    }<br><br>    # CANCEL processing<br>    if (is_method(&quot;CANCEL&quot;))<br>    {<br>        if (t_check_trans())<br>


            t_relay();<br>        exit;<br>    }<br><br>    t_check_trans();<br><br>    if ( !(is_method(&quot;REGISTER&quot;)  ) ) {<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(&quot;403&quot;,&quot;Rely forbidden&quot;);<br>                exit;<br>            }<br>        }<br>    }<br><br>    # preloaded route checking<br>    if (loose_route()) {<br>


        xlog(&quot;L_ERR&quot;,<br>        &quot;Attempt to route with preloaded Route&#39;s [$fu/$tu/$ru/$ci]&quot;);<br>        if (!is_method(&quot;ACK&quot;))<br>            sl_send_reply(&quot;403&quot;,&quot;Preload Route denied&quot;);<br>


        exit;<br>    }<br><br>    # record routing<br>    if (!is_method(&quot;REGISTER|MESSAGE&quot;))<br>        record_route();<br><br>    # account only INVITEs<br>    if (is_method(&quot;INVITE&quot;)) {<br>                        <b>setflag(CDR_FLAG);        <br>


                        create_dialog();<br>                        setflag(TRACE_FLAG);<br>                        setflag(DB_FLAG); # do accounting ...<br>                </b><br><div>    }<br><br>    <br>    if (!uri==myself) {<br>


        append_hf(&quot;P-hint: outbound\r\n&quot;); <br></div>        route(relay);<br>    }<br><br>    # requests for my domain<br>    if (is_method(&quot;PUBLISH|SUBSCRIBE&quot;))<br>    {<br>        sl_send_reply(&quot;503&quot;, &quot;Service Unavailable&quot;);<br>


        exit;<br>    }<br><br>    if (is_method(&quot;REGISTER&quot;))<br>    {<br>        if (   0 ) setflag(TCP_PERSISTENT);<br><br>        if (!save(&quot;location&quot;))<br>            sl_reply_error();<br><br>        exit;<br>


    }<br><br>    if ($rU==NULL) {<br>        # request with no Username in RURI<br>        sl_send_reply(&quot;484&quot;,&quot;Address Incomplete&quot;);<br>        exit;<br>    }<br><br>    # do lookup with method filtering<br>


    if (!lookup(&quot;location&quot;,&quot;m&quot;)) {<br>        t_newtran();<div><br>        t_reply(&quot;404&quot;, &quot;Not Found&quot;);<br>        exit;<br>    } <br><br></div>    # 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(&quot;INVITE&quot;)) {<br>        t_on_branch(&quot;per_branch_ops&quot;);<br>


        t_on_reply(&quot;handle_nat&quot;);<br>        t_on_failure(&quot;missed_call&quot;);<br>    }<br><br>    if (!t_relay()) {<br>        send_reply(&quot;500&quot;,&quot;Internal Error&quot;);<br>    };<br>    exit;<br>


}<br><br><br>branch_route[per_branch_ops] {<br>    xlog(&quot;new branch at $ru\n&quot;);<br>}<br><br><br>onreply_route[handle_nat] {<br>    <br>    xlog(&quot;incoming reply\n&quot;);<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(&quot;3[0-9][0-9]&quot;)) {<br>


    ##t_reply(&quot;404&quot;,&quot;Not found&quot;);<br>    ##    exit;<br>    ##}<br><br>}<br></div>Regards<br><br></div>sermj<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jun 28, 2013 at 4:59 PM, Flavio Goncalves <span dir="ltr">&lt;<a href="mailto:flavio@voffice.com.br" target="_blank">flavio@voffice.com.br</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Nandini, <div><br></div><div>Try the following steps:</div><div><br></div><div>1. Make sure you have data in the ACC tables (select * from acc;). If you don&#39;t have data in your acc table you have problems in your opensips script.</div>



<div><br></div><div>2. Try to run the proc manually in the database.  SQL&gt;call opensips_cdrs_1_6();</div><div>This proc should be run each 3 minutes from cron daemon. </div><div><br></div><div>3. Check now if you have data in cdrs (select * from cdrs). </div>


<div><br></div><div>If you still don&#39;t have any data in cdrs, please check the opensips logs for errors inserting data in the database. </div><div><br></div><div>Best regards, </div><div><br></div>
<div>Flavio E. Goncalves<br></div><div><div><div class="gmail_extra"><div><div dir="ltr"><div><br></div></div></div>
<br><br><div class="gmail_quote">2013/6/28 Nandini madhu <span dir="ltr">&lt;<a href="mailto:sermj2012@gmail.com" target="_blank">sermj2012@gmail.com</a>&gt;</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>Dear Flavio E. Goncalves,<br><br></div>I have loaded opensips_cdrs.mysql and cdrs.mysql into mysql database. <br></div>And i rechecked the installation instructions as per opensips control panel documentation.<br>



</div>Please have a glance on the list available in opensips database:<br><div><br>mysql&gt; show tables; (in opensips database)<br>+----------------------+<br>| Tables_in_opensips   |<br>+----------------------+<br>| acc                  |<br>



| active_watchers      |<br>| address              |<br>| aliases              |<br>| carrierfailureroute  |<br>| carrierroute         |<br>| cdrs                 |<br>| cpl                  |<br>| dbaliases            |<br>



| dialog               |<br>| dialplan             |<br>| dispatcher           |<br>| domain               |<br>| domainpolicy         |<br>| dr_carriers          |<br>| dr_gateways          |<br>| dr_groups            |<br>



| dr_rules             |<br>| globalblacklist      |<br>| grp                  |<br>| imc_members          |<br>| imc_rooms            |<br>| load_balancer        |<br>| location             |<br>| missed_calls         |<br>



| monitored_stats      |<br>| monitoring_stats     |<br>| ocp_admin_privileges |<br>| pdt                  |<br>| presentity           |<br>| pua                  |<br>| re_grp               |<br>| registrant           |<br>



| rls_presentity       |<br>| rls_watchers         |<br>| route_tree           |<br>| rtpproxy_sockets     |<br>| silo                 |<br>| sip_trace            |<br>| speed_dial           |<br>| subscriber           |<br>



| uri                  |<br>| userblacklist        |<br>| usr_preferences      |<br>| version              |<br>| watchers             |<br>| xcap                 |<br>+----------------------+<br>47 rows in set (0.00 sec)<br>



<br></div><div>Tables from cdrs table from opensips database;<br><br>mysql&gt; show columns from cdrs;<br>+-----------------+------------------+------+-----+---------------------+----------------+<br>| Field           | Type             | Null | Key | Default             | Extra          |<br>



+-----------------+------------------+------+-----+---------------------+----------------+<br>| cdr_id          | bigint(20)       | NO   | PRI | NULL                | auto_increment |<br>| call_start_time | datetime         | NO   |     | 0000-00-00 00:00:00 |                |<br>



| duration        | int(10) unsigned | NO   |     | 0                   |                |<br>| sip_call_id     | varchar(128)     | NO   |     |                     |                |<br>| sip_from_tag    | varchar(128)     | NO   |     |                     |                |<br>



| sip_to_tag      | varchar(128)     | NO   |     |                     |                |<br>| created         | datetime         | NO   |     | 0000-00-00 00:00:00 |                |<br>+-----------------+------------------+------+-----+---------------------+----------------+<br>



7 rows in set (0.00 sec)<br><br></div><div>Kindly please help me.<br></div></div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jun 27, 2013 at 3:53 PM, Flavio Goncalves <span dir="ltr">&lt;<a href="mailto:flavio@voffice.com.br" target="_blank">flavio@voffice.com.br</a>&gt;</span> wrote:<br>



<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Nandini, <div><br></div><div>There is a mysql stored procedure call to calculate the duration of the calls. There are some files at the tool subdirectory. /var/www/opensips=cp/config/tools/system/cdr (if I&#39;m remembering correctly). There is a sql file with a procedure to import to mysql (or postgresql) and a shell script to call the procedure from cron. Please, check again the installation instructions. </div>




<div><br></div><div>Flavio E. Goncalves</div><div class="gmail_extra"><div><div dir="ltr"><div><br></div></div></div>
<br><br><div class="gmail_quote">2013/6/27 Nandini madhu <span dir="ltr">&lt;<a href="mailto:sermj2012@gmail.com" target="_blank">sermj2012@gmail.com</a>&gt;</span><br><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><div>Dear all.<br><br></div>  i have installed opensips server and open-sips control panel on my pc successfully.<br></div>  In user management ,i can see the clients listed,but when the clients<br>






</div>are registered,when we click on line users,its showing no data found.<br></div>In CDRviewer also its showing no data.<br><br></div>please help me,<br></div>Thanks in advance</div>
<br></div></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></div></blockquote></div><br></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></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>
<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>