Skip to main content


Showing posts from March, 2012

CallerID AGI for Asterisk: trifecta 2012.0 includes opencnam, anywho and fonefinder

I have taken the Nerd Vittles calleridname.agi script and updated it to work with currently available free online caller ID services. My changes are in public domain, what's left of original code obviously retains original copyright and whatever license terms went with it.

I have never checked if the asteridex/npanxx part of the code has any chance of working, so tread carefully.

I have implemented lookups for OpenCnam, AnyWho (YellowPages took over them) and FoneFinder. The original code was useless for the latter two, as the pages got redesigned.

This was a quick hack, I need to redo it in Python -- properly this time. I obviously have no clue about Perl and don't care enough about this code to make it any prettier, sorry.

#!/usr/bin/perl -w 

use Asterisk::AGI;
use LWP::UserAgent;
use DBI;

$AGI=new Asterisk::AGI;




Asterisk 1.8 with SELinux on RHEL 6 / CentOS 6

Asterisk 1.8 is the current long term support (LTS) version of Asterisk. You can find it in the atrpms repository. Using atrpms requires a bit of ingenuity, since you must enable yum priorities. Here's how I've set up my yum priorities and excludes to play well with RHEL (lower priority is higher):

# /etc/yum/pluginconf.d/rhnplugin.conf
priority = 9

# files in /etc/yum/repos.d - current samba and subversion override those of RHEL
sernet-samba - 5
wandisco - 6
rhnplugin - 9
centos-base - 20, includepkgs=xfs* fftw-* glpk-* dell-firmware-repository - 30 dell-omsa-repository - 30 rpmforge-repo - 50, exclude=hdf5*
epel - 60, exclude=dahdi* atrpms - 70
I'm using a bunch of non-redhat packages, including Asterisk, recent subversion, octave, xfs tools, and Dell server management tools.

For Asterisk proper, I'm running an AGI caller id script, and a fax receiving script. The fax script uses cups to print. Those scripts require exceptions to the targeted SELinux policy. Note that the polic…

RedHat Network rhnplugin Yum Priority Support Patch

Below is the patch one had to apply to /usr/share/yum-plugins/ to support yum priorities. The most recent yum-rhn-plugin-0.9.1-36.el6.noarch doesn't need this patch anymore, thus it's of historical interest only. I didn't bother checking exactly at what plugin version did the patch become obsolete.

---    2011-10-03 16:30:04.722883767 -0400
+++        2011-10-03 16:34:28.712885617 -0400
@@ -149,6 +149,7 @@
     cachedir = conduit.getConf().cachedir
     default_gpgcheck = conduit.getConf().gpgcheck
     gpgcheck = conduit.confBool('main', 'gpgcheck', default_gpgcheck)
+    priority = conduit.confInt('main', 'priority', 1)
     sslcacert = get_ssl_ca_cert(up2date_cfg)
     enablegroups = conduit.getConf().enablegroups
     metadata_expire = conduit.getConf().metadata_expire
@@ -173,6 +174,7 @@
             repo.basecachedir = cachedir
             repo.gpgcheck = gpgcheck