something like that maybe ;)
SELECT t1.from_uri as Caller, t1.to_uri as Callee, TIMEDIFF(t2.time, t1.time) as Duration, t1.time 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='ACK' AND t2.sip_method='BYE' order by t1.time desc
Olivier
Edson a écrit :
You are right, these kind of thread is already been discussed.... ;)
But not in this list (at least from what I am able to remember. :-( )
Try to look for such a thread on the SER list. It was responded by 'sip' about 6~12 month ago..
From: users-bounces@openser.org [mailto:users-bounces@openser.org] On Behalf Of Script Head Sent: sexta-feira, 26 de maio de 2006 13:53 To: OpenSER-users Subject: [Users] SQL query to generate CDR out of ACC logs
Does anyone have a query that'd generate some sort of a CDR out of ACC log table? Supposely it's been posted before but I've looked thru the archives and didn't find it.
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users