<DIV>hi everybody,</DIV>
<DIV>Can somebody pls help me with the following issue. I collect my CDR using the following query:</DIV>
<DIV>&nbsp;</DIV>
<DIV>SELECT t1.from_uri as orig_number,&nbsp; t1.to_uri as term_number,&nbsp; <BR>TIMEDIFF(t2.time, t1.time) as duration,&nbsp; t1.timestamp as calldate <BR>FROM acc t1, acc t2&nbsp; <BR>WHERE t1.sip_callid = t2.sip_callid AND<BR>((t1.fromtag = t2.fromtag and t1.totag = t2.totag) OR<BR>&nbsp;(t1.fromtag = t2.totag and t1.totag = t2.fromtag)) AND<BR>t1.sip_method='INVITE' AND<BR>t2.sip_method='BYE'</DIV>
<DIV>&nbsp;</DIV>
<DIV>This query works fine and gives the call duration&nbsp;between an INVITE and BYE discarding the re-invites.</DIV>
<DIV>But recently in the peak calling time, I had to restart my openser for some technical reasons,</DIV>
<DIV>and I think I might have lost some BYEs during this.</DIV>
<DIV>Can somebody pls help me to extract the calls&nbsp;from acc table&nbsp;which has an INVITE but no BYE.</DIV>
<DIV>Will be very thanful to you,</DIV>
<DIV>&nbsp;</DIV>
<DIV>jayesh.</DIV><p>
                <hr size=1>Yahoo! for Good<br> 
<a href="http://store.yahoo.com/redcross-donate3/">Click here to donate</a> to the Hurricane Katrina relief effort.