<!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>
**************** Quick Update ***********************<BR>
<BR>
Patched and compiled against trunk version, which seems to be a 1.6ish branch and it went well, not tried it yet though, don't reaaaally use 1.6 just now.<BR>
Should I ?.<BR>
<BR>
jorge.<BR>
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<TR>
<TD>
<BR>
</TD>
</TR>
</TABLE>
On Mon, 2010-04-26 at 13:57 -0600, Jorge Antillon wrote:<BR>
<BLOCKQUOTE TYPE=CITE>
Hi,<BR>
<BR>
Well, after applying to asterisk source, it failed when compiling with:<BR>
<BR>
[CC] func_cdr.c -> func_cdr.o<BR>
func_cdr.c: In function ‘cdr_read’:<BR>
func_cdr.c:87: error: ‘OPT_FLOAT’ 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 ‘ast_tvdiff_us’<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(&sql2, 0, ",");
                                }
+                                if (!strcasecmp(cdrname, "billsec") &&
+                                        (strstr(entry->type, "float") ||
+                                        strstr(entry->type, "double") ||
+                                        strstr(entry->type, "decimal") ||
+                                        strstr(entry->type, "numeric") ||
+                                        strstr(entry->type, "real"))) {
+
+                                        if (!ast_tvzero(cdr->answer)) {
+                                                snprintf(workspace, sizeof(workspace), "%lf",
+                                                        (double) (ast_tvdiff_us(cdr->end, cdr->answer) / 1000000.0));
+                                        } else {
+                                                ast_copy_string(workspace, "0",sizeof(workspace));
+                                        }
+
+                                        if (!ast_strlen_zero(workspace)) {
+                                                value = workspace;
+                                        }
+                                }
+
+                                if (!strcasecmp(cdrname, "duration") &&
+                                        (strstr(entry->type, "float") ||
+                                        strstr(entry->type, "double") ||
+                                        strstr(entry->type, "decimal") ||
+                                        strstr(entry->type, "numeric") ||
+                                        strstr(entry->type, "real"))) {
+                                        snprintf(workspace, sizeof(workspace), "%lf",
+                                                (double) (ast_tvdiff_us(cdr->end, cdr->start) / 1000000.0));
+
+                                        if (!ast_strlen_zero(workspace)) {
+                                                value = workspace;
+                                        }
+                                }
+
On Fri, 23 Apr 2010 10:08:28 -0600, Jorge Antillon wrote
> 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.
>
> regards,
>
> - jorge.
>
> On Fri, 2010-04-23 at 17:43 +0300, Kaloyan Kovachev wrote:
> take a look at <A HREF="https://reviewboard.asterisk.org/r/461/">https://reviewboard.asterisk.org/r/461/</A>
>
> On Fri, 23 Apr 2010 08:32:43 -0600, Jorge Antillon wrote
> > Hi,
> >
> > First off, I know this is not cdr_mysql forum, BUT, the asterisk-addons
message board bounced my posting.
> > I've bumped onto a different pothole this time, what seems to be is a CDR
recording issue:
> >
> > I need to set CDR recording to tenths of a second or better, instead of
integer values,
> >
> > I have asterisk 1.4.29.1 and addons 1.4.10.
> > cdr.billsec and cdr.duration is already set as float, so no problem there.
> >
> > I figure you must have bumped into issues like this connecting SS7 trunks
to other operators.
> >
> > Or if you know where to look for, please let me know.
> >
> > Regards,
> >
> >
>
> >
>
> Jorge Antillon
> > CEO - CTO
> > ticom - Costa Rica Telecom
> >
> >
>
>--
_____________________________________________________________________
-- 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>
<PRE>
--
_____________________________________________________________________
-- 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>