<DIV>hi everybody,</DIV>
<DIV>Can somebody pls help me with the following issue. I collect my CDR using the following query:</DIV>
<DIV> </DIV>
<DIV>SELECT t1.from_uri as orig_number, t1.to_uri as term_number, <BR>TIMEDIFF(t2.time, t1.time) as duration, t1.timestamp as calldate <BR>FROM acc t1, acc t2 <BR>WHERE t1.sip_callid = t2.sip_callid AND<BR>((t1.fromtag = t2.fromtag and t1.totag = t2.totag) OR<BR> (t1.fromtag = t2.totag and t1.totag = t2.fromtag)) AND<BR>t1.sip_method='INVITE' AND<BR>t2.sip_method='BYE'</DIV>
<DIV> </DIV>
<DIV>This query works fine and gives the call duration 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 from acc table which has an INVITE but no BYE.</DIV>
<DIV>Will be very thanful to you,</DIV>
<DIV> </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.