<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Mangal;
        panose-1:2 4 5 3 5 2 3 3 2 2;}
@font-face
        {font-family:Mangal;
        panose-1:2 4 5 3 5 2 3 3 2 2;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.hoenzb
        {mso-style-name:hoenzb;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Change to this:<o:p></o:p></span></p><p class=MsoNormal>select * from cdr<br>where calldate >= '2012-09-01' and calldate < '2012-09-08'<br>and duration < 5 and disposition<>’NO ANSWER’;<br><br><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> asterisk-users-bounces@lists.digium.com [mailto:asterisk-users-bounces@lists.digium.com] <b>On Behalf Of </b>RSCL Mumbai<br><b>Sent:</b> Friday, September 14, 2012 11:34 AM<br><b>To:</b> Asterisk Users Mailing List - Non-Commercial Discussion<br><b>Subject:</b> Re: [asterisk-users] MySQL Query : Calls Answered for < 5 sec<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal style='margin-bottom:12.0pt'><span style='font-family:"Verdana","sans-serif"'>@Raj<br><br>I tried your query and variation by using replacing duration with billsec.<br>In both cases, I get results including disposition "NO ANSWER"<br><br><br><br></span><o:p></o:p></p><div><p class=MsoNormal>On Fri, Sep 14, 2012 at 9:58 PM, Raj Mathur (<span style='font-family:"Mangal","serif"'>राज</span> <span style='font-family:"Mangal","serif"'>माथुर</span>) <<a href="mailto:raju@linux-delhi.org" target="_blank">raju@linux-delhi.org</a>> wrote:<o:p></o:p></p><div><p class=MsoNormal style='margin-bottom:12.0pt'>On Friday 14 Sep 2012, RSCL Mumbai wrote:<br>> I am trying to construct MySQL query(s) to get a list of calls which<br>> lasted for less than 5 seconds between a given date range.<br>> Any help is appreciated.<o:p></o:p></p></div><p class=MsoNormal>On the CDR database, to get all calls that lasted < 5 seconds between<br>2012-09-01 and 2012-09-07 (inclusive), the MySQL query would be:<br><br>select * from cdr<br>where calldate >= '2012-09-01' and calldate < '2012-09-08'<br>and duration < 5;<br><br>Regards,<br><br>-- Raj<br><span class=hoenzb><span style='color:#888888'>--</span></span><span style='color:#888888'><br><span class=hoenzb>Raj Mathur || <a href="mailto:raju@kandalaya.org">raju@kandalaya.org</a> || GPG:</span><br><span class=hoenzb><a href="http://otheronepercent.blogspot.com" target="_blank">http://otheronepercent.blogspot.com</a> || <a href="http://kandalaya.org" target="_blank">http://kandalaya.org</a> || CC68</span><br><span class=hoenzb>It is the mind that moves || <a href="http://schizoid.in" target="_blank">http://schizoid.in</a> || D17F</span></span><o:p></o:p></p><div><div><p class=MsoNormal><br>--<br>_____________________________________________________________________<br>-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" target="_blank">http://www.api-digital.com</a> --<br>New to Asterisk? Join us for a live introductory webinar every Thurs:<br> <a href="http://www.asterisk.org/hello" target="_blank">http://www.asterisk.org/hello</a><br><br>asterisk-users mailing list<br>To UNSUBSCRIBE or update options visit:<br> <a href="http://lists.digium.com/mailman/listinfo/asterisk-users" target="_blank">http://lists.digium.com/mailman/listinfo/asterisk-users</a><o:p></o:p></p></div></div></div><p class=MsoNormal><o:p> </o:p></p></div></body></html>