Archive for October, 2007

Konqueror and Internet Banking

I found out a little more about a problem that’s been really annoying me for ages: I can’t access my bank’s Internet banking using Konqueror.  When I hit the button, Konqueror proclaims that it “Could not connect to host”, but if I right-click on the “Login” link and choose “Open with Firefox Web Browser…” it works fine.

I broke out Wireshark and did a capture.  DNS request and response normal, TCP three-way handshake fine, SSL Client Hello…  Hmm, TLS handshake failure.  Strange.  I traced a Firefox connection, and (obviously) after the SSL Client Hello there is a Server Hello in response, and the connection establishes okay.

What I found is that the cipher suites presented by Konqueror and Firefox differ: Firefox offers a couple that Konqueror doesn’t, and vice-versa.  More importantly, the one that is presented in the Server Hello on the Firefox connection is labelled by Wireshark as “Cipher Suite: TLS_RSA_WITH_3DES_EDE_CBC_SHA (0x000a)” and is one of the ones missing from Konqueror’s Client Hello.

So there are two issues here.  Firstly, Konqueror is missing some TLS cipher suites (or at least Ubuntu’s build of Konqueror is).  Secondly, Konqueror’s reporting of the problem is not helpful — stating it was a “security negotiation failure” would be a lot more helpful than just saying “could not connect”.

/me goes looking for KDE’s bug reporting system…

FreePBX modes

When I first set up FreePBX, I was frustrated by the inability to create a voicemail user independently of an extension.  It looked to me like an office system, where each handset was associated with an individual and had its own voicemail.  In the end I created a few extensions that were not associated with handsets and used them as the voicemail boxes (I disabled voicemail on all other extensions) and wrote a custom dialplan entry to work out which voicemail box was associated with the “usual” user of each handset.  Works fine, even if I have to check each upgrade of FreePBX doesn’t knock out my custom dialplan stuff.

Recently though, I found that FreePBX does indeed have an alternate programming method that matches up with my original intended use.  The default method is called “Extensions” mode, while the different method is called “Device-and-User”.  The extensions mode, in effect, creates a user for every device defined, and calls it an extension.  The device-and-user mode however allows you to configure each separately.  Your device configurations are simply end-points for your handsets (SIP definitions for example) and users are the entities you actually want to reach (i.e. people).

A device can be either “Fixed”, where it is always associated with a particular user, or it can be “Ad-hoc”.  An ad-hoc device allows a user to log on to the device and receive their calls at that device.  A user can be logged on to multiple devices at once, or even a mixture of fixed and ad-hoc devices.

I was really excited by this, as it seemed that I could replace everything I had set up with my extra extensions and associated Ring Groups by just switching to device-and-user.  There is a little snag though — even though devices still have to have a numeric name that looks just like an extension, it is not available to the dialplan in its own right.  If I have configured my ATA-attached cordless phone as device 852, I cannot dial 852 and make it ring.  I can only dial whatever user number the device is associated with, which in turn means that if no-one is logged-in to an ad-hoc device there is no way to make it ring.  Also, a device can only be associated with one user at a time.

I have auto-answer SIP presences on all the handsets that support it, which I use as a two-way intercom system.  This supplements FreePBX’s Paging facility which I use for broadcast, one-way announcements to all (such as “dinner is on the table!).  I couldn’t switch to device-and-user mode completely, as I would lose the ability to selectively dial devices such as the intercom lines that would not be associated with a user (or would need to be associated with more than one user to support both paging and intercom).

So for now I’m sticking with what I’ve got.  I like device-and-user, but by not making the device’s number addressable in the dialplan they’re eliminating a lot of flexibility and possible functionality.  When we moved into our current home I ripped out much of the builder’s phone wiring and replaced it because I didn’t want all my phones in parallel… that’s what device-and-user feels like right now: everything in parallel.  I’ll keep an eye on it though…

Tags: , ,

Holiday

We returned from holiday a little while ago — we spent a week in Melbourne to visit family and friends.  While it wasn’t Nicholas’ first time on a plane, it was the first he was able to get involved in (being a couple of years older than his previous plane rides).

He took to the plane amazingly well.  On the trip down we were ahead of the wings on a 767, and the engines didn’t bother him at all (even at landing).  The trip back we were at the back of a 737, and the noise was a bit louder and he was a little worried but quickly got over it.  He also had no trouble with pressurisation, something that couldn’t be said for me on this trip (a bit of sinus blockage from a cold gave me some trouble coming home).

