I am running ser 0.8.12 (on RedHat 9) and have it set up to log all invite and bye messages, so that I can use the accounting feature in SerWeb. It's logging fine.
My problem is that if there are multiple invites and only one bye during a session, I get multiple entries in SerWeb with the same sip_callid. I noticed that this happens when the hold feature is used with the XTen soft phone.
Is there any way I can avoid logging these subsequent INVITE messages or stop from displaying them in the call log on SerWeb?


My accounting routine:

modparam("acc", "log_level",1)
modparam("acc", "db_flag", 1)
if ((method=="INVITE") || (method=="BYE")) {
        setflag (1);
};


Serweb $q call to MySQL (4.0.18) db:

$q="select t1.to_uri, t1.from_uri, t1.sip_callid, t1.time, ".
        "t1.fromtag as invft, t2.fromtag as byeft, t2.totag as byett, ".
        "sec_to_time(unix_timestamp(t2.time)-unix_timestamp(t1.time)) ".
                "as length ".
        "from ".$config->table_accounting." t1, ".
                $config->table_accounting. " t2 ".
        "where t1.domain='".$config->realm."' and ".
                "t1.sip_callid=t2.sip_callid and ".
                "t1.sip_method='INVITE' and t2.sip_method='BYE'".
        "order by t1.time desc";



Thanks
-Jon B