Greg MacLellan

January 17, 2007

PHP mail() logging

Filed under: Code,General,Technology — groogs @ 12:33 pm

I’ve posted my php sendmail wrapper before, but I just noticed that Ilia Alshanetsky has written a php mail logging patch that essentially does the same thing, but from within PHP itself. This is nice because it can log the full path of the file and line where mail() was called, whereas my script can only log as much info as PHP passes to sendmail (which isn’t very much) and what it can get from the environment. The downside is since it’s a patch, it requires recompiling – my script can be dropped into any installation (PHP4/5, and maybe even 3) and just requires a simple php.ini change.

I should also point out that if you’re using this, you should be sure that you don’t “whitelist” localhost in your mail server, or otherwise people can just connect to your SMTP server locally, and send mail without requiring a username or password. If they use SMTP you can’t see what script or virtual host sent the mail either way, but at least if you require authentication you can see what account is being used if it becomes an issue.

January 9, 2007

freePBX 2.2.0

Filed under: General,Technology,Telephony — groogs @ 2:21 am

I haven’t posted here in a while, so I just thought I’d mention something about freePBX 2.2.0, which was just released a couple days ago. For those that don’t know, freePBX is an open source configuration and web-based interface to Asterisk, which allows you to configure and run a PBX that has the equivalent functionality to commercial PBXs costing several thousands of dollars (or more). I’ve been involved with the freePBX project since December 2004 (when it was called AMPortal, or AMP for short), and minus a 6 month hiatus in early 2006, I have been contributing to the project ever since.

2.2.0 is a fairly signifigant release, adding a fair chunk of new functionality, fixing lots of bugs (over 200) including some long-standing bugs that have been around since the 1.x series. Among these are some bugs in the call handling that dealt with certain situations where you pass a call from a queue to a ring group, or going to a cell phone, and then forwarded back to another extension, etc, that were sometimes causing voicemail to never pick up, and some other strange behaviour. I was busy rewriting the modules API to make everything a bit more solid, and wrote a fancy new module administration interface. I also ported a nice new design done by Steven Fischer, which was a much needed upgrade from the basic look that the interface had from the start. I’ve also written some new modules (announcements, phonebook directory, misc applications, speeddial) and done some work on a half dozen others. Overall, we’re quite happy with this release and definately suggest that anyone using 2.x upgrades.

Going forward, there’s a few things I’d really like to do – write some hooks to use QuickForm, to make writing GUI code a lot simpler; finish my text-to-speech and manualconditions modules (which I’ve started on already); finish the daemon to write config files (instead of having the web server invoke a script); write the framework for a user portal; and add a menu before going to voicemail to allow callers to do various things besides leave voicemail.

Now, if I just had a clone or two that could my other day-to-day tasks like go to work, I would be set.