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