pgets 0.1

Copyright 2004 Lennart Poettering <mzctrgf (at) 0pointer (dot) de>


This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.


Mon Mar 8 2004:

Version 0.1 released, initial release


pgets is a simple Linux tool for reading stored call accounting data from Auerswald ETS 4308i PBX over a serial line into PostgreSQL or SQLite databases. pgets should be called by in regular time intervals (e.g. by cron) to update the database with all new data from the PBX.

pgets comes with a simple PHP based web frontend for querying the accumulated data.


Version 0.1 works fine. While the C written transfer utility works with both SQLite and PostgreSQL databases, the PHP frontend is limited to PostgreSQL. This will probably change in future versions.


Mode of Operation

After installation you should create the database for pgets. For PostgreSQL this involves executing the SQL commands contained in the file sql/pgets-access.sql by piping them to psql:

psql template1 postgres < sql/pgets-access.sql

You probably want to edit pgets-access.sql before piping it to psql for using different passwords. For SQLite this is much simpler as it doesn't involve any access rights:

sqlite pgets.sqlite < sql/pgets.sql

After that you should create a cronjob for either pgets-postgres or pgets-sqlite:

@daily pgets-postgres -q -b "dbname=pgets user=foo password=bar"


@daily pgets-sqlite -q -b foo.sqlite

This makes sure that the pgets database is updated once a day with all new call accounting data stored in the PBX. (This cron syntax is for a user cronjob, not a system wide one) The option -q disables verbose printing of the current status of pgets. With -b you may pass the database access information to pgets, this is either a PostgreSQL compatible connection string or a SQLite file name. Use -d to use a different serial port than /dev/ttyS0.

To use the PHP frontend copy php/pgets.php, php/style.css and php/pgets-intro.html into your web tree and activate PHP for it. Don't forget to enable the PostgreSQL module in php.ini. You may need to edit the top of pgets.php for the correct database access credentials.


A current Linux distribution on a machine with a serial port connected to the PBX. The RS2 port of PBX has to be in "Gesprächsdatenerfassung" mode. You may enable this mode by calling 811118303.

pgets was developed and tested on Debian GNU/Linux "testing" from March 2004, it should work on most other Linux distributions since it uses GNU autoconf for source code configuration.

pgets requires the PostgreSQL and/or SQLite development library files for compilation.


As this package is made with the GNU autotools you should run ./configure inside the distribution directory for configuring the source tree. After that you should run make for compilation and make install (as root) for installation of pgets.

By default the build system creates two executables. pgets-postgres with support for PostgreSQL databases and pgets-sqlite with support for SQLite. You may disable building either one by passing --disable-postgres resp. --disable-sqlite to configure.


None so far


The newest release is always available from

The current release is 0.1

Get pgets's development sources from the Subversion repository.

If you want to be notified whenever I release a new version of this software use the subscription feature of Freshmeat.

Lennart Poettering <mzctrgf (at) 0pointer (dot) de>, March 2004
$Id: 7 2004-03-07 23:38:03Z lennart $