pgets 0.1 review

Download
by rbytes.net on

pgets is a simple Linux tool for reading stored call accounting data from Auerswald ETS 4308i PBX over a serial line into SQLite or P

License: GPL (GNU General Public License)
File size: 89K
Developer: Lennart Poettering
0 stars award from rbytes.net

pgets is a simple Linux tool for reading stored call accounting data from Auerswald ETS 4308i PBX over a serial line into SQLite or PostgreSQL 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.

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"

or:

@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.

Requirements:
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.

Installation:

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.

pgets 0.1 search tags