Now Where Was I? (GPS + Asterisk + Microblogging)

(Watch this page for updates…The version you see now is the first time I’ve tried to organize my idea in print.)

Notes on the development of a geomicroblogging system, written in PHP and intended to interface with Asterisk and Laconica (at the very least) in addition to having its own web-based interface.

In summary: the core idea is to allow “geomicroblogging” participants to post location-based updates in real-time in a standard and reasonably precise manner. In addition to the latitude, longitude, and timestamp, other forms of information may also be associated, such as audio recorded live on site. In the original proof-of-concept test, the updates where done through Asterisk over an ordinary cellphone call, and consisted of keying in latitude and longitude from the keypad, plus an optional voice recording which was automatically converted to a geotagged mp3 made available for download.

Current Status: Planning stages

Components:

  • “Update Agents” – different methods for sending geomicroblogging posts to the system. This could include (but is not limited to) some or all of:
    • An Asterisk application that allows for keying in latitude and longitude and recording a voice message
    • An Asterisk application that accepts an overpriced SMS “text” containing location and a short text update
    • A simple web form where latitude, longitude, and a short text update can be typed in
    • An extension for Mozilla Firefox 3.1 and later, making use of the new geolocation feature
    • A process that watches a GPSDrive “Friends” server
    • An Asterisk script that automatically dials a Telephone “Psychic Hotline” and asks where someone is…okay, maybe not.
  • “Importers” – for accepting, parsing, and converting input from “Update Agents”. Each importer script should handle a latitude/longitude (and optional elevation) or a “location ID” (for adding to an already existing location update – i.e. for uploading pictures later to go with a voice update that was already done) and one type of media (text, audio, images, video). Importers will also be responsible for directly geotagging media files as appropriate, so that they’ll retain their location information even if they’re downloaded from the site and redistributed.
  • Storage – the core system that stores and tracks of the location updates from each participant and the media associated with each one (a webserver, a database, and the associated directory layout and database schema). This may also include map images downloaded on the fly from WMS servers.
  • “Exporters” – for finding and sending out updates. This could include (but is not limited to) some or all of:
    • A web page, displaying the location and any associated media for each update (or links to it). This might include embedded audio players, flash-based video, or some type of image slideshow as appropriate
    • An RSS/Atom feed
    • A script that packages the information in one or more updates into a KML file for viewing in applications like Google Maps, Google Earth, or Marble
    • A script that pushes updates to a Laconica server (or, I suppose, Twitter.)
    • An Asterisk application that sends out overpriced SMS messages for updates
    • An XMPP agent that watches for updates and sends them via IM to subscribers
    • An Asterisk application that fetches updates, reads out the location and possibly plays an associated audio file to a caller.
    • A daemon that monitors the USGS Seismic Network for earthquakes, and when any of note occur, checks the system for anyone who updated from that area recently and sends them SMS messages saying “Whoa…did you feel that?”
    • A script that automatically takes location updates and uses them to program an ICBM or fleet of killer robots…

