<br><font size=2 face="sans-serif">Thank you all for your help, this method
worked.</font>
<br>
<br><font size=2 face="sans-serif">-Jon</font>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td>
<td><font size=1 face="sans-serif"><b>"Zeus Ng" <zeus.ng@isquare.com.au></b></font>
<p><font size=1 face="sans-serif">05/27/2004 08:38 PM</font>
<td><font size=1 face="Arial"> </font>
<br><font size=1 face="sans-serif"> To:
<jon@bostontech.com></font>
<br><font size=1 face="sans-serif"> cc:
<serusers@lists.iptel.org></font>
<br><font size=1 face="sans-serif"> Fax
to: </font>
<br><font size=1 face="sans-serif"> Subject:
RE: [Serusers] Call Accounting - multiple
INVITE entries</font></table>
<br>
<br>
<br><font size=2><tt>search("^To:(.*);tag=(.*)$")<br>
<br>
That's what I did before discovering has_totag(). It requires the textops<br>
module.<br>
<br>
Zeus<br>
<br>
> -----Original Message-----<br>
> From: serusers-bounces@lists.iptel.org <br>
> [mailto:serusers-bounces@lists.iptel.org] On Behalf Of jon@bostontech.com<br>
> Sent: Friday, 28 May 2004 5:00 AM<br>
> To: Klaus Darilion<br>
> Cc: serusers@lists.iptel.org<br>
> Subject: Re: [Serusers] Call Accounting - multiple INVITE entries<br>
> <br>
> <br>
> <br>
> I figured out my confusion. has_totag() is in the development <br>
> side of the "uri" module. <br>
> I am running the latest stable version of sip, installed with <br>
> the rpm package for RedHat 9. It does not have support for <br>
> the has_totag() command. <br>
> <br>
> Without trying to use the new modules, is there any way to do <br>
> what i was asking below? (things are running pretty smoothly, <br>
> and i don't really want to have to rewrite a lot of script or <br>
> stuff like that :) <br>
> <br>
> thanks for your help so far. <br>
> -Jon <br>
> <br>
> <br>
> <br>
> Klaus
Darilion <klaus.mailinglists@pernau.at> <br>
> <br>
> 05/27/2004 02:19 PM <br>
> To: jon@bostontech.com
<br>
> cc: serusers@lists.iptel.org
<br>
> Fax to: <br>
> Subject: Re:
[Serusers] Call Accounting - <br>
> multiple INVITE entries<br>
> <br>
> <br>
> <br>
> sorry, it's called: has_totag().<br>
> Take a look at the README in the "uri" module.<br>
> <br>
> regards,<br>
> klaus<br>
> <br>
> jon@bostontech.com wrote:<br>
> <br>
> > <br>
> > I'm not completely following you. Is has_to_tag() a regular <br>
> command, <br>
> > and<br>
> > which module is it in?<br>
> > thanks<br>
> > <br>
> > Jon<br>
> > <br>
> > <br>
> > *Klaus
Darilion <klaus.mailinglists@pernau.at>*<br>
> > <br>
> > 05/27/2004 05:41 AM<br>
> > <br>
> >
<br>
> > To: jon@bostontech.com<br>
> > cc: serusers@lists.iptel.org<br>
> > Fax to: <br>
> > Subject: Re:
[Serusers] Call Accounting - <br>
> multiple INVITE <br>
> > entries<br>
> > <br>
> > <br>
> > <br>
> > <br>
> > You can check if the message has a to-tag has_to_tag() und in
that <br>
> > case: don't set the acc flag.<br>
> > <br>
> > klaus<br>
> > <br>
> > jon@bostontech.com wrote:<br>
> > ><br>
> > > I am running ser 0.8.12 (on RedHat 9) and have it
set up <br>
> to log all <br>
> > > invite and bye messages, so that I can use the accounting
<br>
> feature in <br>
> > > SerWeb. It's logging fine. > My problem is that
if there are <br>
> > multiple invites and only one bye during > a session,
I <br>
> get multiple <br>
> > entries in SerWeb with the same sip_callid. I > noticed
that this <br>
> > happens when the hold feature is used with the XTen >
soft phone.<br>
> > > Is there any way I can avoid logging these subsequent
<br>
> INVITE messages or<br>
> > > stop from displaying them in the call log on SerWeb?<br>
> > ><br>
> > ><br>
> > > My accounting routine:<br>
> > ><br>
> > > modparam("acc", "log_level",1)<br>
> > > modparam("acc", "db_flag", 1)<br>
> > > if ((method=="INVITE") || (method=="BYE"))
{<br>
> > > setflag (1);<br>
> > > };<br>
> > ><br>
> > ><br>
> > > Serweb $q call to MySQL (4.0.18) db:<br>
> > ><br>
> > > $q="select t1.to_uri, t1.from_uri, t1.sip_callid,
t1.time, ".<br>
> > > "t1.fromtag as invft,
t2.fromtag as byeft, <br>
> t2.totag as byett, ".<br>
> > > <br>
> "sec_to_time(unix_timestamp(t2.time)-unix_timestamp(t1.time))
".<br>
> > >
"as length ".<br>
> > > "from ".$config->table_accounting."
t1, ".<br>
> > >
$config->table_accounting. " t2 ".<br>
> > > "where t1.domain='".$config->realm."'
and ".<br>
> > >
"t1.sip_callid=t2.sip_callid and ".<br>
> > >
"t1.sip_method='INVITE' and t2.sip_method='BYE'".<br>
> > > "order by t1.time
desc";<br>
> > ><br>
> > ><br>
> > ><br>
> > > Thanks<br>
> > > -Jon B<br>
> > ><br>
> > ><br>
> > > <br>
> --------------------------------------------------------------<br>
> ----------<br>
> > ><br>
> > > _______________________________________________<br>
> > > Serusers mailing list<br>
> > > serusers@lists.iptel.org<br>
> > > http://lists.iptel.org/mailman/listinfo/serusers<br>
> > <br>
> <br>
> <br>
> <br>
<br>
</tt></font>
<br>