Menu

README

Sergio Cotelo

WATCH3R: Asterisk sip peers monitor.

Daemon that monitors status of "sip peers" through AMI and adds their status to a database.
On monitor directory is an example of a quick and dirty php web pannel.

INSTALL:
-Dependencies:
i.- CPAN Modules: Asterisk::Manager & DBI.
ii.- Apache
iii.- PHP5
iv.- MySQL

Apache and PHP are only necessary to run web pannel.

-Database:
CREATE TABLE IF NOT EXISTS extensiones (
id int(10) NOT NULL auto_increment,
exten varchar(75) NOT NULL,
registrado int(2) NOT NULL,
PRIMARY KEY (id),
KEY exten (exten)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=51 ;

-Put script where you want, sample:
mkdir /opt/monitorizacion/
cp watch3r /opt/monitorizacion/

-In order to run script at boot time, add this line to /etc/rc.local:
/opt/monitorizacion/watch3r -d

-Copy web pannel to Apache publishing directory:
cp -R monitor /var/www

This way you can view panel on http://localhost/monitor/

USE:
watch3r [-h] [-d] [-v]
-h Print this help.
-d Run as daemon.
-v Print version.

Running it without switches makes it run in debug mode, showing output by standard output.