Category: Programming


Creating a Process Table hash in Perl

I came across a situation where I needed to access the process table in Perl. The problem that i found was that the best accessor Proc::ProcessTable only retrieved an array. Since it seems fairly senseless to keep looping over an array to find the exact process id that I want, you may want to turn …

By eric

Asterisk Caller ID Blocking Recipe

Here’s another quick little Asterisk recipe that I threw together. It’s a handy because it only takes about 10 minutes to setup and is infinitely useful to the sales types. Just a note, this was done with Asterisk 1.4.8. I wanted to do a little in AEL just to get a feel for it. It …

By eric

Asterisk *69 with 1.4.x

Many phone users just take for granted the service provided by the Telco called *69 (pronouced “Star six nine”). Since Asterisk is a telephony platform, it doesn’t just come with *69 built in. So if you want it, you have to implement it. To save you some time, I have implemented it with a few …

By eric

Configuring a Cisco 7961 for SIP and Asterisk

Just prior to writing this, I think I was about ready to kill someone. Setting up this phone was probably one of the most challenging things I have done in a long time. So this will be my attempt to explain to other’s what I did and I will hopefully save some people some time. …

By eric

Asterisk Echo Cancellation

I was lucky (or unlucky) enough to have to rebuild my company’s Asterisk server to prepare to have a backup. I took a slightly less powerful machine, installed Debian Etch on it and threw Asterisk 1.2.13 on it. The goal was to mimic the Asterisk configuration on its sister machine which was a Gentoo 1.2.10 …

By eric

File::ReadBackwards

Description: File::ReadBackwards works similar to the linux shell command tac. It reads the file line by line strarting from the end of the file. CPAN: File::ReadBackwards Example 1: Being a System’s Administrator, I am usually doing some analysis on a large logfile. Therefore, I may not need all the information contained in the log. This …

By eric

File::Bidirectional

Description: The author of this module notes that it is best used, especially by him, when reading or manipulating log files. I have a tendency to use it for the exact same thing, especially when looking for context around captured lines. CPAN: File::Bidirectional Note: Although I would like to note that using the tie’d interface …

By eric

Mail::IMAPClient

Description: Recently, I have had the pleasure of getting knee deep into various aspects of Email. One of the things that I consistantly found myself wanting to do was to parse through it. I know the best way to do this is to connect to the IMAP server and download the messages. The best way …

By eric

Sys::Hostname

Description: Sys::Hostname is a relatively small, but very useful module. Just as the module name describes, it gets your system’s hostname. To paraphrase the module’s POD documentation, it will try every conceivable way to get the hostname of the current machine. CPAN: Sys::Hostname Example: The one and only use for this module. # Always be …

By eric

HTML::Entities

Description: When taking user input through any number of forms, there could be characters that you aren’t expecting. This is exactly what HTML::Entities was designed to handle. When getting the user input, it converts it into a form that can help in mitigating certain types of web based scripting attacks. CPAN: HTML::Entities Example 1: The …

By eric

Follow My Travels

Buy My Book

Archives

  • 2020
  • 2019
  • 2017
  • 2014
  • 2013
  • 2012
  • 2011
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006

New Posts By Email

writing