<div dir="ltr">Hi ... it was like this ... but the date what the script was getting "2013-04-24 00:33 BRT blablabla" 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 = "\</div><div> CALL insert_radacct_record( \</div><div> 'radius', \</div><div> '%{Acct-Session-Id}', \</div>
<div> '%{Acct-Unique-Session-Id}', \</div><div> '%{Billing-Party}', \</div><div> '%{Billing-Party}', \</div><div> '%{SIP-Proxy-IP}', \</div>
<div> '%{NAS-Port}', \</div><div><b> '%S', \</b></div><div> '0', \</div><div> '0', \</div><div> '0', \</div>
<div> '0', \</div><div> '%{Called-Station-Id}', \</div><div> '%{Calling-Station-Id}', \</div><div> '%{Sip-Response-Code}', \</div>
<div> '%{Service-Type}', \</div><div> '%{ENUM-TLD}', \</div><div> '%{Framed-IP-Address}', \</div><div> '%{Acct-Delay-Time}', \</div>
<div> '0', \</div><div> '%{Sip-Response-Code}', \</div><div> '%{Sip-Method}', \</div><div> '%{Sip-Translated-Request-URI}', \</div>
<div> '%{Sip-To-Tag}', \</div><div> '%{Sip-From-Tag}', \</div><div> '%{Sip-RPId}', \</div><div> '%{Source-IP}', \</div><div> '%{Source-Port}', \</div>
<div> '%{Canonical-URI}', \</div><div> '', \</div><div> '', \</div><div> 'audio', \</div><div> '%{User-Agent}', \</div>
<div> '%{From-Header}' \</div><div> )"</div><div><br></div><div> accounting_stop_query = "\</div><div> CALL update_radacct_record( \</div><div> 'radius', \</div>
<div><b> '%S', \</b></div><div> '%{Acct-Delay-Time}', \</div><div> '%{Connect-Info}', \</div><div> '%{X-RTP-Stat}', \</div><div>
'%{Acct-Session-Id}', \</div>
<div> '%{Sip-To-Tag}', \</div><div> '%{Sip-From-Tag}' \</div><div> )"</div><div><br></div><div> accounting_update_query = "\</div><div> CALL update_raddact_record_mediaproxy( \</div>
<div> 'radius', \</div><div> '%{Acct-Session-Time}', \</div><div> '%{Acct-Input-Octets}', \</div><div> '%{Acct-Output-Octets}', \</div>
<div> '%{Sip-User-Agents}', \</div><div> '%{Media-Codecs}', \</div><div> '%{Sip-Application-Type}', \</div><div> '%{Media-Info}', \</div>
<div> '0', \</div><div> '%{Acct-Session-Id}', \</div><div> '%{Sip-To-Tag}', \</div><div> '%{Sip-From-Tag}' \</div><div> )"</div>
<div><br></div><div> accounting_failed_query = "\</div><div> CALL insert_radacct_record( \</div><div> 'radius', \</div><div> '%{Acct-Session-Id}', \</div>
<div> '%{Acct-Unique-Session-Id}', \</div><div> '%{Billing-Party}', \</div><div> '%{Billing-Party}', \</div><div> '%{SIP-Proxy-IP}', \</div>
<div> '%{NAS-Port}', \</div><div> <b> '%S', \</b></div><div><b> '%S', \</b></div><div> '0', \</div><div> '0', \</div>
<div> '0', \</div><div> '%{Called-Station-Id}', \</div><div> '%{Calling-Station-Id}', \</div><div> '%{Sip-Response-Code}', \</div>
<div> '%{Service-Type}', \</div><div> '%{ENUM-TLD}', \</div><div> '%{Framed-IP-Address}', \</div><div> '%{Acct-Delay-Time}', \</div>
<div> '0', \</div><div> '%{Sip-Response-Code}', \</div><div> '%{Sip-Method}', \</div><div> '%{Sip-Translated-Request-URI}', \</div>
<div> MD5(RAND()), \</div><div> '%{Sip-From-Tag}', \</div><div> '%{Sip-RPId}', \</div><div> '%{Source-IP}', \</div><div> '%{Source-Port}', \</div>
<div> '%{Canonical-URI}', \</div><div> '', \</div><div> '', \</div><div> 'audio', \</div><div> '%{User-Agent}', \</div>
<div> '%{From-Header}' \</div><div> )"</div><div>}</div><div><br></div><div style>See the field wich have DATE-TIME, in this sql.conf file, have only '%S', 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 "audio" 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"><<a href="mailto:tijmen@ag-projects.com" target="_blank">tijmen@ag-projects.com</a>></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
= "Mar 24 2013 02:26:30 BRT"</div>
<div><span style="white-space:pre-wrap"> </span>Sip-From-Tag
= "2008462333"</div>
<div><span style="white-space:pre-wrap"> </span>Sip-To-Tag
= "as4a8dfb83"</div>
<div><span style="white-space:pre-wrap"> </span>Acct-Session-Id
= "411815482"</div>
<div><span style="white-space:pre-wrap"> </span>User-Name
= "<a href="mailto:559101999@187.53.208.109" target="_blank">559101999@187.53.208.109</a>"</div>
<div><span style="white-space:pre-wrap"> </span>Calling-Station-Id
= "<a href="mailto:sip%3A559101999@187.53.208.109" target="_blank">sip:559101999@187.53.208.109</a>"</div>
<div><span style="white-space:pre-wrap"> </span>Called-Station-Id
= "<a href="mailto:sip%3A05596412757@187.53.208.109" target="_blank">sip:05596412757@187.53.208.109</a>"</div>
<div><span style="white-space:pre-wrap"> </span>Sip-Translated-Request-URI
= "<a href="mailto:sip%3A555596412757@177.126.178.106" target="_blank">sip:555596412757@177.126.178.106</a>"</div>
<div><span style="white-space:pre-wrap"> </span>Canonical-URI
= "<a href="mailto:sip%3A555596412757@187.53.208.109" target="_blank">sip:555596412757@187.53.208.109</a>"</div>
<div><span style="white-space:pre-wrap"> </span>User-Agent
= "Linphone/3.5.2 (eXosip2/3.6.0)"</div>
<div><span style="white-space:pre-wrap"> </span>Contact =
"<<a href="http://sip:559101999@192.168.10.110:5066" target="_blank">sip:559101999@192.168.10.110:5066</a>>"</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 "187.53.208.109" for User-Name
= "<a href="mailto:559101999@187.53.208.109" target="_blank">559101999@187.53.208.109</a>"</div>
<div>[suffix] No such realm "187.53.208.109"</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
-> /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 -> Sun Mar 24 02:26:50 2013</div>
<div>++[detail] returns ok</div>
<div>[sql] WARNING: Unknown module "Sip-Application-Type" in
string expansion "%', '%{User-Agent}',
'%{From-Header}' )"</div>
<div>[sql] <span style="white-space:pre-wrap"> </span>expand:
/var/log/freeradius/sqltrace-%Y%m%d.log ->
/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'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 '24 2013 02:26:30 BRT),
FROM_UNIXTIME(Mar 24 2013 02:26:30 BRT), ' 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 '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 '24 2013
02:26:30 BRT), FROM_UNIXTIME(Mar 24 2013
02:26:30 BRT), ' at line 1'</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"><<a href="mailto:willian@syssvoip.com.br" target="_blank">willian@syssvoip.com.br</a>></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"><<a href="mailto:tijmen@ag-projects.com" target="_blank">tijmen@ag-projects.com</a>></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 <<a href="mailto:willian@syssvoip.com.br" target="_blank">willian@syssvoip.com.br</a>>
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, "Tijmen de Mes" <<a href="mailto:tijmen@ag-projects.com" target="_blank">tijmen@ag-projects.com</a>>
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 <<a href="mailto:dotnetdub@gmail.com" target="_blank">dotnetdub@gmail.com</a>>
het volgende geschreven:<br>
<br>
> On 23 March 2013 20:52,
Laszlo <<a href="mailto:laszlo@voipfreak.net" target="_blank">laszlo@voipfreak.net</a>>
wrote:<br>
>> +1 on this<br>
>><br>
><br>
> We will do our best to
contribute a patch..<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>
<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>