More fun with Asterisk (video)

November 9th, 2010

So tonight I added some more database directories to my Asterisk server. For example, it now knows the numbers of most of my colleagues and will give them a special message (including internal contact information, etc.), has several databases for unwanted callers, specific greetings for others, and additional logic to handle various other fun. Here’s a video:

Jon.

Some more fun with Asterisk

November 8th, 2010

So I moved to the US a while back. When I did that, I retained a mobile number in the UK that many people already had in their address books, and for those occasions when I might visit. For the longest time, I had it setup on permanent divert to a SIP trunk in the UK, that connected to an Asterisk server in Texas and then a SIP trunk in the US, out to my US cellphone. Callers never even realized that they were actually speaking to me on my US cellphone when calling my “UK” one. A nice hack for cheap roaming (I wrote an article on this some years ago now), and a great way to say “screw you” (but slightly more strongly) to the phone carriers who still overcharge for roaming. But we can do better.

Recently, I learned that A&A have started a UK mobile service that uses SIP extensions exclusively, basically giving you a SIP trunk into a cellphone handset. No more call forwarding. The phone is the SIP extension and can be configured just like any other (when will US carriers wake up? ever?). I’m hoping to get one the moment they can port my existing number (they’re still working on number porting), so that I can just have a UK SIP extension for when I am in the country. In the interim, I got another SIP trunk for playing around and forwarded my old mobile number to that one, with a customized message that will still forward to me after a delay. The message informs the caller that I am in a different timezone and since it now knows that calls to that number can only have come from the mobile, it can do some other nice things too. Ultimately, the call still winds up hitting my US cellphone, unless it’s from sales or marketing folks.

Anyway. While I was at it, I used what is commonly known as “ex-girlfriend logic” (someone once had to solve the “problem” of handling calls from their ex, so it became known as this, but it’s used for many different purposes!) to add special rules for all kinds of numbers. For example, I recorded special messages for organizations that routinely call to harass me and added rules to catch their calls through their caller ID (fakeable, but most organizations don’t do this today). These messages say things such as: “Organization A, your number has been recognized as belonging to Organization A. I have previously requested that you stop calling me with sales or marketing calls. If your call is not for sales or marketing reasons, please leave a message. If you are calling to sell me something, please also leave a message, explaining that you have heard this, have added me to a do not call list, and won’t be calling me again”. The messages vary, but the gist is clear. Then the call goes to voicemail and my phone never even rings.

A similar process happens when callers to my UK trunk need to be informed that I am not “Iceland Express”, the airline which has a number very similar to my own. Calls still reach me, but after a message explaining that I am not the airline they might be trying to reach. In due course, I would like to have the system record numbers that have already heard this message and don’t need to hear it again (if they aren’t exchange numbers – need a way to detect that also, maybe in the signalling data somewhere?). Conversely, the phone system recognizes my family and girlfriend and saves them from listening to my greeting every time, making their calls reach me a few seconds faster than some others, though with a funny message for fun.

At this point, I have a growing number of Cisco 7940 series IP phones around my apartment, as well as soft phones, and a number of trunks and mobiles that are all hooked together. When you call me, your call has all of the rich features of Asterisk. For example, you will (and have for years now) hear music on hold while the system rings all of my phones in unison, have a menu with various options, etc. I can easily record calls, transfer them between phones or countries, and I have speed dials configured for popular numbers that I need to reach (some of which will also setup pre-agreed recording, if it’s a conference). Oh, and I’ve been hooked into Fedora VoIP for a while now too, so that just gets handled like any other incoming call. My phone has a special dialplan prefix for Fedora, the same as how it also recognizes UK numbers and automatically dials the international bit and routes cheaply through the UK trunk without any need to do anything special.

What I would like to do next is to have a DNS service (perhaps RFC2916 compliant) that I could use my Asterisk server against in order to do anti-spam filtering of the form that I do already with spam-assassin. I would love to know if such a service exists, and if not, why not? I would love to be able to add wildcard rules to my Asterisk server to match on specific names of organizations, whose exact number might vary (but can be looked up in the database to find their name), in order that they will always get the special handling that I have deemed appropriate for them. With such a service, you could also easily and automatically exclude all known telemarketing numbers with a single command. Anyone point me to such a setup?

Jon.

Playing with EDID and rawhide

November 8th, 2010

Photo: Modesetting problems with 2.6.37-rc1 and the i915 driver.

So there was an innocuous patch to i915 EDID code (in the intel_lvds setup code) that introduced cacheing of the EDID data, but in the process stopped reading panel data correctly on boot, which would result in all kinds of weird modesetting problems on these Intel parts. Like my ASUS Eee PC 1015PEM, where the screen was moved down an inch or so such that there was blank space at the top and the bottom inch of the screen was “missing”. You can see a photo above (and my upstream posting had a video). A lot of bisecting over the weekend tracked this down, and I very much enjoyed working briefly with the excellent Chris Wilson to test fixes. It should be that 2.6.37-rc1+the posted fix on LKML works well on various random panels again, such as this netbook.

