[asterisk-ss7] MySQL HiRes timer.
Jorge Antillon
jantillon at ticom.co.cr
Mon Apr 26 14:57:25 CDT 2010
Hi,
Well, after applying to asterisk source, it failed when compiling with:
[CC] func_cdr.c -> func_cdr.o
func_cdr.c: In function ‘cdr_read’:
func_cdr.c:87: error: ‘OPT_FLOAT’ undeclared (first use in this
function)
func_cdr.c:87: error: (Each undeclared identifier is reported only once
func_cdr.c:87: error: for each function it appears in.)
func_cdr.c:92: warning: implicit declaration of function ‘ast_tvdiff_us’
make[1]: *** [func_cdr.o] Error 1
make[1]: Leaving directory `/usr/src/asterisk/asterisk-1.4.29.1/funcs'
make: *** [funcs] Error 2
Does anyone know if this is 1.6 branch specific or what?, is there a 1.4
version out there?
If this replies get outside of the scope of the forum by much, please
point me to the right one for this issue, thanks.
regards,
- jorge
On Fri, 2010-04-23 at 19:23 +0300, Kaloyan Kovachev wrote:
> 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 https://reviewboard.asterisk.org/r/461/
> >
> > 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 http://www.api-digital.com
> --
>
> asterisk-ss7 mailing
> list
> To UNSUBSCRIBE or update options
> visit:
> http://lists.digium.com/mailman/listinfo/asterisk-ss7
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-ss7/attachments/20100426/a4e9128f/attachment.htm
More information about the asterisk-ss7
mailing list