Hi ... it was like this ... but the date what the script was getting
"2013-04-24 00:33 BRT blablabla" and this is wrong ...
Yesterday I tried another sql.conf from other CDRTool version I had in
my server, wich is:
accounting_start_query = "\
CALL insert_radacct_record( \
'radius', \
'%{Acct-Session-Id}', \
'%{Acct-Unique-Session-Id}', \
'%{Billing-Party}', \
'%{Billing-Party}', \
'%{SIP-Proxy-IP}', \
'%{NAS-Port}', \
* '%S', \*
'0', \
'0', \
'0', \
'0', \
'%{Called-Station-Id}', \
'%{Calling-Station-Id}', \
'%{Sip-Response-Code}', \
'%{Service-Type}', \
'%{ENUM-TLD}', \
'%{Framed-IP-Address}', \
'%{Acct-Delay-Time}', \
'0', \
'%{Sip-Response-Code}', \
'%{Sip-Method}', \
'%{Sip-Translated-Request-URI}', \
'%{Sip-To-Tag}', \
'%{Sip-From-Tag}', \
'%{Sip-RPId}', \
'%{Source-IP}', \
'%{Source-Port}', \
'%{Canonical-URI}', \
'', \
'', \
'audio', \
'%{User-Agent}', \
'%{From-Header}' \
)"
accounting_stop_query = "\
CALL update_radacct_record( \
'radius', \
* '%S', \*
'%{Acct-Delay-Time}', \
'%{Connect-Info}', \
'%{X-RTP-Stat}', \
'%{Acct-Session-Id}', \
'%{Sip-To-Tag}', \
'%{Sip-From-Tag}' \
)"
accounting_update_query = "\
CALL update_raddact_record_mediaproxy( \
'radius', \
'%{Acct-Session-Time}', \
'%{Acct-Input-Octets}', \
'%{Acct-Output-Octets}', \
'%{Sip-User-Agents}', \
'%{Media-Codecs}', \
'%{Sip-Application-Type}', \
'%{Media-Info}', \
'0', \
'%{Acct-Session-Id}', \
'%{Sip-To-Tag}', \
'%{Sip-From-Tag}' \
)"
accounting_failed_query = "\
CALL insert_radacct_record( \
'radius', \
'%{Acct-Session-Id}', \
'%{Acct-Unique-Session-Id}', \
'%{Billing-Party}', \
'%{Billing-Party}', \
'%{SIP-Proxy-IP}', \
'%{NAS-Port}', \
*'%S', \*
* '%S', \*
'0', \
'0', \
'0', \
'%{Called-Station-Id}', \
'%{Calling-Station-Id}', \
'%{Sip-Response-Code}', \
'%{Service-Type}', \
'%{ENUM-TLD}', \
'%{Framed-IP-Address}', \
'%{Acct-Delay-Time}', \
'0', \
'%{Sip-Response-Code}', \
'%{Sip-Method}', \
'%{Sip-Translated-Request-URI}', \
MD5(RAND()), \
'%{Sip-From-Tag}', \
'%{Sip-RPId}', \
'%{Source-IP}', \
'%{Source-Port}', \
'%{Canonical-URI}', \
'', \
'', \
'audio', \
'%{User-Agent}', \
'%{From-Header}' \
)"
}
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}), \
FROM_UNIXTIME(%{Event-Timestamp}), \
In field ${Sip-Application-Type}, I had to put "audio" manually to
work too ...
Now CDRTool is working good, getting Date-Time correctly.
Willian Mazzardo
Depto TI - SYSSVOIP
www.syssvoip.com.br <http://www.syssvoip.com.br>
55 3537 2030