[Serusers] How to STOP logging reINVITE

sip sip at arcdiv.com
Wed May 10 15:04:21 CEST 2006


Sweet. I'll give that a try, thanks. 

Incidentally, for anyone interested, I figured out how to get received calls
for a webpage WITHOUT grabbing reinvites (even if logging them). It's UGLY,
but it works: 

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='INVITE'
AND t2.sip_method='BYE' AND t1.to_uri=<username> AND (select count(*) from acc
where sip_callid=t1.sip_callid and sip_method='INVITE' and
from_uri=<username>)=0 order by t1.time ASC;


That will give a list of people calling the local user <username> as well as
call durations but will strip out the reINVITES that make everything so messy.

N. 


On Wed, 10 May 2006 14:32:36 +0200, Andreas Granig wrote
> sip wrote:
> > Is there a way I can avoid logging reINVITEs in SER? I've been as yet unable
> > to come up with one.
> 
> if(method == "INVITE" && has_totag())
> {
>    # this is a re-invite...
> }
> 
> Andy




More information about the sr-users mailing list