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