2007 May 09 - Wed
Installing Asterisk
It has been a year or two since I last worked with the Opensource PBX solution
called Asterisk. Instead, I've been doing
stuff with
Cisco Callmanger and Voice Gateways for the last while. My support pages are still
receiving regular hits with regards to Asterisk Support, so I think I should do more with
it. I've got a bunch of scripts laying about that I'd like to resurrect.
So, to start off, I have a new Debian server, I need to install the latest and greatest
from version control. Here is what I did.
These get me up to current for latest kernel. Compiling Asterisk requires the kernel
headers, so they are included here. I want the call detail records to go to a PostgreSQL
database, so I include the libraries as well. As the latest source is in Subversion, I need
that package to obtain the installation files.
apt-get install linux-image-2.6.18-4-686
apt-get install linux-headers-2.6.18-4-686
apt-get install libncurses5-dev
apt-get install postgresql-dev
apt-get install subversion
Now I can obtain the source files:
cd /usr/src
mkdir digium
cd digium
svn checkout http://svn.digium.com/svn/asterisk/trunk asterisk
svn checkout http://svn.digium.com/svn/zaptel/trunk zaptel
svn checkout http://svn.digium.com/svn/libpri/trunk libpri
Compile the driver files. A double make install will be required. If you are not using
Digium
hardware, use the ztdummy module, otherwise use the zaptel module. Once compiled and
installed, the zaptel configuration file is found in /etc/zaptel.conf and will need to be
updated before using the zaptel module.
cd zaptel
make clean
make install
make install
mddprobe ztdummy
modprobe zaptel
For running with PRI digitial telephone circuits, another library needs to be built:
cd ../libpri
make clean
make install
This last one holds the bulk of the Asterisk build.
cd ../asterisk
./configure \
--sysconfdir=/etc \
--localstatedir=/var
make samples
That gets us to a basic installation. My next write up will show some of the
configuration file stuff I do.
[/OpenSource/Debian/Asterisk]
permanent link
Various Perl Based Proxy Tools
In perusing Debian's Package List,
I came across a number of Perl based Proxy tools.
The first one, an item that sounds interesting, but havn't thought of a way to put it into
action yet, is an HTTP Recorder. HTTP::Recorder
is a browser-independent recorder that
records interactions with web sites and produces scripts for
automated playback. Recorder produces WWW::Mechanize
scripts by default (see WWW::Mechanize
by Andy Lester),
The next item is an HTTP Tunnel. httptunnel creates a bidirectional virtual data connection
tunnelled in HTTP requests. The HTTP requests can be sent via an HTTP proxy if so desired.
This can be useful for users behind restrictive firewalls. If WWW access is allowed through a
HTTP proxy, it's possible to use httptunnel and, say, telnet or PPP to connect to a computer
outside the firewall.
The third item is HTTP::Proxy. It is a Perl based HTTP Proxy. It sounds like it can do some
SSL type interception as well. It has an ability for add-on modules allowing various parts
of a page to be re-processed prior to delivery back to a user.
[/OpenSource/Debian]
permanent link
Redirecting a Web Page
I've encountered a number of ways to redirect a web page. If all you have access to is a web page, then
a meta tag is the way to go:
<html>
<head>
<meta http-equiv="refresh" content="3;url=/liveprobe/index.html">
</head>
<body>
You will be redirected to <a href=/liveprobe/index.html>/liveprobe/index.html</a> in 3 seconds.
</body>
</html>
More meta-tags can be found at http://vancouver-webpages.com/META/.
If pages are being dynamically created, then executing the following code before anything else on the page is generated should do the trick (I haven't
tried it out myself yet):
print "Status: 302 Moved Temporarily\r\n",
"Location: $url\r\n",
"Content-Type: text/html\r\n\r\n",
"$url\r\n";
[/Personal/SoftwareDevelopment/HTML]
permanent link
Upgrading Nfsen and Nfdump
As an update to my two articles for installing nfdump and installing nfsen, here are a few corrections and a process for upgrading.
As of this writing, the latest snapshots are for March 12. Here is the upgrade process:
cd /usr/src
wget http://superb-east.dl.sourceforge.net/sourceforge/nfsen/nfsen-snapshot-20070312.tar.gz
wget http://superb-west.dl.sourceforge.net/sourceforge/nfdump/nfdump-snapshot-20070312.tar.gz
/usr/local/nfsen/bin/nfsen.rc stop
tar -zxvf nfdump-snapshot-20070312.tar.gz
tar -zxvf nfsen-snapshot-20070312.tar.gz
cd nfdump-snapshot-20070312
./configure
make
make install
cd ../nfsen-snapshot-20070312
./install.pl /etc/nfsen/nfsen.conf
/usr/local/nfsen/bin/nfsen.rc start
The 'start' command could be placed in /etc/rc.local so it starts upon boot. The start command
also starts the flow collectors (nfdump), so there is no need to start them; the nfsen.rc command takes care
of everything.
[/OpenSource/Debian/Monitoring]
permanent link
|