<!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.6.2">
</HEAD>
<BODY>
sum(duration+(6-mod(duration,6) for summary of seconds divisible by 6, /60 for minutes<BR>
<BR>
<BR>
On Tue, 2006-11-14 at 00:07 +0530, Vicky wrote:<BR>
<BLOCKQUOTE TYPE=CITE>
<FONT COLOR="#000000">This is more of mysql question then asterisk :D . Most voip providers use 6 second rounding for costing . My asterisk server stores call cdr's in mysql properly with billsec field containing number of billed seconds . I want to know some function to round this to 6 seconds ( or any custom valud like 30 seconds ) ..Suppose if billsec field is 3 seconds then it should round to 6 seconds , if its 13 second then it should round up to 18 seconds ( for 6sec pulse counting ) . What would be mysql function to do this ? </FONT><BR>
<FONT COLOR="#000000"> </FONT>
<PRE>
<FONT COLOR="#000000">_______________________________________________</FONT>
<FONT COLOR="#000000">--Bandwidth and Colocation provided by Easynews.com --</FONT>
<FONT COLOR="#000000">asterisk-users mailing list</FONT>
<FONT COLOR="#000000">To UNSUBSCRIBE or update options visit:</FONT>
<FONT COLOR="#000000"> <A HREF="http://lists.digium.com/mailman/listinfo/asterisk-users">http://lists.digium.com/mailman/listinfo/asterisk-users</A></FONT>
</PRE>
</BLOCKQUOTE>
</BODY>
</HTML>