Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Jul 1998 10:27:24 +0200 (METDST)
From:      hm@hcs.de (Hellmuth Michaelis)
To:        andreas@klemm.gtn.com (Andreas Klemm)
Cc:        freebsd-isdn@FreeBSD.ORG
Subject:   Re: aocd seems to work pretty well ...
Message-ID:  <m0yvHTg-0000dRC@hcswork.hcs.de>
In-Reply-To: <19980711182725.A4601@klemm.gtn.com> from Andreas Klemm at "Jul 11, 98 06:27:25 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
>From the keyboard of Andreas Klemm:

> > Without rates file and this configuration in isdnd.rc:
> > # ratesfile	= /etc/isdn/isdnd.rates	# name & location of rates file
> > unitlength		= 90
> > unitlengthsrc		= aocd
> > 
> > I get this result:
> > 
> > Jul 11 16:06:35 titan /kernel: isppp0: phase establish
> > Jul 11 16:06:35 titan isdnd[17141]: CHD 00015 GTN rate 60 sec/unit (aocd, default)
> > 						       ^^^^^^^^^^^^^^^^^^^^^^^^^
[...]
> > Jul 11 16:08:32 titan isdnd[17141]: CHD 00015 GTN charging: 1 units, 115 seconds
> > 							    ^^^^^^^^^^^^^^^^^^^^

> Hmm, or not ???
> 
> Jul 11 18:24:53 titan isdnd[17141]: CHD 00023 GTN rate 60 sec/unit (aocd,
> default)
[...]
> Jul 11 18:25:49 titan isdnd[17141]: CHD 00023 GTN charging: 1 units, 55 seconds
> 								     ^^^^^^^^^
> Jul 11 18:25:49 titan isdnd[17141]: CHD 00023 GTN accounting: in 30488, out 6034
> 
> disconnected too early ...

No, not quite.

For the shorthold mode to work correctly, one needs to measure the time 
between 2 charging units. After this time is known, a hangup is done 
dependent on the idle timeout earlyhangup-seconds before the next charging 
unit occurs.

As soon as a call to a remote site succeeds, you get the first charging unit,
but you don't know the length between two units yet.

In this situation a guess is made. In case you configured "aocd", the rates
file is queried and the length of the first unit is got from the rates data-
base, if one is accesible. In your case, no rate database is available so
this time is fetched from a compiled in default (= 60 secs).

So there are several things to notice here:

- in case you configure "unitlengthsrc = aocd" its recommended to have a 
  valid rates database installed to get the length of the first unit.

- i don't know why your call lasts 115 secs and then 55 secs for the
  second case (the second is correct, the unitlength is 60 secs and
  i think your earlyhangup time is 5 secs, so if the idletimeout
  is within your configured limit, the call lasts 55 secs.) The 115
  secs seems to be a bug (diffs are as usual welcome :-) although it
  is within the limit of the _real_ unit time length because otherwise
  you were more than one unit charged at the end of the call.

- there should be another config value introduced which specifies from
  which source to get the time of the first unit in case of aocd.

hellmuth
-- 
Hellmuth Michaelis                                    Tel   +49 40 559747-70
HCS Hanseatischer Computerservice GmbH                Fax   +49 40 559747-77
Oldesloer Strasse 97-99                               Mail  hm@hcs.de
22457 Hamburg                                         WWW   http://www.hcs.de

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-isdn" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?m0yvHTg-0000dRC>