Welcome to the PhoneBill project home page.

Visit the project development page at SourceForge

What's all this then?

It all started back in 1998. I was living in a sort of a student house along with 10 other people. Most of us had computers, and during the first half of '98 I connected most of them to form a kind og LAN. After that I started looking into connecting the LAN to the Net. I pulled an old 486 from the attic and installed my first Linux box using the Debian distribution. The Debian box had a 56K modem connection to a local ISP and acted as a on-demand gateway for the LAN. I then found Connect, which later forked into Alt+Connect and it became very sweet (except for the speed, shared 56K sucks).

The only problem was that we needed some way to split the phone bill in a fair way. So, PhoneBill was born.

What does it do?

In short: PhoneBill analyzes the log files generated by [Alt+]Connect and the PPP daemons and generates a detailed/summarized phone bill.
This is actually a bit tricky since the first versions of the Connect daemon were a bit flaky and would sometimes crash, leaving the log file "protocol" in an inconsistent state. Then when Alt+Connect came along, the daemon was far more stable, but added complexity to the "protocol".

How does it do it?

I realize that this job is perfect for PERL, but at the time I rather needed to learn Java, so I chose to go that way instead. The current version (0.5) is a bit rough, since I needed to finish in a hurry and hardcoded some values specific for my needs. That should still be rather easy to change. You could start by browsing the API. The main executable is phonebill.phonelog.PhoneBill.

The program is single threaded and runs (roughly) in the following phases:

  1. Log files are opened as InputStream instances and joined together in one SequenceInputStream to form a single Reader instance.
  2. The log lines are iterated through and the interesting ones (matching a number of predefined patterns) form a SortedSet of LogLine instances. These have a ID to be used later.
  3. The LogLines are iterated through and a list of PhoneCall instances is generated.
  4. The PhoneCalls are iterated through and a report is written based on ISP PhonePrice.
The goal was to make a Swing application to allow the user to modify some values, but that is probably not going to happen unless someone else implements it. That explains why I generate the PhoneCall list in phase 3 instead of merging phases 3 and 4.

How can it be improved

There are a number of ways, and just a few of them are:

Finally, I hope you find this program useful. - Ólafur Freyr Hjálmsson

Join the phonebill-info mailing list, or post a comment in the forums.

$Id: index.html,v 1.2 2001/03/21 18:19:29 oli_freyr Exp $