<div dir="ltr">Damn it!!<div><br></div><div><div>#ATTRIBUTE Event-Timestamp 230 string</div></div><div><br></div><div style>Its commented !!</div><div style><br></div><div style>I will try comment this out and make a test.</div>
<div style><br></div><div style><br></div><div style><br></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 if the following is present in the OpenSIPS
dictionary:<br>
<pre>### Attributes added by AG Projects ###
ATTRIBUTE Source-IP 214 string
ATTRIBUTE Source-Port 215 string
ATTRIBUTE Canonical-URI 216 string
ATTRIBUTE Delay-Time 217 string
ATTRIBUTE Divert-Reason 219 string
ATTRIBUTE X-RTP-Stat 220 string
ATTRIBUTE From-Header 221 string
ATTRIBUTE User-Agent 222 string
ATTRIBUTE Contact 223 string
ATTRIBUTE Event 224 string
ATTRIBUTE Event-Timestamp 230 integer
ATTRIBUTE SIP-Proxy-IP 231 string
ATTRIBUTE ENUM-TLD 232 string</pre><div class="im">
<br>
Best regards,<br>
<pre cols="72">--
Tijmen de Mes
AG Projects</pre></div><div><div class="h5">
On 03/25/2013 02:26 PM, Willian Mazzardo - SYSSVOIP wrote:<br>
</div></div></div><div><div class="h5">
<blockquote type="cite">
<div dir="ltr">Hi ..
<div><br>
</div>
<div>about date/time issue, what can I do to test? because the
%S is "working" and give me the right duration time of a call.</div>
<div><br>
</div>
<div>My freeradius is FreeRADIUS Version 2.1.10, for
host x86_64-pc-linux-gnu, built on Jan 7 2013 at 17:11:42</div>
<div><br>
</div>
<div>the dictionaries loaded are:</div>
<div><br>
</div>
<div>
<div>$INCLUDE<span style="white-space:pre-wrap"> /</span>usr/share/freeradius/dictionary</div>
<div><br>
</div>
<div>
# OpenSER dictionary</div>
<div>$INCLUDE /etc/freeradius/dictionary.opensips</div>
<div><br>
</div>
<div># MediaProxy dictionary</div>
<div>$INCLUDE /etc/freeradius/dictionary.mediaproxy</div>
<div><br>
</div>
<div>
<br>
</div>
</div>
<div><br>
</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/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>
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.
<div><br>
<br>
Best regards,<br>
<pre cols="72">--
Tijmen de Mes
AG Projects</pre>
<br>
</div>
<div>
<div> On 03/25/2013 12:52 PM, Willian
Mazzardo - SYSSVOIP wrote:<br>
</div>
</div>
</div>
<div>
<div>
<blockquote 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>Yesterday I tried another sql.conf from other
CDRTool version I had in my server, wich is:</div>
<div><br>
</div>
<div>
<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>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>FROM_UNIXTIME(%{Event-Timestamp}), \</div>
<div><br>
</div>
<div>In field ${Sip-Application-Type}, I had to
put "audio" manually to work too ...</div>
<div><br>
</div>
<div>Now CDRTool is working good, getting
Date-Time correctly.</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>
</div>
</blockquote>
</div>
</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>
<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>