My goals for the initial version 0.1 “Point and Laugh” release are:

  • Two import agents
  • (A cleaned up version of the Asterisk application I developed for my proof-of-concept test, and a simple web form for input) [20090615: fixed the link…]

  • Two importers
  • (A “default” importer for location-only or location+plain text, and an importer for at least .wav audio to go with the Asterisk application. Ideally, the latter will at least be able to generate mp3 and possibly Ogg Vorbis audio from the submitted audio, for use with either an embedded flash-based mp3 player or the shiny new <audio> tag in Opera, Firefox 3.1, and probably Safari if you have XiphQT installed…)

  • Storage which handles tracking unique date, time, and location updates, providing each update with an ID# which can be used to fetch specific updates later. It should also handle saving audio files to disk and tracking which files are associated with which updates.
  • One exporter
  • (A web page on the server which displays information for an update, or an index of updates if no update ID# is passed to it. Update information displayed will include, at a minimum, the location linked to Google Maps or similar service and a download link and either a block of text or a download link for audio as appropriate. Ideally, an embedded open-source flash-based player will be included for audio.)

I think I can finish that much in a few leisurely weeks, unless I’m not the only one who thinks this is a neat idea and I end up being bombarded with requests for it. Then I could probably crank it out in a few days…

Comments regarding what a brilliant/idiotic idea this is may be left below…

7 thoughts on “Now Where Was I? (GPS + Asterisk + Microblogging)”

  1. Oops, sorry about the delay approving your comment/question…

    Life went moderately nuts shortly after this original post, so no “leisurely” weeks for me. I haven’t abandoned or forgotten it, but I haven’t been getting much done on it recently. That’s partly because I wasn’t sure anyone besides me was interested in the idea, though – if anyone else is interested, it’s no longer just me puttering around by myself for my own gratification and I lose my excuse for procrastinating…

    As this page suggests, I did get a crude proof-of-concept thing working several months back (which I see I have had a broken, mis-spelled link to this whole time…dagnabbit…Should be fixed now). I also played a little since then with chan_mobile for Asterisk in hopes of enabling SMS updates, but I set that aside for the moment due to difficulties with getting the bluetooth audio to work.

    Of the initial goals I mention up there, the only one that should require more than some basic time and labor is the storage system, and that mainly just because a bit of consideration of its design is needed before I try to make it do anything useful.

    Since you bothered to ask about it, can I assume it’s not just me who likes the idea, then (and I need to quit screwing around and get back to work on it)?

  2. Hey there, I don’t know if you remember, but awhile ago we had a chat about asterisk and also about netbooks in your comments sections. I was using Debian a lot at the time, but have since moved to Gentoo for most purposes. I came back awhile later and saw that you were considering trying out Arch Linux. Well I was just wondering if you ever did try it, and if so, what are your thoughts on the subject of Gentoo vs. Arch?

    I really like Gentoo a lot more than Debian for 99.99% of situations, now that I’m more adept at Linux, but I just ran an update on two boxes and now their keyboard and mouse don’t work while in X. I think it has something to do with the fact that they were originally installed using hal for everything, and hal has since been ditched in favour of udev.

    Anyway, this degree of breakage is really irritating and I’m starting to think Gentoo developers aren’t as dedicated to maintaining their distro as I wish they were. I really like the source-based ideology, but don’t like the potential for massive breakage.

    So I was just wondering if you ever tried Arch, and if you like it or would recommend it…

    Sorry my comment is off-topic, but I don’t know very many people who use Linux other than myself.

    If you ever have some spare minutes I would urge you to check out my website, as I have added some new useful tutorials geared towards Linux users. I still check your blog from time-to-time, but sometimes I forget it exists for many months.

  3. Oh, hey, welcome back!

    My experience with Arch Linux on my little netbook was good enough that I’ve been switching all of my own machines to it.

    I still have the one experimental Gentoo machine at work which I’m using for network monitoring (using Zabbix) along with various testing (btrfs, etc.). Lately it’s been lagging a bit, and the problem seems to be that the monitoring system is constantly causing mysql to write to the disk (literally nonstop). I mention this because it reminded me to two problems Gentoo seems to have lately.

    For one thing, even the “unstable” versions in the distribution have fallen behind – only Mysql 5.1 is available outside of the special “mysql” overlay (and post-5.1 supposedly has some performance improvements).

    The other thing is that making what ought to be trivial changes can be nightmarish lately. I decided to try switching to mariadb (“drop-in replacement” for mysql, supposedly), and ended up having to go through a mess of masking, unmasking, unmerging, remerging…I did finally get it to install, but for a “drop-in replacement” Gentoo certainly didn’t make it easy.

    I don’t remember things being this difficult until a year or two ago. Up until recently, so long as you kept your system updated fairly frequently the problems were minimal, but lately this just hasn’t been the case. I could possibly still forgive this if it was because the system included less-tested, brand-new versions, but it doesn’t any more.

    Arch is “binary” packages by default, but it’s actually pretty easy to build optimized and/or customized versions of packages that I want using the Arch Build System (“abs”) or unofficial packages on the Arch User Repository (AUR), so I get much of the flexibility and optimization of Gentoo, plus up to date packages (GCC 4.6.x, MySQL 5.5, etc.). The ability to just install the prebuilt packages when I’m in a hurry to update and then later rebuild with optimizations/customizations is a nice bonus.

    So to answer your question: yes, I like and and would definitely recommend it to anyone who can handle it (and if you can handle Gentoo, you should have little trouble with Arch…)

    I recently finally got a new laptop from Ohava Computers to replace the limited (but still pretty good) netbook, which I’ll probably end up turning into a server eventually. I put Arch on the new machine, too. (I did a review of the laptop for Hacker Public Radio a few weeks back, if you’re interested.)

  4. Hi there, i read your blog occasionally and i own a similar one and
    i was just curious if you get a lot of spam
    remarks? If so how do you reduce it, any plugin or anything
    you can advise? I get so much lately it’s driving me mad so any help is very much appreciated.

Leave a Reply