<div dir="ltr">With that attribute commented out, when I try start freeradius, i have this error:<div><br></div><div><div>including dictionary file /etc/freeradius/dictionary</div><div>Errors reading dictionary: dict_init: /etc/freeradius/dictionary.opensips[93]: dict_addattr: Duplicate attribute name Event-Timestamp</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">www.syssvoip.com.br</a><br>55 3537 2030</div>
<br><br><div class="gmail_quote">2013/3/25 Willian Mazzardo - SYSSVOIP <span dir="ltr">&lt;<a href="mailto:willian@syssvoip.com.br" target="_blank">willian@syssvoip.com.br</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div dir="ltr">Damn it!!<div><br></div><div><div>#ATTRIBUTE       Event-Timestamp       230     string</div></div><div><br></div><div>Its commented !!</div><div><br></div><div>I will try comment this out and make a test.</div>


<div><br></div><div><br></div><div><br></div></div><div class="HOEnZb"><div class="h5"><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">&lt;<a href="mailto:tijmen@ag-projects.com" target="_blank">tijmen@ag-projects.com</a>&gt;</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>
      <br>
      Best regards,<br>
      <pre cols="72">-- 
Tijmen de Mes
AG Projects</pre></div><div><div>
      On 03/25/2013 02:26 PM, Willian Mazzardo - SYSSVOIP wrote:<br>
    </div></div></div><div><div>
    <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 &quot;working&quot; 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">&lt;<a href="mailto:tijmen@ag-projects.com" target="_blank">tijmen@ag-projects.com</a>&gt;</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 &#39;timestamp&#39;,
                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 &quot;2013-04-24 00:33
                      BRT blablabla&quot; 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      = &quot;\</div>
                        <div>          CALL insert_radacct_record( \</div>
                        <div>                &#39;radius&#39;, \</div>
                        <div>                &#39;%{Acct-Session-Id}&#39;, \</div>
                        <div>               
                          &#39;%{Acct-Unique-Session-Id}&#39;, \</div>
                        <div>                &#39;%{Billing-Party}&#39;, \</div>
                        <div>                &#39;%{Billing-Party}&#39;, \</div>
                        <div>                &#39;%{SIP-Proxy-IP}&#39;, \</div>
                        <div>                &#39;%{NAS-Port}&#39;, \</div>
                        <div><b>                &#39;%S&#39;, \</b></div>
                        <div>                &#39;0&#39;, \</div>
                        <div>                &#39;0&#39;, \</div>
                        <div>                &#39;0&#39;, \</div>
                        <div>                &#39;0&#39;, \</div>
                        <div>                &#39;%{Called-Station-Id}&#39;, \</div>
                        <div>                &#39;%{Calling-Station-Id}&#39;, \</div>
                        <div>                &#39;%{Sip-Response-Code}&#39;, \</div>
                        <div>                &#39;%{Service-Type}&#39;, \</div>
                        <div>                &#39;%{ENUM-TLD}&#39;, \</div>
                        <div>                &#39;%{Framed-IP-Address}&#39;, \</div>
                        <div>                &#39;%{Acct-Delay-Time}&#39;, \</div>
                        <div>                &#39;0&#39;, \</div>
                        <div>                &#39;%{Sip-Response-Code}&#39;, \</div>
                        <div>                &#39;%{Sip-Method}&#39;, \</div>
                        <div>               
                          &#39;%{Sip-Translated-Request-URI}&#39;, \</div>
                        <div>                &#39;%{Sip-To-Tag}&#39;, \</div>
                        <div>                &#39;%{Sip-From-Tag}&#39;, \</div>
                        <div>                &#39;%{Sip-RPId}&#39;, \</div>
                        <div>                &#39;%{Source-IP}&#39;, \</div>
                        <div>                &#39;%{Source-Port}&#39;, \</div>
                        <div>                &#39;%{Canonical-URI}&#39;, \</div>
                        <div>                &#39;&#39;, \</div>
                        <div>                &#39;&#39;, \</div>
                        <div>                &#39;audio&#39;, \</div>
                        <div>                &#39;%{User-Agent}&#39;, \</div>
                        <div>                &#39;%{From-Header}&#39; \</div>
                        <div>                )&quot;</div>
                        <div><br>
                        </div>
                        <div>    accounting_stop_query       = &quot;\</div>
                        <div>          CALL update_radacct_record( \</div>
                        <div>                &#39;radius&#39;, \</div>
                        <div><b>                &#39;%S&#39;, \</b></div>
                        <div>                &#39;%{Acct-Delay-Time}&#39;, \</div>
                        <div>                &#39;%{Connect-Info}&#39;, \</div>
                        <div>                &#39;%{X-RTP-Stat}&#39;, \</div>
                        <div>                  &#39;%{Acct-Session-Id}&#39;, \</div>
                        <div>                &#39;%{Sip-To-Tag}&#39;, \</div>
                        <div>                &#39;%{Sip-From-Tag}&#39; \</div>
                        <div>                )&quot;</div>
                        <div><br>
                        </div>
                        <div>    accounting_update_query       = &quot;\</div>
                        <div>          CALL
                          update_raddact_record_mediaproxy( \</div>
                        <div>                &#39;radius&#39;, \</div>
                        <div>                &#39;%{Acct-Session-Time}&#39;, \</div>
                        <div>                &#39;%{Acct-Input-Octets}&#39;, \</div>
                        <div>                &#39;%{Acct-Output-Octets}&#39;, \</div>
                        <div>                &#39;%{Sip-User-Agents}&#39;, \</div>
                        <div>                &#39;%{Media-Codecs}&#39;, \</div>
                        <div>                &#39;%{Sip-Application-Type}&#39;,
                          \</div>
                        <div>                &#39;%{Media-Info}&#39;, \</div>
                        <div>                &#39;0&#39;, \</div>
                        <div>                &#39;%{Acct-Session-Id}&#39;, \</div>
                        <div>                &#39;%{Sip-To-Tag}&#39;, \</div>
                        <div>                &#39;%{Sip-From-Tag}&#39; \</div>
                        <div>                )&quot;</div>
                        <div><br>
                        </div>
                        <div>    accounting_failed_query     = &quot;\</div>
                        <div>          CALL insert_radacct_record( \</div>
                        <div>                &#39;radius&#39;, \</div>
                        <div>                &#39;%{Acct-Session-Id}&#39;, \</div>
                        <div>               
                          &#39;%{Acct-Unique-Session-Id}&#39;, \</div>
                        <div>                &#39;%{Billing-Party}&#39;, \</div>
                        <div>                &#39;%{Billing-Party}&#39;, \</div>
                        <div>                &#39;%{SIP-Proxy-IP}&#39;, \</div>
                        <div>                &#39;%{NAS-Port}&#39;, \</div>
                        <div>               <b> &#39;%S&#39;, \</b></div>
                        <div><b>                &#39;%S&#39;, \</b></div>
                        <div>                &#39;0&#39;, \</div>
                        <div>                &#39;0&#39;, \</div>
                        <div>                &#39;0&#39;, \</div>
                        <div>                &#39;%{Called-Station-Id}&#39;, \</div>
                        <div>                &#39;%{Calling-Station-Id}&#39;, \</div>
                        <div>                &#39;%{Sip-Response-Code}&#39;, \</div>
                        <div>                &#39;%{Service-Type}&#39;, \</div>
                        <div>                &#39;%{ENUM-TLD}&#39;, \</div>
                        <div>                &#39;%{Framed-IP-Address}&#39;, \</div>
                        <div>                &#39;%{Acct-Delay-Time}&#39;, \</div>
                        <div>                &#39;0&#39;, \</div>
                        <div>                &#39;%{Sip-Response-Code}&#39;, \</div>
                        <div>                &#39;%{Sip-Method}&#39;, \</div>
                        <div>               
                          &#39;%{Sip-Translated-Request-URI}&#39;, \</div>
                        <div>                MD5(RAND()), \</div>
                        <div>                &#39;%{Sip-From-Tag}&#39;, \</div>
                        <div>                &#39;%{Sip-RPId}&#39;, \</div>
                        <div>                &#39;%{Source-IP}&#39;, \</div>
                        <div>                &#39;%{Source-Port}&#39;, \</div>
                        <div>                &#39;%{Canonical-URI}&#39;, \</div>
                        <div>                &#39;&#39;, \</div>
                        <div>                &#39;&#39;, \</div>
                        <div>                &#39;audio&#39;, \</div>
                        <div>                &#39;%{User-Agent}&#39;, \</div>
                        <div>                &#39;%{From-Header}&#39; \</div>
                        <div>                )&quot;</div>
                        <div>}</div>
                        <div><br>
                        </div>
                        <div>See the field wich have DATE-TIME, in this
                          sql.conf file, have only &#39;%S&#39;, 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 &quot;audio&quot; 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" 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>