Rv: Re: Rv: Re: [Serusers] accounting accuracy

sermail at systemsrm.co.uk sermail at systemsrm.co.uk
Sat Jul 23 09:41:30 CEST 2005


Here is my two pence ( having just found a problem with my accounting ! ) :-

SER timestamps the first INVITE the same as the first ACK, so the start of
the call is correct.

The last BYE is timestamped with the end of the call. So the difference IS
the duration of the call.

The catch is that if your UA has session timers enabled, then they will send
out further INVITES to SER every 3 minutes in my case. SER responds with
additional ACKs. This is a mechanism to ensure the call stays up.

The problem is that you need to ignore all these other INVITEs and ACKs
which have the same called anyway.

So make sure you measure duration between the FIRST INVITE and the last and
only BYE.

This caught me out for a bit ! !


Hope this helps.


Simon
ONSip.org Editor

-----Original Message-----
From: serusers-bounces at iptel.org [mailto:serusers-bounces at lists.iptel.org] On
Behalf Of Jon Mansey
Sent: 22 July 2005 20:11
To: serusers at lists.iptel.org
Subject: RE: Rv: Re: Rv: Re: [Serusers] accounting accuracy

Regarding accounting using INVITE, unless Im mistaken, the billable
talk-time of a call is between the ACK after the invite, ie when the call
actually goes live, and the BYE. If you bill from the INVITE, you would be
billing for ringing time also, maybe error messages etc. 

Having said that I notice that SER accounting doesn't log the INVITE
immmediately as it is sent from the caller, it in fact logs it almost
simultaneously just before the ACK, so the difference in accounting is
probably minimal if your account is driven from the acc module and not from
the actual event.

This may not be your issue because you say the error is in favor of your
provider.

In order to tell which INVITEs resulted in billable calls, you have to do
missed-call accounting so as to ignore the invites that resulted in 4xx
failures. Only INVITE/ACK pairs with a matching BYE are billable.

jm

