<div dir="ltr">Hi ... it was like this ... but the date what the script was getting &quot;2013-04-24 00:33 BRT blablabla&quot; and this is wrong ...<div><br></div><div style>Yesterday I tried another sql.conf from other CDRTool version I had in my server, wich is:</div>

<div style><br></div><div style><div>    accounting_start_query      = &quot;\</div><div>          CALL insert_radacct_record( \</div><div>                &#39;radius&#39;, \</div><div>                &#39;%{Acct-Session-Id}&#39;, \</div>

<div>                &#39;%{Acct-Unique-Session-Id}&#39;, \</div><div>                &#39;%{Billing-Party}&#39;, \</div><div>                &#39;%{Billing-Party}&#39;, \</div><div>                &#39;%{SIP-Proxy-IP}&#39;, \</div>

<div>                &#39;%{NAS-Port}&#39;, \</div><div><b>                &#39;%S&#39;, \</b></div><div>                &#39;0&#39;, \</div><div>                &#39;0&#39;, \</div><div>                &#39;0&#39;, \</div>

<div>                &#39;0&#39;, \</div><div>                &#39;%{Called-Station-Id}&#39;, \</div><div>                &#39;%{Calling-Station-Id}&#39;, \</div><div>                &#39;%{Sip-Response-Code}&#39;, \</div>

<div>                &#39;%{Service-Type}&#39;, \</div><div>                &#39;%{ENUM-TLD}&#39;, \</div><div>                &#39;%{Framed-IP-Address}&#39;, \</div><div>                &#39;%{Acct-Delay-Time}&#39;, \</div>

<div>                &#39;0&#39;, \</div><div>                &#39;%{Sip-Response-Code}&#39;, \</div><div>                &#39;%{Sip-Method}&#39;, \</div><div>                &#39;%{Sip-Translated-Request-URI}&#39;, \</div>

<div>                &#39;%{Sip-To-Tag}&#39;, \</div><div>                &#39;%{Sip-From-Tag}&#39;, \</div><div>                &#39;%{Sip-RPId}&#39;, \</div><div>                &#39;%{Source-IP}&#39;, \</div><div>                &#39;%{Source-Port}&#39;, \</div>

<div>                &#39;%{Canonical-URI}&#39;, \</div><div>                &#39;&#39;, \</div><div>                &#39;&#39;, \</div><div>                &#39;audio&#39;, \</div><div>                &#39;%{User-Agent}&#39;, \</div>

<div>                &#39;%{From-Header}&#39; \</div><div>                )&quot;</div><div><br></div><div>    accounting_stop_query       = &quot;\</div><div>          CALL update_radacct_record( \</div><div>                &#39;radius&#39;, \</div>

<div><b>                &#39;%S&#39;, \</b></div><div>                &#39;%{Acct-Delay-Time}&#39;, \</div><div>                &#39;%{Connect-Info}&#39;, \</div><div>                &#39;%{X-RTP-Stat}&#39;, \</div><div>
                 &#39;%{Acct-Session-Id}&#39;, \</div>
<div>                &#39;%{Sip-To-Tag}&#39;, \</div><div>                &#39;%{Sip-From-Tag}&#39; \</div><div>                )&quot;</div><div><br></div><div>    accounting_update_query       = &quot;\</div><div>          CALL update_raddact_record_mediaproxy( \</div>

<div>                &#39;radius&#39;, \</div><div>                &#39;%{Acct-Session-Time}&#39;, \</div><div>                &#39;%{Acct-Input-Octets}&#39;, \</div><div>                &#39;%{Acct-Output-Octets}&#39;, \</div>

<div>                &#39;%{Sip-User-Agents}&#39;, \</div><div>                &#39;%{Media-Codecs}&#39;, \</div><div>                &#39;%{Sip-Application-Type}&#39;, \</div><div>                &#39;%{Media-Info}&#39;, \</div>

<div>                &#39;0&#39;, \</div><div>                &#39;%{Acct-Session-Id}&#39;, \</div><div>                &#39;%{Sip-To-Tag}&#39;, \</div><div>                &#39;%{Sip-From-Tag}&#39; \</div><div>                )&quot;</div>

<div><br></div><div>    accounting_failed_query     = &quot;\</div><div>          CALL insert_radacct_record( \</div><div>                &#39;radius&#39;, \</div><div>                &#39;%{Acct-Session-Id}&#39;, \</div>

<div>                &#39;%{Acct-Unique-Session-Id}&#39;, \</div><div>                &#39;%{Billing-Party}&#39;, \</div><div>                &#39;%{Billing-Party}&#39;, \</div><div>                &#39;%{SIP-Proxy-IP}&#39;, \</div>

<div>                &#39;%{NAS-Port}&#39;, \</div><div>               <b> &#39;%S&#39;, \</b></div><div><b>                &#39;%S&#39;, \</b></div><div>                &#39;0&#39;, \</div><div>                &#39;0&#39;, \</div>

<div>                &#39;0&#39;, \</div><div>                &#39;%{Called-Station-Id}&#39;, \</div><div>                &#39;%{Calling-Station-Id}&#39;, \</div><div>                &#39;%{Sip-Response-Code}&#39;, \</div>

<div>                &#39;%{Service-Type}&#39;, \</div><div>                &#39;%{ENUM-TLD}&#39;, \</div><div>                &#39;%{Framed-IP-Address}&#39;, \</div><div>                &#39;%{Acct-Delay-Time}&#39;, \</div>

<div>                &#39;0&#39;, \</div><div>                &#39;%{Sip-Response-Code}&#39;, \</div><div>                &#39;%{Sip-Method}&#39;, \</div><div>                &#39;%{Sip-Translated-Request-URI}&#39;, \</div>

<div>                MD5(RAND()), \</div><div>                &#39;%{Sip-From-Tag}&#39;, \</div><div>                &#39;%{Sip-RPId}&#39;, \</div><div>                &#39;%{Source-IP}&#39;, \</div><div>                &#39;%{Source-Port}&#39;, \</div>

<div>                &#39;%{Canonical-URI}&#39;, \</div><div>                &#39;&#39;, \</div><div>                &#39;&#39;, \</div><div>                &#39;audio&#39;, \</div><div>                &#39;%{User-Agent}&#39;, \</div>

<div>                &#39;%{From-Header}&#39; \</div><div>                )&quot;</div><div>}</div><div><br></div><div style>See the field wich have DATE-TIME, in this sql.conf file, have only &#39;%S&#39;, where the original sql.conf file has                 FROM_UNIXTIME(%{Event-Timestamp}), \</div>

<div style>FROM_UNIXTIME(%{Event-Timestamp}), \</div><div><br></div><div style>In field ${Sip-Application-Type}, I had to put &quot;audio&quot; manually to work too ...</div><div style><br></div><div style>Now CDRTool is working good, getting Date-Time correctly.</div>

<div style><br></div></div></div><div class="gmail_extra"><br clear="all"><div>Willian Mazzardo<br>Depto TI - SYSSVOIP<br><a href="http://www.syssvoip.com.br">www.syssvoip.com.br</a><br>55 3537 2030</div>
<br><br><div class="gmail_quote">2013/3/25 Tijmen de Mes <span dir="ltr">&lt;<a href="mailto:tijmen@ag-projects.com" target="_blank">tijmen@ag-projects.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <div>Hi,<br>
      <br>
      Please check sql.conf in freeradius. The event timestamp should be
      a  timeststamp not a datetime.<br>
      <br>
      What do you have configured there? It should be like
      FROM_UNIXTIME(%{Event-Timestamp}), \ <br><div class="im">
      <pre cols="72">-- 
Tijmen de Mes
AG Projects</pre></div><div><div class="h5">
      On 03/24/2013 06:34 AM, Willian Mazzardo - SYSSVOIP wrote:<br>
    </div></div></div><div><div class="h5">
    <blockquote type="cite">
      <div dir="ltr">I think I have found the problem....
        <div><br>
        </div>
        <div>see the log:</div>
        <div><br>
        </div>
        <div>
          <div>Going to the next request</div>
          <div>Ready to process requests.</div>
          <div>rad_recv: Accounting-Request packet from host 127.0.0.1
            port 45662, id=207, length=327</div>
          <div><span style="white-space:pre-wrap"> </span>Acct-Status-Type
            = Failed</div>
          <div><span style="white-space:pre-wrap"> </span>Service-Type
            = Sip-Session</div>
          <div><span style="white-space:pre-wrap"> </span>Sip-Response-Code
            = 487</div>
          <div><span style="white-space:pre-wrap"> </span>Sip-Method
            = Invite</div>
          <div><span style="white-space:pre-wrap"> </span>Event-Timestamp
            = &quot;Mar 24 2013 02:26:30 BRT&quot;</div>
          <div><span style="white-space:pre-wrap"> </span>Sip-From-Tag
            = &quot;2008462333&quot;</div>
          <div><span style="white-space:pre-wrap"> </span>Sip-To-Tag
            = &quot;as4a8dfb83&quot;</div>
          <div><span style="white-space:pre-wrap"> </span>Acct-Session-Id
            = &quot;411815482&quot;</div>
          <div><span style="white-space:pre-wrap"> </span>User-Name
            = &quot;<a href="mailto:559101999@187.53.208.109" target="_blank">559101999@187.53.208.109</a>&quot;</div>
          <div><span style="white-space:pre-wrap"> </span>Calling-Station-Id
            = &quot;<a href="mailto:sip%3A559101999@187.53.208.109" target="_blank">sip:559101999@187.53.208.109</a>&quot;</div>
          <div><span style="white-space:pre-wrap"> </span>Called-Station-Id
            = &quot;<a href="mailto:sip%3A05596412757@187.53.208.109" target="_blank">sip:05596412757@187.53.208.109</a>&quot;</div>
          <div><span style="white-space:pre-wrap"> </span>Sip-Translated-Request-URI
            = &quot;<a href="mailto:sip%3A555596412757@177.126.178.106" target="_blank">sip:555596412757@177.126.178.106</a>&quot;</div>
          <div><span style="white-space:pre-wrap"> </span>Canonical-URI
            = &quot;<a href="mailto:sip%3A555596412757@187.53.208.109" target="_blank">sip:555596412757@187.53.208.109</a>&quot;</div>
          <div><span style="white-space:pre-wrap"> </span>User-Agent
            = &quot;Linphone/3.5.2 (eXosip2/3.6.0)&quot;</div>
          <div><span style="white-space:pre-wrap"> </span>Contact =
            &quot;&lt;<a href="http://sip:559101999@192.168.10.110:5066" target="_blank">sip:559101999@192.168.10.110:5066</a>&gt;&quot;</div>
          <div><span style="white-space:pre-wrap"> </span>NAS-Port
            = 5060</div>
          <div><span style="white-space:pre-wrap"> </span>Acct-Delay-Time
            = 0</div>
          <div><span style="white-space:pre-wrap"> </span>NAS-IP-Address
            = 127.0.0.1</div>
          <div># Executing section preacct from file
            /etc/freeradius/radiusd.conf</div>
          <div>+- entering group preacct {...}</div>
          <div>++[preprocess] returns ok</div>
          <div>[suffix] Looking up realm &quot;187.53.208.109&quot; for User-Name
            = &quot;<a href="mailto:559101999@187.53.208.109" target="_blank">559101999@187.53.208.109</a>&quot;</div>
          <div>[suffix] No such realm &quot;187.53.208.109&quot;</div>
          <div>++[suffix] returns noop</div>
          <div>++[files] returns noop</div>
          <div># Executing section accounting from file
            /etc/freeradius/radiusd.conf</div>
          <div>+- entering group accounting {...}</div>
          <div>[detail] <span style="white-space:pre-wrap"> </span>expand:
            /var/log/freeradius/radacct/%{Client-IP-Address}/detail-%Y%m%d
            -&gt; /var/log/freeradius/radacct/<a href="http://127.0.0.1/detail-20130324" target="_blank">127.0.0.1/detail-20130324</a></div>
          <div>[detail]
            /var/log/freeradius/radacct/%{Client-IP-Address}/detail-%Y%m%d
            expands to /var/log/freeradius/radacct/<a href="http://127.0.0.1/detail-20130324" target="_blank">127.0.0.1/detail-20130324</a></div>
          <div>[detail] <span style="white-space:pre-wrap"> </span>expand:
            %t -&gt; Sun Mar 24 02:26:50 2013</div>
          <div>++[detail] returns ok</div>
          <div>[sql] WARNING: Unknown module &quot;Sip-Application-Type&quot; in
            string expansion &quot;%&#39;,                 &#39;%{User-Agent}&#39;,      
                      &#39;%{From-Header}&#39;                 )&quot;</div>
          <div>[sql] <span style="white-space:pre-wrap"> </span>expand:
            /var/log/freeradius/sqltrace-%Y%m%d.log -&gt;
            /var/log/freeradius/sqltrace-20130324.log</div>
          <div>rlm_sql (sql): Reserving sql socket id: 22</div>
          <div>rlm_sql_mysql: MYSQL check_error: 1064 received</div>
          <div>rlm_sql (sql): Couldn&#39;t insert SQL accounting FAILED
            record - You have an error in your SQL syntax; check the
            manual that corresponds to your MySQL server version for the
            right syntax to use near &#39;24 2013 02:26:30 BRT),            
                FROM_UNIXTIME(Mar 24 2013 02:26:30 BRT), &#39; at line 1</div>
          <div>rlm_sql_mysql: MYSQL check_error: 1064 received</div>
          <div>rlm_sql_mysql: Cannot store result</div>
          <div>rlm_sql_mysql: MySQL error &#39;You have an error in your SQL
            syntax; check the manual that corresponds to your MySQL
            server version for the right syntax to use near &#39;24 2013
            02:26:30 BRT),                 FROM_UNIXTIME(Mar 24 2013
            02:26:30 BRT), &#39; at line 1&#39;</div>
          <div>rlm_sql (sql): Released sql socket id: 22</div>
          <div>++[sql] returns fail</div>
          <div>Finished request 2.</div>
          <div>Cleaning up request 2 ID 207 with timestamp +29</div>
          <div>Going to the next request</div>
          <div>Ready to process requests.</div>
          <div><br>
          </div>
          <div><br>
          </div>
          <div>I think is a DATE/TIME problem ...</div>
          <div><br>
          </div>
          <div>Am I right?</div>
          <div><br>
          </div>
        </div>
      </div>
      <div class="gmail_extra"><br clear="all">
        <div>Willian Mazzardo<br>
          Depto TI - SYSSVOIP<br>
          <a href="http://www.syssvoip.com.br" target="_blank">www.syssvoip.com.br</a><br>
          <a href="tel:55%203537%202030" value="+555535372030" target="_blank">55 3537 2030</a></div>
        <br>
        <br>
        <div class="gmail_quote">2013/3/23 Willian Mazzardo - SYSSVOIP <span dir="ltr">&lt;<a href="mailto:willian@syssvoip.com.br" target="_blank">willian@syssvoip.com.br</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">Hi Tijmen... thanks for your help... I have
              installed, but in mysql, the table radacct.201303 is not
              creating automatically.
              <div><br>
              </div>
              <div>How can I debug this?</div>
            </div>
            <div class="gmail_extra">
              <br clear="all">
              <div>Willian Mazzardo<br>
                Depto TI - SYSSVOIP<br>
                <a href="http://www.syssvoip.com.br" target="_blank">www.syssvoip.com.br</a><br>
                <a href="tel:55%203537%202030" value="+555535372030" target="_blank">55 3537 2030</a></div>
              <div>
                <div>
                  <br>
                  <br>
                  <div class="gmail_quote">2013/3/23 Tijmen de Mes <span dir="ltr">&lt;<a href="mailto:tijmen@ag-projects.com" target="_blank">tijmen@ag-projects.com</a>&gt;</span><br>
                    <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                      <div style="word-wrap:break-word">Hi,
                        <div><br>
                        </div>
                        <div>I believe you can find everything you need
                          in the install guide:</div>
                        <div><a href="http://cdrtool.ag-projects.com/projects/cdrtool/wiki/Installation_Guide" target="_blank">http://cdrtool.ag-projects.com/projects/cdrtool/wiki/Installation_Guide</a></div>
                        <div>
                          <div><br>
                          </div>
                          <div>Best regards,</div>
                          <div><br>
                          </div>
                          <div>--</div>
                          <div>Tijmen de Mes</div>
                          <div>AG Projects</div>
                        </div>
                        <div><br>
                          <div>
                            <div>Op 24 mrt. 2013, om 02:38 heeft Willian
                              Mazzardo - SYSSVOIP &lt;<a href="mailto:willian@syssvoip.com.br" target="_blank">willian@syssvoip.com.br</a>&gt;
                              het volgende geschreven:</div>
                            <div>
                              <div><br>
                                <blockquote type="cite">
                                  <p dir="ltr">Hi... im sorry intruding
                                    this topic to talk about different,
                                    but, have anyone some tutorial to
                                    install cdrtool in debian with
                                    opensips?</p>
                                  <p dir="ltr">Thanks</p>
                                  <div class="gmail_quote">On Mar 23,
                                    2013 10:31 PM, &quot;Tijmen de Mes&quot; &lt;<a href="mailto:tijmen@ag-projects.com" target="_blank">tijmen@ag-projects.com</a>&gt;
                                    wrote:<br type="attribution">
                                    <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                                      Hi,<br>
                                      <br>
                                      We had a bug which sneaked in due
                                      to another change and this is
                                      already fixed in trunk and will be
                                      part of the new release.<br>
                                      <br>
                                      The patch is here:<br>
                                      <a href="http://cdrtool.ag-projects.com/projects/cdrtool/repository/revisions/2421" target="_blank">http://cdrtool.ag-projects.com/projects/cdrtool/repository/revisions/2421</a><br>
                                      <br>
                                      Best regards,<br>
                                      <br>
                                      --<br>
                                      Tijmen de Mes<br>
                                      AG Projects<br>
                                      <br>
                                      Op 24 mrt. 2013, om 00:26 heeft
                                      dotnetdub &lt;<a href="mailto:dotnetdub@gmail.com" target="_blank">dotnetdub@gmail.com</a>&gt;
                                      het volgende geschreven:<br>
                                      <br>
                                      &gt; On 23 March 2013 20:52,
                                      Laszlo &lt;<a href="mailto:laszlo@voipfreak.net" target="_blank">laszlo@voipfreak.net</a>&gt;
                                      wrote:<br>
                                      &gt;&gt; +1 on this<br>
                                      &gt;&gt;<br>
                                      &gt;<br>
                                      &gt; We will do our best to
                                      contribute a patch..<br>
                                      &gt;<br>
                                      &gt;
                                      _______________________________________________<br>
                                      &gt; Users mailing list<br>
                                      &gt; <a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
                                      &gt; <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>
                                      <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>
                                    </blockquote>
                                  </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>
                                </blockquote>
                              </div>
                            </div>
                          </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>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      <pre>_______________________________________________
Users mailing list
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
    </blockquote>
  </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>