<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.28.1">
</HEAD>
<BODY>
Hi,<BR>
<BR>
Well, after applying to asterisk source, it failed when compiling with:<BR>
<BR>
&nbsp;&nbsp; [CC] func_cdr.c -&gt; func_cdr.o<BR>
func_cdr.c: In function &#8216;cdr_read&#8217;:<BR>
func_cdr.c:87: error: &#8216;OPT_FLOAT&#8217; undeclared (first use in this function)<BR>
func_cdr.c:87: error: (Each undeclared identifier is reported only once<BR>
func_cdr.c:87: error: for each function it appears in.)<BR>
func_cdr.c:92: warning: implicit declaration of function &#8216;ast_tvdiff_us&#8217;<BR>
make[1]: *** [func_cdr.o] Error 1<BR>
make[1]: Leaving directory `/usr/src/asterisk/asterisk-1.4.29.1/funcs'<BR>
make: *** [funcs] Error 2<BR>
<BR>
Does anyone know if this is 1.6 branch specific or what?, is there a 1.4 version out there?<BR>
If this replies get outside of the scope of the forum by much, please point me to the right one for this issue, thanks.<BR>
<BR>
<BR>
regards,<BR>
<BR>
- jorge<BR>
<BR>
<BR>
On Fri, 2010-04-23 at 19:23 +0300, Kaloyan Kovachev wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
I am not sure how different is the trunk version of cdr_mysql from 1.4.10, but
it may be enough to apply the relevant part of the whole patch:

Index: addons/cdr_mysql.c
===================================================================
--- addons/cdr_mysql.c        (revision 253708)
+++ addons/cdr_mysql.c        (working copy)
@@ -288,6 +288,39 @@
                                         ast_str_append(&amp;sql2, 0, &quot;,&quot;);
                                 }
 
+                                if (!strcasecmp(cdrname, &quot;billsec&quot;) &amp;&amp;
+                                        (strstr(entry-&gt;type, &quot;float&quot;) ||
+                                        strstr(entry-&gt;type, &quot;double&quot;) ||
+                                        strstr(entry-&gt;type, &quot;decimal&quot;) ||
+                                        strstr(entry-&gt;type, &quot;numeric&quot;) ||
+                                        strstr(entry-&gt;type, &quot;real&quot;))) {
+
+                                        if (!ast_tvzero(cdr-&gt;answer)) {
+                                                snprintf(workspace, sizeof(workspace), &quot;%lf&quot;,
+                                                        (double) (ast_tvdiff_us(cdr-&gt;end, cdr-&gt;answer) / 1000000.0));
+                                        } else {
+                                                ast_copy_string(workspace, &quot;0&quot;,sizeof(workspace));
+                                        }
+
+                                        if (!ast_strlen_zero(workspace)) {
+                                                value = workspace;
+                                        }
+                                }
+
+                                if (!strcasecmp(cdrname, &quot;duration&quot;) &amp;&amp;
+                                        (strstr(entry-&gt;type, &quot;float&quot;) ||
+                                        strstr(entry-&gt;type, &quot;double&quot;) ||
+                                        strstr(entry-&gt;type, &quot;decimal&quot;) ||
+                                        strstr(entry-&gt;type, &quot;numeric&quot;) ||
+                                        strstr(entry-&gt;type, &quot;real&quot;))) {
+                                        snprintf(workspace, sizeof(workspace), &quot;%lf&quot;,
+                                                (double) (ast_tvdiff_us(cdr-&gt;end, cdr-&gt;start) / 1000000.0));
+
+                                        if (!ast_strlen_zero(workspace)) {
+                                                value = workspace;
+                                        }
+                                }
+

On Fri, 23 Apr 2010 10:08:28 -0600, Jorge Antillon wrote 
&gt; Hi, thanks for your time, this is where I went to, and how I got to
subscribing to asterisk-addons forum, I made no sense as to how to integrate
that into my asterisk-addons-1.4.10. 
&gt; 
&gt; regards, 
&gt; 
&gt; - jorge. 
&gt; 
&gt; On Fri, 2010-04-23 at 17:43 +0300, Kaloyan Kovachev wrote: 
&gt;  take a look at <A HREF="https://reviewboard.asterisk.org/r/461/">https://reviewboard.asterisk.org/r/461/</A> 
&gt; 
&gt; On Fri, 23 Apr 2010 08:32:43 -0600, Jorge Antillon wrote 
&gt; &gt; Hi,  
&gt; &gt;  
&gt; &gt; First off, I know this is not cdr_mysql forum, BUT, the asterisk-addons
message board bounced my posting.  
&gt; &gt; I've bumped onto a different pothole this time, what seems to be is a CDR
recording issue:  
&gt; &gt;  
&gt; &gt; I need to set CDR recording to tenths of a second or better, instead of
integer values,  
&gt; &gt;  
&gt; &gt; I have asterisk 1.4.29.1 and addons 1.4.10.  
&gt; &gt; cdr.billsec and cdr.duration is already set as float, so no problem there.  
&gt; &gt;  
&gt; &gt; I figure you must have bumped into issues like this connecting SS7 trunks
to other operators.  
&gt; &gt;  
&gt; &gt; Or if you know where to look for, please let me know.  
&gt; &gt;  
&gt; &gt; Regards,  
&gt; &gt;  
&gt; &gt;  
&gt;

&gt; &gt; 
&gt;

&gt;   Jorge Antillon 
&gt; &gt; CEO - CTO 
&gt; &gt; ticom - Costa Rica Telecom

&gt; &gt; 
&gt; &gt;

&gt; 
&gt;--

_____________________________________________________________________
-- Bandwidth and Colocation Provided by <A HREF="http://www.api-digital.com">http://www.api-digital.com</A> 
--

asterisk-ss7 mailing 
list
To UNSUBSCRIBE or update options 
visit:
<A HREF="http://lists.digium.com/mailman/listinfo/asterisk-ss7">http://lists.digium.com/mailman/listinfo/asterisk-ss7</A>


</PRE>
</BLOCKQUOTE>
</BODY>
</HTML>