[OpenSIPS-Users] CDRTool 9.1.1
Tijmen de Mes
tijmen at ag-projects.com
Mon Mar 25 14:20:18 CET 2013
Hi,
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?
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.
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.
Best regards,
--
Tijmen de Mes
AG Projects
On 03/25/2013 12:52 PM, Willian Mazzardo - SYSSVOIP wrote:
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20130325/6089cce6/attachment.htm>
More information about the Users
mailing list