I’d have to say that the highlight of Nicholas’ trip was TRAMS!  At one stage we were near the corner of Bourke and Swanston Streets in the city, where I’d guess the tram frequency during the day is probably 2-3 per minute in every direction.  Every tram he saw on the whole trip was greeted with a yell of “there’s a tram!”, but in the city it was bordering on delirium — “There’s a tram, and there’s another tram, and ANOTHER tram, and ANOTHER TRAM!!! There’s a brown one!  And there’s a green one!  And there’s ANOTHER brown one!  And there’s a blue one!!!  SO MANY TRAMS!!!”

We also rode on Puffing Billy, and had a couple of train trips on the suburban network, so I think he’s definitely had a good helping of Melbourne rail travel!

While it was good to get away, there were some logistical aspects to what was essentially our first ever proper “family holiday” that we’ll need to work on before we tackle the holiday thing again.  I can’t wait to get back to work and have a rest!  :-)

Music library status

In case anyone is curious, here’s a status update on my music library debacle.  I finally got to a point where I had a what should be a clean copy of my music repository on my NFS drive, and I just had to point iTunes at the cleaned repository…

I was resigned by this time to losing all my ratings and play counts, as it seemed that the only method that would work was to delete the existing library and recreate it from a hack of the XML version of the library file.  This was what I started when I got back from holiday.

