<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>
      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>
      <br>
      Best regards,<br>
      <pre class="moz-signature" cols="72">-- 
Tijmen de Mes
AG Projects</pre>
      On 03/25/2013 02:26 PM, Willian Mazzardo - SYSSVOIP wrote:<br>
    </div>
    <blockquote
cite="mid:CAL2ykgFs3RW=pyM=16FeGRED7Fv63bT_kfH4ACwYiHbkfx5N5A@mail.gmail.com"
      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 style="">My freeradius is FreeRADIUS Version 2.1.10, for
          host x86_64-pc-linux-gnu, built on Jan &nbsp;7 2013 at 17:11:42</div>
        <div style=""><br>
        </div>
        <div style="">the dictionaries loaded are:</div>
        <div style=""><br>
        </div>
        <div style="">
          <div>$INCLUDE<span class="" style="white-space:pre"> /</span>usr/share/freeradius/dictionary</div>
          <div><br>
          </div>
          <div>
            # OpenSER dictionary</div>
          <div>$INCLUDE &nbsp; &nbsp; &nbsp; &nbsp;/etc/freeradius/dictionary.opensips</div>
          <div><br>
          </div>
          <div># MediaProxy dictionary</div>
          <div>$INCLUDE &nbsp; &nbsp; &nbsp; &nbsp;/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 moz-do-not-send="true" 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">&lt;<a moz-do-not-send="true"
              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 '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 class="im"><br>
                  <br>
                  Best regards,<br>
                  <pre cols="72">-- 
Tijmen de Mes
AG Projects</pre>
                  <br>
                </div>
                <div>
                  <div class="h5"> On 03/25/2013 12:52 PM, Willian
                    Mazzardo - SYSSVOIP wrote:<br>
                  </div>
                </div>
              </div>
              <div>
                <div class="h5">
                  <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>&nbsp; &nbsp; accounting_start_query &nbsp; &nbsp; &nbsp;= "\</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CALL insert_radacct_record( \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'radius', \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '%{Acct-Session-Id}', \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
                          '%{Acct-Unique-Session-Id}', \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '%{Billing-Party}', \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '%{Billing-Party}', \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '%{SIP-Proxy-IP}', \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '%{NAS-Port}', \</div>
                        <div><b>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '%S', \</b></div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '0', \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '0', \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '0', \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '0', \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '%{Called-Station-Id}', \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '%{Calling-Station-Id}', \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '%{Sip-Response-Code}', \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '%{Service-Type}', \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '%{ENUM-TLD}', \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '%{Framed-IP-Address}', \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '%{Acct-Delay-Time}', \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '0', \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '%{Sip-Response-Code}', \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '%{Sip-Method}', \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
                          '%{Sip-Translated-Request-URI}', \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '%{Sip-To-Tag}', \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '%{Sip-From-Tag}', \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '%{Sip-RPId}', \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '%{Source-IP}', \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '%{Source-Port}', \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '%{Canonical-URI}', \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '', \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '', \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'audio', \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '%{User-Agent}', \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '%{From-Header}' \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; )"</div>
                        <div><br>
                        </div>
                        <div>&nbsp; &nbsp; accounting_stop_query &nbsp; &nbsp; &nbsp; = "\</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CALL update_radacct_record( \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'radius', \</div>
                        <div><b>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '%S', \</b></div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '%{Acct-Delay-Time}', \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '%{Connect-Info}', \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '%{X-RTP-Stat}', \</div>
                        <div> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;'%{Acct-Session-Id}', \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '%{Sip-To-Tag}', \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '%{Sip-From-Tag}' \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; )"</div>
                        <div><br>
                        </div>
                        <div>&nbsp; &nbsp; accounting_update_query &nbsp; &nbsp; &nbsp; = "\</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CALL
                          update_raddact_record_mediaproxy( \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'radius', \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '%{Acct-Session-Time}', \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '%{Acct-Input-Octets}', \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '%{Acct-Output-Octets}', \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '%{Sip-User-Agents}', \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '%{Media-Codecs}', \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '%{Sip-Application-Type}',
                          \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '%{Media-Info}', \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '0', \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '%{Acct-Session-Id}', \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '%{Sip-To-Tag}', \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '%{Sip-From-Tag}' \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; )"</div>
                        <div><br>
                        </div>
                        <div>&nbsp; &nbsp; accounting_failed_query &nbsp; &nbsp; = "\</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CALL insert_radacct_record( \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'radius', \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '%{Acct-Session-Id}', \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
                          '%{Acct-Unique-Session-Id}', \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '%{Billing-Party}', \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '%{Billing-Party}', \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '%{SIP-Proxy-IP}', \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '%{NAS-Port}', \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<b> '%S', \</b></div>
                        <div><b>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '%S', \</b></div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '0', \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '0', \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '0', \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '%{Called-Station-Id}', \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '%{Calling-Station-Id}', \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '%{Sip-Response-Code}', \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '%{Service-Type}', \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '%{ENUM-TLD}', \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '%{Framed-IP-Address}', \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '%{Acct-Delay-Time}', \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '0', \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '%{Sip-Response-Code}', \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '%{Sip-Method}', \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
                          '%{Sip-Translated-Request-URI}', \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; MD5(RAND()), \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '%{Sip-From-Tag}', \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '%{Sip-RPId}', \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '%{Source-IP}', \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '%{Source-Port}', \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '%{Canonical-URI}', \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '', \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '', \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'audio', \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '%{User-Agent}', \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '%{From-Header}' \</div>
                        <div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; )"</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 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
                          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 moz-do-not-send="true"
                          href="http://www.syssvoip.com.br"
                          target="_blank">www.syssvoip.com.br</a><br>
                        <a moz-do-not-send="true"
                          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 moz-do-not-send="true"
              href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
            <a moz-do-not-send="true"
              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 class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
    </blockquote>
  </body>
</html>