Meanwhile, I’ve been actually using rawhide on the netbook, in the spirit of dogfooding (which is why I bought that netbook – to have a controlled and safe environment for playing with unstable software). It’s been tough though. A small list of the many issues currently includes: Lots of the conversion from GNOME2 to GNOME3 is hitting me. I’m unable to run rhythmbox (hasn’t worked in ages), the volume control applet won’t start, and ABRT frequently generates traces that are unusable (so I removed ABRT). Also, the screensaver won’t ever exit (without killing gnome-screensaver on the command line), and recently my sound stopped working completely. I fixed the latter by completely removing pulseaudio from the system (and filing several bugs – including one to have gnome-bluetooth not depend on PA). But it’s not all bad. The desktop mostly works, the browser has been fine, and evolution is able to send email now that the annoying “crash on sending mail” bug has gone away for me.

Nonetheless, at this point, my “exclude” yum configuration grows larger daily. The system is, at this point, usable for poking and playing around with experimental kernels, but I simply could not use rawhide on a daily basis as my main desktop environment, without a lot of deep meditative breathing. In my own personal opinion (of which all of this is personal opinion), the lack of any stability in rawhide is counter-productive. Sure, yea, it means you can shove anything you like in the distribution. But it also means you can shove anything you like into the distribution. I know there is a updates testing staging area, but part of me pines for the old days of Debian testing, where you knew you’d get cutting edge stuff, but you’d also know it had baked for a week or two first. I personally would like a direct equivalent in the rawhide space, which isn’t the same as the branching we have now. I like the branching, and I think it’s a far better system, but I’d also like a two-stage rawhide. And a pony, let’s not forget about the pony before people think I don’t realize how not trivial this stuff can be to implement.

UPDATE: I tried a combination of pulseaudio and gnome-shell. This results in sound, but the mixer in gnome-shell doesn’t control the PA output (just slides up and down with no effect), sound settings crashes, contol center won’t start, etc. I suspect I will go back to GNOME2 again tomorrow with PA removed again.

UPDATE2: Yup. Removed PA again and went back to GNOME2.

Jon.

On Launchpad and Mission Control

October 20th, 2010

So for all my joking about Steve Jobs, a guilty pleasure of mine is watching those slick and over-produced presentations he does from time to time (“one more thing…”). Today, I saw the latest “Back to the Mac”, which shows some pretty cool stuff. Amongst the talk though, came a sneak peak at Mac OS X Lion, which features two things called “Launchpad” (yeah…) and “Mission Control”.

These new “innovations” are obvious extensions of current trends in UI design, and as Steve says are inspired by mobile computing. More importantly, they show where I would have liked GNOME 3’s Shell to go – complimenting the panel without killing it off. Users who want to use the panels, desktop, and existing capabilities can do so, while those who want to see top level Applications launchers and clustered window management capabilities get those, too. I don’t want GNOME to do things exactly Mac-like, but I would hope there is still time to see how OSX was able to combine changing UI trends and find a way to preserve the existing panels in the mix. That would allow users like myself to keep things old school, and give newcomers and netbook users the glitzy gloss treatment.

Jon.

On GNOME Shell

October 13th, 2010

So I started using the GNOME Desktop last millennium, and over the last more than a decade have overall been quite impressed with the level of polish. It made a nice change in some ways from Enlightenment, and CDE, which were my previous desktop environments, and I coul live with the RAM footprint (after all, enlightenment is using 1.3GB of RAM now).

The last few years in particular have seen a growing trend to be more (but not quite) Mac-like, with lots of advanced features being buried over time, and over-simplification (for example, with sound controls). These are minor frustrations, but they can typically be worked around without much hassle and the experience remains overall quite good on GNOME 2.0. Things that used to be a hassle – like notifications, events, etc. and lot of plumbing have been worked out nicely by now. I love the work David Zeuthen and co. have done in particular, but many others have done good things.

Fast forward to today. I recently bought a new Netbook computer (an ASUS Eee PC 1015PEM – yea, I know, it’s not heavy on the OpenGL, but I don’t care enough about that) to run Fedora’s rawhide distribution fulltime as a desktop, and decided to try GNOME Shell. I had heard things and seen screenshots, but hadn’t really used it. Switching to GNOME Shell is easy enough on Fedora, simply using the “gnome-effects” application, which is in the menu. This switches the session from using a panel with metacity to gnome-shell with mutter, etc. But the mechanics are hidden behind a single button. That’s a nice touch, and anyone reading this who cares can easily try it out for themselves.