I backed everything up, then edited the XML file and search-and-replaced the file paths in the entries with the new location.  Then, I deleted the “iTunes Library” file and started iTunes.  Sure enough, empty library.  I selected “Import…” and pointed iTunes at the XML file.  After a fair amount of grinding, it gave me an error saying that “not all the songs could be added as they could not be found”.  Sure enough, only about 1400 of nearly 2600 made it into the library.  My search-and-replace must have been incomplete… :-(

I figured that rather than scratch the library yet again and try and find the 1200-odd entries in the XML file that I had failed to edit correctly, I’d just use “Add to Library…” to bring in the missing files.  This worked correctly, and my iTunes listing was back to its former glory (without play counts and ratings though).

Then the moment of truth — iPod time.  I had not plugged my iPod in at all after the library had blown up, so I was a bit nervous about the possibility of an iPod sync removing all the media and details from the iPod.  I was hoping though that iTunes would read the ratings and play counts off the iPod and restore them to the library.

I sat the iPod in its dock, and got an error about the iPod being synced to a different library.  Nuts.  I reopened the XML file and found a field called “Library Persistent ID” which was different between the original XML file and the new one — so unfortunately iTunes didn’t import the ID from the original file.

At this point I got a little blase about the whole thing.  I’d already trashed the library once, how much worse could it get?  I decided that this ID value had to be in the binary library file somewhere, so went looking for a binary editor that could help.  I found a very cool little program (with an equally cool name) called 0xED that allowed me to edit the iTunes library file — and lo and behold, right there in about the first 100 bytes of the file, was exactly the hex string that was in the XML file.  I shut down iTunes and substituted the old value into the binary library file, and restarted iTunes.  So far so good.  I plugged in the iPod…  and it synced!  The majority of the files were fine, there were a couple of podcast episodes and a few old miscellaneous files that had to be copied to the iPod.  Unfortunately though, the ratings and play counts didn’t come out of the iPod so are presumably gone for good.

So I’m working again, right?  Wrong.  This mess was the kick in the pants I needed to go away from using iTunes for music and switch to something Linux.  The main issue I have is with podcasts — I’ve never really been happy with the Juice/iTunes combination, since Juice splattered podcasts all over my library (it doesn’t put everything neatly into the “Podcasts” directory like iTunes did) — and I forgot the reason I switched from iTunes to Juice for podcatching in the first place.  I’ve got an idea in mind to combine a command-line cron-scheduled podcatcher with the MySQL backend for amaroK, but more on that when (if) I get something working.

iTunes library mismanagement

All I wanted to do was change the mount point that my music was exported on.  A simple change from one path to another on my NFS server.  What I’ve ended up with is a total train-wreck — my library is in a shambles.

I’m sure that in the past when I’ve relocated the library all I needed to do was select the new location in iTunes Preferences.  iTunes would recognise all the music in the new location and update the library.  This time, however, nothing I did would tell iTunes to look in the new location!  If I made the old location unavailable, it complained that all the music files were not locatable.  If the old location was present, iTunes just didn’t bother making any change to the index.  At one stage I told it to “Consolidate Library…”, one of the many recommendations I found on the Innerweb for handling iTunes Library moves, and it started copying duplicates of all my music files into the NFS share.

The worst part came when I told iTunes that it could manage my music library.  The Web and iTunes Help told me that with this option enabled, iTunes would keep my library organised according to artist and album detail.  Since my library was already quite structured I thought there would be little for it to do.  Unfortunately, iTunes didn’t think that my library was quite structured enough.  It started unwinding things like the “Compilations” directory — a directory it had created itself — into strict directories for the artists on a compilation.  I don’t have many compilation albums, but it was making an an absolute mess of a couple of albums that have songs by different artists.

So why was this a problem?  The problem happens because my library is shared between a number of applications — iTunes itself, ccxstream for sharing music to the XBMC-running XBoxes, and firefly (formerly mt-daapd) for streaming to DAAP-capable players (like Amarok and XBMC — I was looking at using DAAP as an alternative to running ccxstream).

So now I have a broken library.  All because I wanted to change /data/music to /lvs/music.  Why can’t iTunes manage that?  Why is it that iTunes feels it has to dereference the link to the music location, and if it thinks nothing has changed, not update anything?  As part of trying to get this working I had let iTunes move my library back off NFS to local disk, and I renamed the folder to try and hide it from iTunes as part of telling it that I had moved it.  When I went into iTunes preferences, the library location showed the name that I had renamed the folder to!

iTunes is obviously smarter than I am.  I should have not bothered trying to organise my storage the way I want to — once I let iTunes touch my network, I should have just let iTunes have its way.  So recommend all the iTunes fan-kids who posted some of the recommendations I read.

I’m much less keen to throw down on an iPod touch now, or even the Apple TV I was talking Susan into.  Maybe I’ll feel different after I’ve worked out how to put my library back together… or better still, worked out a way for me to manage music on my (and Susan’s) iPods without iTunes (my previous efforts there haven’t been successful).

An Open Letter to Australian Commercial Television Networks

From the television-viewing public of Australia: We applaud your attempt to bring us back from BitTorrent by airing popular US shows shortly after their original US airdates.  However, your gesture is hollow and insincere as long as you continue to treat us as having no intelligence to make informed decisions about our choice of entertainment.

We do not appreciate your insistence on devaluing your hard-won programming with the following:

* distracting and idiotic lower-thirds (believe us, in the middle of House we don’t need to be reminded when Neighbours is on.  If you intended to distract us from the programme, you succeeded — but we changed channel.);

* accelerated rolling or compression of credits to make room for promotion reels, destroying the readability of the credits (some respect for the folks that make the programs you use to make your money, please.  If you can’t take 30 seconds out to thank the folks that produce your programming, YOU’RE IN THE WRONG BUSINESS.);

* worse still, the replacement of the original production credits with your own high-speed microscopic version (see above.  Get a clue.);

* obliteration of theme music with continuous voice-overs that start from the first frame of credits until the last (in fact some of us can remember when a voice-over was exactly that, and you could still hear the original track);

* utter disregard for timeslots and scheduling, either by deliberate obfuscation (telling the guides that 8:30 is the start time, while the real start time is ten minutes later) or programming overruns (also likely deliberate.  If I didn’t choose to watch Big Brother, I’m hardly going to stay and watch it while you make the program after it late.);

* station logos that add nothing to the security or traceability of material (“This capture of Sea Patrol, Sir, from the logo we think it was captured by an AUSTRALIAN from a broadcast from Channel NINE!”).

Call it whatever you like: fast-tracked, streamed, straight-off-the-satellite, we don’t care.  Treating us like idiots is what’s driving us to torrents, not episode lag!  For many of us who value the experience of being entertained and not that of being marketed-at, we are very likely to WATCH THE TORRENT and then BUY THE BOX-SET DVD.

The sooner you reposition yourselves back to being useful and valuable components in the entertainment supply-chain, instead of annoying and costly middle-men, the better -off we all will be.

Some hints at how this might occur:

* Ditch the lower-thirds.  

* Respect your content producers, even those who are employed by your network.

* Setting your programming schedule is like making millions of appointments with your viewers.  KEEP YOUR APPOINTMENTS!

* Remove the logos.  I’ll admit that they’re less intrusive here than in some locations (or on cable) but they’re more harm than good.

Yours was an honourable industry that has been tarnished by overseas influence and corporate greed.  Only you have the power to reverse the trend and make Australian TV great again.

Website changes

Nothing visible at all (I hope) but I made some virtual site changes.  Some internal applications were actually visible externally, and I’ve made a new virtual host to isolate that stuff to the internal network (yes, I know I could have done it differently, but switching virtual hosts was easier then the first method I planned, which was to move the Internet-facing content to a different machine).  The main thing I wanted to achieve was a separation of logging — because my internal access to things like Nagios and Cacti was mixed in the log with external visitors, I could never get a clear picture of traffic ratios and so on (again, easily fixed by tweaking my log analysis software, but I like the virtual host method better).