<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Hi,<br>
<br>
As I said the event-timestamp should be a 'timestamp', not at
date. If it is a date, from_unixtime will not work. If the
timestamp is datetime, like in your case, the FROM_UNIXTIME
conversions are not needed. The question is, why is the timestamp
a datetime?<br>
<br>
If you use %S it will take the date/time from the sql server.
Please be aware that this is not the start/stop date of the
request.<br>
<br>
Which radius version are you running? Are you sure the right
dictionaries are loaded? If you specify the application type
manually it will be always audio. In SIP more types are possible,
like message.<br>
<br>
Best regards,<br>
<pre class="moz-signature" cols="72">--
Tijmen de Mes
AG Projects</pre>
<br>
On 03/25/2013 12:52 PM, Willian Mazzardo - SYSSVOIP wrote:<br>
</div>
<blockquote
cite="mid:CAL2ykgGmdiQeG=xJP=g=FEYHnr=m1=MG7RpjvvBNMU5Y1kA9Kg@mail.gmail.com"
type="cite">
<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 moz-do-not-send="true" href="http://www.syssvoip.com.br">www.syssvoip.com.br</a><br>
55 3537 2030</div>
</div>
</blockquote>
</body>
</html>