DispatchBuddyversion 0.85 - May 8th, 2010

Google Groups Subscribe to Blue Labs Software
Browse Archives at groups.google.com

What is DispatchBuddy?

DispatchBuddy captures LPR and AppSocket printer data from a sniffed or spanned ethernet, groks the embedded message, reformats it, fills in the applicable template file(s) then sends it out by various means such as emails and SQL storage.

DispatchBuddy was written for the South Meriden VFD to increase the reliability of receiving emergency dispatches. I started it in 2003 due to our frustration at the very unreliable Minitor II pagers we have. We currently use three forms of notification; the siren which is located on the firehouse, our portable pagers - which use 46Mhz and are very susceptible to location blackouts, and now our cellphones.

DispatchBuddy is free software, as in Open Source. It is released under the GNU GPL v3 license. In a nutshell that means you can have it for free, free as in speech and free as in beer. If you redistibute it with or without changes, you must freely provide the source. No warranty is offered or implied. Naturally I'd love to hear if you use it and I would enjoy reading over any patches sent to me.


What do I need to run DispatchBuddy?

What libraries and external tools do I need?

Recent News

Current Version

0.85 - May 8th, 2010 (check out via svn only)
browse the SVN repository

Where can I get it?

Please use SVN, it's more up to date, featureful, and of course has newer bugs to replace older bugs. If you want a tarball, generate one via the websvn repository browser. The last packaged source is for 0.61 at DispatchBuddy-0.61.src.tbz2 and the ascii signature. If you use Gentoo Linux, there is an ebuild for DispatchBuddy. The SVN commit messages are announced via my Blue Labs Google Group.

SVN checkout instructions:

  1. cd /parent/directory/of/your/choice/ i.e. /home/david/svn
  2. svn co https://blue-labs.org/svn/BlueLabs/DispatchBuddy

This will add the subdirectory /home/david/svn/BlueLabs/DispatchBuddy and check out all the files into it.

Frequently Asked Questions

Q. What License is DispatchBuddy released as?
A. GPLv3
Q. How does it work?
A. DispatchBuddy does the following:
  1. Starts up, reads the /etc/dispatchbuddy/dispatchbuddy.conf file
  2. Listens to ethernet interface in promiscuous mode
  3. Captures all packets on LPR or AppSocket port (default is 9100 and it's configurable)
  4. Uses a simple match to find the start of a specific pattern for a dispatch message Now decodes the full LPR conversation and correctly grabs the files sent to the printer's LPD server. It then searches the dispatch message for specific patterns. If the inbound message is in a bitmap format (currently only ESCP2 supported), OCR is run against the image to extract the text.
  5. Upon match of those patterns, uses regexes to further match on the lines of text in the message
  6. Arranges all the matched data into a structure and does sanitiing on the text (cleans it up)
  7. Runs several SQL queries to build lists of recipients based on the type of message, time of day/week for recipient preferences.
  8. Creates N types of emails, i.e a rich message and a plain text message, for delivery to the appropriate recipients
  9. Sends the emails to respective destinations, i.e. plain text to cell phones, rich messages to regular mailboxes, but the destination and type is a preference set entirely by the recipient
  10. Stores the data in an SQL table
  11. Idles waiting for another packet
Q. What future plans are there for DispatchBuddy?
A. Adding the completed ability to send instant messages to clients on AIM, Yahoo, ICQ, MSN, and IRC (more possibly if there is an interest). I also plan to eventually add a direct SMS server like Kannel using an SMSC. This will allow for immediate delivery to all cellphones within seconds instead of a couple minutes total due to sequential delivery.
Q. How do I configure it?
A. Copy the example /etc/dispatchbuddy/dispatchbuddy.conf.example file and make your appropriate changes. Options are easily discovered by running dispatchbuddy -h
Q. Are the regexes configurable?
A. No, at present they are hard coded for the particular message body that SMVFD receives. You can see the POSIX regexes in the source code. They are easily adapted to your particular needs. In the future they will definitely be configurable. Each data item will have it's own regex specified in the /etc/dispatchbuddy/dispatchbuddy.conf file.
Q. How is the server at SMVFD set up?
A. The server has a primary ethernet interface connected to a cable modem. Another ethernet interface is plugged into a Foundry switch with VLAN tags for different networks. The printer port is mirrored into the server port. DispatchBuddy now interprets VLANs too.
Q. Who writes this software?
A. David Ford, of South Meriden VFD, is the author of this software. Development, site hosting, and server management, are done under the name of Blue Labs Software (website).