Installing Java 1.6 on OSX


It seems Apple has been lagging behind releasing a general update for Java for OSX Tiger. Rumour has it that Leopard will include java 1.6, however some people need it now. The good news is that it can be installed on Tiger now with the following steps.

  1. Go to connect.apple.com, and register/log in. You will need an account to do this.
  2. Go to the downloads section and select "Java" on the right hand side menu
  3. Download "Java SE 6.0 Release 1 DP6 (Disk Image)"
  4. Once downlaod is complete, and launch the installer
  5. Complete the steps in the installer
  6. Launch Terminal, and issue these commands:
      # cd /System/Library/Frameworks/JavaVM.framework/Versions

sudo rm CurrentJDK

(enter your password)

sudo ln -s 1.6 CurrentJDK

This will set Java 1.6 to be your default java installation.

Australian weather script for Asterisk


After looking around and not finding any decent script to read the weather for Asterisk, I decided to write my own.

The code is downloadable here. Save the file to /var/lib/asterisk/agi-bin/getweather.agi.

To use this script in Asterisk, copy the following into /etc/asterisk/extensions.conf: exten => 997,1,Answer exten => 997,2,agi,getweather.agi exten => 997,3,Hangup

Update 6/6: I've updated this script to v1.1 now. I've fixed up a parsing error and also added more wind directions - the BOM add more than I thought ;)

Microwave Madness


Every once in a while, you just find something on the Internet that fills you with awe and makes you look goofy staring at the screen with a grin plastered on your face. May I present one such site. Micro Maniac. Click on the items there to watch various things put into a microwave until they either melt down, explode, or do other funky things. Great viewing :)

Review of the Linksys SRW2024 switch.


This weekend I bought a Linksys SRW2024 switch. It's a 24 port, 10/100/1000Mbit rack mount switch with a fairly good feature set. The switch it is replacing is a Cisco 2924XL - another feature packed switch - but only 100Mbit. As most things these days come with an onboard Gigabit network adapter, I thought it'd be a nice performance increase to finally get a GigE switch. What I did want however is the switch to support 802.1q trunking. This allows you to use one network card in a machine and have the switch do some magic to make it bridge multiple vlans. This means I only need 1 GigE network card per machine and can have it on 2 logically separate networks. This is a good thing.

So I set this switch up as soon as I got it home. It has a lovely GigE sticker on the top that make me chuckle. The next thing I did was RTFM. Well, I tried to. It doesn't come with a manual. It comes with a CD, which is great - as I was hoping to get a nice PDF manual - however there's only a very basic users guide. Hrmmm. Here I am wanting to set up multiple vlans, and have no documentation how to do it. I then did what every self-repecting geek would do. I played.

This was when I first started to dislike the SRW2024. Being a Cisco person, the first thing I did was hook up the console cable. Wow, what a rude shock I was in for. The console is just about useless. About the best thing you can do in the console interface is set the switches IP address. The second best thing is that you can disable interfaces. That's it. No vlan config, no status, no admin functions. Poop.

Hey, I'd set up an IP address via the console, lets try telnet! Hrrmm. Wait - that's the same crappy interface that - well, sucks. What about the web interface I hear you scream. Sure - that was my next thought. Starting to feel misled, I fired up Safari and went to the switches IP. Nothing. Squat. Zero. A big fat white page showed itself with a dazzling nothing. Ok, maybe it's a Safari thing - Lets try Firefox. Yay, a login box! But wait. Don't get too excited - as after you've logged in, you can't actually do anything. You guessed it, you can ONLY configure the switch using Internet Explorer. Now I'll tell you one thing about Mac users... Hell hath no fury like a Mac user (and probably linux users too) forced to use IE.

So, I pulled out my old faithful Windows XP laptop and presto, I could get into the web interface and actually do something! Setting up the Vlans was a bit tricky - as I was still thinking in the Cisco frame of mind. Put the interface into trunk mode, and set dot1q. The Linksys switch is a little different, as you have to actually allow a trunk port to use certain vlans via tagging. THis is probably good for security - as you have the option to set all non-tagged packets to vlan 4095 (aka the bit bucket). You also have the ability to set on a per port basis which vlans can be accessed - even in trunk mode. Think of it like the cisco allowed command.

After this initial frustation of setting the switch up, it seems to be pretty good. Performance is ok - although I bet it would work better if I wasn't using cheap GigE network cards (ie not 32 bit cards) and could run jumbo frames. I still managed to get ~26Mb/sec between two machines - which is still more than double the performance of a 100Mbit switch.

Running wise, I'd give this switch a 8 out of 10. For the initial config, I'd have to say that Linksys really need to pull their finger out and do some serious re-thinking of what they are trying to achieve with this switch. A 3 out of 10 for the setup experience.

General update.


It's been a busy month. I've finished up with my old employer after my contract ending, started with a new employer and been working flat out. In the past month, we've redone a new Xen virtualisation host machine and implemented a new nagios based monitoring system on a DomU guest install of Debian.

On a personal front, I've got myself a spiffy new Linksys SRW2024. It's not a bad 24 port GigE switch. The web interface is a little cludgy, and very hard to use if you don't use Internet Explorer, and the console interface is pretty much useless. That being said, after it's been setup, it's not too bad a switch. For it's price, it's pretty good considering it supports 802.1q trunking. I'd love to see Linksys spend some more time on the interface and make the console interface useful (vlan config etc).

Cisco 7961 - New Software fixes lots of SIP issues


Cisco has recently released version 8.2(2)SR1 software for the 79x1 phones (not to be confused with the 79x0 phones!). This seems to fix many issues I was having with the phone randomly crashing, randomly unregistering lines and so on. I'd recommend this software load for EVERYONE running a 7941/61 phone. It is stable, and many issues have been fixed.

The Message Waiting Indicator (MWI) still has issues with a plain asterisk config. I have reported this bug to Cisco and I'm hoping they do actually fix it. In the meanwhile, the smart boys and girls in the Asterisk camp have added a "buggymwi=yes" option that you can add under your phone config in sip.conf to work around buggy Cisco phones. I'm not sure if this affects the 79x0 model phones.

I'm part way through putting Australian tones into the phone - but I'm having issues getting the dialtone to the correct Australian one. The File required is /Australia/g3-tones.xml in Cisco Call Manager - however it isn't publicly available on the Cisco web site. My current version (with the US dialtone still) is here.

Update 21/09/2007: Thanks to Tim who posted the correct Australian dial tones in the comments, this file is now correct for Australian locale. I have updated the file on the link above. Thanks Tim!

Cisco 7961 IP Phone nightmares.


Well, I got suckered in again. I splashed out and purchased one of the Cisco 7961 VoIP phones. As always, it's very nice gear - that is when it works. Cisco have been very smart with this. They say that their SIP firmware is RFC compliant and should work with any VoIP server - however, sadly, there are that many bugs that stop it from working properly, I don't even know where to start listing them here.

It's a really sad day when I can say that my $150 Sipura phone that is 3 years old is more reliable than a $500 Cisco phone. While it does take calls (if you look at it right), the message waiting indicator (MWI) doesn't work, the phone randomly crashes, the configuration files are not documented at all, the phone randomly drops calls, it randomly unregisters lines, and becomes very unstable after about 12 hours of being powered on - meaning you need to reboot it around twice a day.

To add insult to injury, I have been trying for 3 weeks to purchase a smartnet contract to allow me access to newer software for these phones, however 1) Cisco won't sell them direct, and 2) none of their resellers are interested in selling me a smartnet contract.

At least the phones look nice - because it still looks like an impressive paperweight.