> -----Original Message-----
> From: serusers-bounces at lists.iptel.org 
> [mailto:serusers-bounces at lists.iptel.org] On Behalf Of Iqbal
> Sent: Friday, July 22, 2005 11:51 AM
> To: Nhadie
> Cc: serusers at lists.iptel.org
> Subject: Re: Rv: Re: Rv: Re: [Serusers] accounting accuracy
> 
> 
> You can, but from what I have heard (when I looked at it a few months 
> ago) it was pretty useless, so I would avoid it.
> 
> If you have alot of BYE, then that is where the difference 
> is, all those 
> INVITES without a BYE you are not accounting for, but the gateway 
> provider always gets a BYE. Now you need to work out why you are not 
> getting the BYE, either the gateway is not sending them to 
> you, which I 
> find strange, or if they are sending you are not 
> recording...which again 
> is strange because you would either record none, OR all.
> 
> Maybe the calle is not hanging up the call for whatever 
> reason, if that 
> is the case no BYE will get sent, but what your gateway 
> provider should 
> do is to send you a BYE if their is a period of inactivity, 
> if they dont 
> , u might need to find other clever solutions, by using 
> session-timers, 
> to ask for re-invites from the user, and if you dont get 
> them, insert a 
> BYE yourself.
> 
> Iqbal
> 
> PS I have cc'd this to the list, just in case others have 
> similar problems,
> 
> Nhadie wrote:
> 
> >I see some INVITES that doesn't have a BYE. sip_status are 200 don't 
> >know if that's a cmplete call are not, but there's really alot.
> >
> >by the way it's in the favor of the provider, tough luck for me.
> >
> >can I just simply implement an open source billing system? 
> like trabas 
> >www.trabas.com.
> >
> >--------- Mensagem Original --------
> >From: Iqbal <iqbal at gigo.co.uk>
> >To: Nhadie <nhadie at cbcpworld.com>
> >Cc: serusers at lists.iptel.org
> >Subject: Re: Rv: Re: [Serusers] accounting accuracy
> >Date: 23/07/05 10:35
> >
> >  
> >
> >>The fields seem to be correct at a first glance, as long as you are 
> >>matching INVITE and BYE, it should be okay. I presume your not 
> >>allowing users to do anything like call forwarding, if you are the 
> >>accounting fields for that are slightly different.
> >>
> >>10% diff per month is alot, is it in the favour of the gateway...if 
> >>its in your favour...dont tell anyone :-)
> >>
> >>Is the number of calls to a particular country add up, i.e 
> ser shows 
> >>10 calls to India, does the gateway also, is there a particular 
> >>country destination which is showing the largest incorrect minutes.
> >>
> >>When you hang up a call, have u checked to see how quickly the BYE 
> >>hits your acc table, and what the time stamp on it is, 
> especially if 
> >>the callee hangs up, i.e the BYE comes from the gateway. Do 
> you have 
> >>any unmatched calls, i.e INVITES without a BYE, if so how
> >>    
> >>
> >many.
> >  
> >
> >>Any problems with power failures i.e endpoints not being 
> able to send 
> >>a
> >>    
> >>
> >BYE.
> >  
> >
> >>Iqbal
> >>
> >>PS I haven't been knighted as yet, hence you dont need to call me 
> >>Sir...but I am petitioning the Queen as soon as I get a chance :-)
> >>
> >>Nhadie wrote:
> >>
> >>&gt;We are averaging 17000 minutes a month. The gateway 
> provider will 
> >>give
> >>    
> >>
> >us a
> >  
> >
> >>&gt;weekly report that has number of minutes per country, it's not
> >>    
> >>
> >detailed per
> >  
> >
> >>&gt;call.
> >>&gt;
> >>&gt;actually sir i'm more worried if it's a problem on my billing 
> >>system,
> >>    
> >>
> >am I
> >  
> >
> >>&gt;using the right fields to extract the data?
> >>&gt;
> >>&gt;--------- Mensagem Original --------
> >>&gt;From: Iqbal &lt;iqbal at gigo.co.uk&gt;
> >>&gt;To: Nhadie &lt;nhadie at cbcpworld.com&gt;
> >>&gt;Cc: serusers at lists.iptel.org
> >>&gt;Subject: Re: [Serusers] accounting accuracy
> >>&gt;Date: 23/07/05 10:13
> >>&gt;
> >>&gt;
> >>&gt;
> >>&gt;&gt;Hi
> >>&gt;&gt;
> >>&gt;&gt;Are you/is your provider rounding up/down the number of 
> >>minutes,
> >>    
> >>
> >or do
> >  
> >
> >>&gt;&gt;you get raw CDR from them.
> >>&gt;&gt;
> >>&gt;&gt;1000 mins different out of how many total ?, and does the 
> >>gateway
> >>    
> >>
> >show
> >  
> >
> >>&gt;&gt;more than SER or less each time.
> >>&gt;&gt;
> >>&gt;&gt;Have you looked at one call, try making a test 
> call, time it 
> >>on
> >>    
> >>
> >your
> >  
> >
> >>&gt;&gt;stop watch for 60 secs, and see what ser shows and what the
> >>    
> >>
> >gateway shows.
> >  
> >
> >>&gt;&gt;
> >>&gt;&gt;I have run for sometime, and I havent really seen much 
> >>discrepancy
> >>    
> >>
> >in
> >  
> >
> >>&gt;&gt;the cdrs from upstream gateways...this is not to 
> say it cannot
> >>    
> >>
> >happen.
> >  
> >
> >>&gt;&gt;
> >>&gt;&gt;iqbal
> >>&gt;&gt;
> >>&gt;&gt;
> >>&gt;&gt;
> >>&gt;&gt;Nhadie wrote:
> >>&gt;&gt;
> >>&gt;&gt;&amp;gt;Hi list,
> >>&gt;&gt;&amp;gt;
> >>&gt;&gt;&amp;gt;I'm having problem with my accounting, I have a SIP 
> >>server
> >>    
> >>
> >and I'm
> >  
> >
> >>&gt;&gt;
> >>&gt;&gt;
> >>&gt;using a
> >>&gt;
> >>&gt;
> >>&gt;&gt;&amp;gt;commercial gateway provider where I can terminate 
> >>calls. &gt;&gt;&amp;gt; &gt;&gt;&amp;gt;Unfortunately, 
> there's a big 
> >>discrepancy on the number of
> >>    
> >>
> >minutes I
> >  
> >
> >>&gt;&gt;
> >>&gt;&gt;
> >>&gt;see on
> >>&gt;
> >>&gt;
> >>&gt;&gt;&amp;gt;my billing system, compared to the billing of the 
> >>gateway
> >>    
> >>
> >provider.
> >  
> >
> >>&gt;&gt;
> >>&gt;&gt;
> >>&gt;Every
> >>&gt;
> >>&gt;
> >>&gt;&gt;&amp;gt;month there's always almost a thousand or 
> more minutes
> >>    
> >>
> >diiference.
> >  
> >
> >>&gt;&gt;&amp;gt;
> >>&gt;&gt;&amp;gt;For my billing system, i used the following 
> fields to 
> >>get
> >>    
> >>
> >the start of
> >  
> >
> >>&gt;&gt;
> >>&gt;&gt;
> >>&gt;call,
> >>&gt;
> >>&gt;
> >>&gt;&gt;&amp;gt;sip_method=INVITE sip_status=200 and 
> >>username='username of
> >>    
> >>
> >caller',
> >  
> >
> >>&gt;&gt;
> >>&gt;&gt;
> >>&gt;then to
> >>&gt;
> >>&gt;
> >>&gt;&gt;&amp;gt;get the end of call, sip_method sip_callid totag and
> >>    
> >>
> >fromtag. are
> >  
> >
> >>&gt;&gt;
> >>&gt;&gt;
> >>&gt;these
> >>&gt;
> >>&gt;
> >>&gt;&gt;&amp;gt;correct?
> >>&gt;&gt;&amp;gt;
> >>&gt;&gt;&amp;gt;Am I doing something wrong there? Also 
> someone told me 
> >>I
> >>    
> >>
> >need a B2BUA
> >  
> >
> >>&gt;&gt;
> >>&gt;&gt;
> >>&gt;for
> >>&gt;
> >>&gt;
> >>&gt;&gt;&amp;gt;the calls to be accurate, is this true?Hope 
> anyone can
> >>    
> >>
> >help me. TIA
> >  
> >
> >>&gt;&gt;&amp;gt;
> >>&gt;&gt;&amp;gt;Regards
> >>&gt;&gt;&amp;gt;Nhadie
> >>&gt;&gt;&amp;gt; 
> >>&gt;&gt;&amp;gt;_______________________________________________
> >>&gt;&gt;&amp;gt;Serusers mailing list 
> >>&gt;&gt;&amp;gt;serusers at lists.iptel.org
> >>&gt;&gt;&amp;gt;http://lists.iptel.org/mailman/listinfo/serusers
> >>&gt;&gt;&amp;gt;
> >>&gt;&gt;&amp;gt;.
> >>&gt;&gt;&amp;gt;
> >>&gt;&gt;&amp;gt;
> >>&gt;&gt;&amp;gt;
> >>&gt;&gt;
> >>&gt;&gt;
> >>&gt;&gt;
> >>&gt;&gt;
> >>&gt;&gt;
> >>&gt;&gt;
> >>&gt;&gt;
> >>&gt;
> >>&gt;
> >>&gt;.
> >>&gt;
> >>&gt;
> >>&gt;
> >>
> >>
> >>
> >>
> >>
> >>    
> >>
> >
> >
> >.
> >
> >  
> >
> 
> _______________________________________________
> Serusers mailing list
> serusers at lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
> 

_______________________________________________
Serusers mailing list
serusers at lists.iptel.org
http://lists.iptel.org/mailman/listinfo/serusers




More information about the sr-users mailing list