The GNONE Shell takes your current desktop and tries to simplify it down into something akin to the other Web-ish UIs we’ve seen in recent times. It uses a modified metacity window manager (which apparently will eventually be merged into the shell itself) and has some nicities, like built-in Javascript. You also get typical stuff like shortcut keys to run commands. It’s heavy on the gloss, but light on the complexity, prefering to present a “clean” interface to the user. The problem is that in this attempt to be so “clean”, it’s extremely off-putting to those of us who don’t want to use our computers like we might use a TV interface.

Overall, I am very unimpressed with the GNOME Shell experience. In an effort to target the UI at simplistic netbook users, it removes a lot of the features that I previously enjoyed, while being very Apple-like in prescribing how I will and will not use the UI. It has an “Activities” button that I need to click to do anything – akin to Microsoft deciding the Windows “start” button was a good idea to drive everything – while simultaneously removing panels, applets, and even doing away with Nautilus driving the desktop icons :( Now, it might be that things will improve, and I know they postponed the release once already, but I really feel this is still missing a lot of functionality I want in a desktop, and if it truly is to deprecate everything else will be a reason I migrate to XFCE, KDE, or cling onto somehow still running GNOME2 for a few years.

For now, my advice is to run “desktop-effects” and switch back to regular panels, then fire up gconf-editor and make sure nautilus is displaying desktop icons by manually creating the boolean “show_desktop” property under /apps/nautilus/preferences. I’m sorry I can’t be more enthusiastic about GNOME Shell. I don’t mean to be offensive, but I just think it’s gone too far this time.

Jon.

On US drivers

September 27th, 2010

So over a long weekend, I drove between 1100-1200 miles from Boston to New York, to Washington D.C., to Monticello, to Washington D.C., to Edison, to New York, and back to Boston. In that time, I saw all of the usual appallingly bad examples of driving common in the US. Let me itemize a few that particularly annoy me:

1). Separation distances aren’t known or understood generally. People seem to have absolutely no issue driving a mere few feet behind you when at speed on the highway, but then often drive with wider distance in urban areas. They often seem to have absolutely no comprehension of breaking distances, and so on. Trucks do the same thing, at speed, without engaging any intellectual thought.

2). The speed limit is viewed with the usual contempt, but it is miss-directed such that vehicles generally speed less than in Europe (where limits are higher anyway) but ignore construction speed limits and fail to slow at tolls and other places where safety limits have been imposed. The net result is that drivers react with incredible hostility toward those who slow down in such situations. The new law in Massachusetts (and many states) requiring drivers to slow down and move over for stopped emergency vehicles also seems to be widely ignored.

3). High beams (non-dipped lights) are frequently used indiscriminately on the highway with no regard for other drivers and the impact it will have on their ability to see. Some people do think to adjust their lights when there are oncoming cars, but not while sitting and tailing you (some of these lights are so unpleasantly bright that they can’t be mitigated through the mirror setting), or driving past you and hitting you with glare in your side mirrors.

4). Signals are generally taken as a sign of weakness. Many people never signal at all (their license should be revoked), many frequently change lanes way too often (recently attributed in a study as a significant cause of accidents – that should incur a fine), many trucks do the same (disgustingly dangerous – should result in criminal prosecution).

5). People don’t plan ahead. Rather than reading signs, they’re drinking coffee and juggling fast food without watching the road (probably talking on the cellphone aswell). Then last minute lane changes result in massive tailbacks while people try to get in the lane they should have been in ten minutes before.

Those are just a few of the things that annoy me about the non-standards of driving in the US. It’s not that Americans are bad people in any way, it’s that this country has no real national standards for driving, nor an adequate standardized national driving exam (“drivers ed” is typically non-compulsory for adults). Law enforcement often seem to convey a sense of caring less about things that actually cause accidents (lack of signalling, tailgating, etc.), preferring instead to generate revenue by meeting speeding citation quotas, and missing the point.

Jon.

Open Hardware Summit and Maker Faire New York

September 16th, 2010

So I decided to attend the first Open Hardware Summit next Thursday (September 23 2010) in Queens, New York. I’ll drive down on Wednesday and I’m staying nearby at one of the airport hotels. Open Hardware is one of the next big things that is already starting to influence the Open Source community, and I think it’s important to keep up with what’s going on. If you’re going to be there, give me a shout.

After the conference, I am debating taking Friday off and driving down to D.C. and Virginia for the day. I’ve yet to see Monticello (Thomas Jefferson’s home) and I’d so much like to tour the library and grounds. If I do that, I’ll drive down after the conference and stay nearer Virginia in the evening, or nearer D.C. (I also want to see the Declaration of Independence as I keep missing it when I go to D.C.). The idea of a day living in my imagined 18th century world of rose-tinted American idealism is nearly always more enjoyable than many rational people might think it ought to be :)

I’ve bought a ticket for Maker Faire New York for the weekend, thinking I might then drive back to Boston in Saturday and stop off in New York on the way back for a few hours. Something like that. Just as long as I’m back in time to spend Sunday writing!

Jon.