Friday, November 30, 2007

Deranged Voip Setup

Ahhhhh VoIP, now there is a subject any self-respecting Sudo Masochist can spend long fruitless hours tinkering with !!!

I have a VoIP setup in my home/office. Parts of what I planned work, others do not.
I am surprised because I would have thought that what I am trying to do would be a relatively common requirement, with some decent documentation, but after many different attempts, I am still not sure if what I am trying is either conceptually impossible, or just unlikely to work because of bugs in the services and hardware that I use.

I have one PSTN line coming in, I have had this number for over 30 years, I do not wish to change it, it must be handled properly. Due to the mess that is the UK's telecommunications industry, it is not viable to port the number away from British Telecom, so I have to carry on paying them through the nose, just to be able to have calls coming in on that line.

I have accounts with 3 VoIP Providers, who between them give me the ability to make very cheap outgoing calls, a range of addressing schemes on which to receive incoming calls, voicemail that arrives via email, smart routing to the cheapest provider etc. etc.

The problem lies in merging the two.

I have a good quality ATA, a Linksys SPA3000. It can bring incoming PSTN calls into a VoIP network, and make PSTN calls from a VoIP network.

I have a good quality VoIP handset, a Linksys SPA 941, good build quality and physical controls.

What I'd like in the office, is to have one phone and one voicemail account, regardless of where the call originates from, or how it got to me. If I am out I need the whole lot to go to my mobile.

I am so close to getting this working, but the last part of the puzzle is still tantalisingly out of my reach ......

When a call comes in on PSTN, the SPA3000 is able to pass it through to one of the extensions of the SPA941 (also I can call out through this extension to the PSTN line via the SPA3000). What I cannot make work is to have the call forwarded to my VoIP voicemail box if it is not answered. I could make it go to practically any other voicemail box or phone in the world, but not mine, because the phone is registered to that account to be able to receive Message Waiting notifications, plus make and receive calls from that account.

You will not find this kind of detail in the glossy brochures ......

The only way I have found to make this work, and beleive you me, I have tried many, is to have calls coming into my office via PSTN, routed by the SPA3000 out over the net, via my Voice Service Provider and back to the SPA941 in my office.

I have the bandwidth for it, but it is a totally ridiculous way of working IMHO.

Part of the problem is the complexity and adaptivity of the technology.
The web configuration of Sipura products is the biggest html form I have ever had to use, it has no validation and the documentation is very poor (there are many parameters not even mentioned in the admin manuals).

The Voice Service Providers do not have Tech Support, they have online forums. In some it is rare to see any posting from an employee that is not a product or press announcement. What you do find is sporadic, often contradictory information from well-meaning but equally confused co-users of the service, each of whom are trying to set something up that is different from you.

A lot of what I hoped I could get working, works fine.
It is frustrating though, not to be able to deal with the last few details.

So even though you do not have to use the 'sudo' command much, I designate VoIP a fully-fledged Sudo Masochistic occupation :)

Thursday, November 29, 2007

Sudo Masochist

In a brainwave last night, I came up with a new pleasantly daft alter-identity.

What is a Sudo Masochist? Someone who gains dubious pleasure from the frustration of fiddling around on the Unix command line. [1]

( OK, I did warn you it was daft :) )

I always hated the command-line as a way of controlling a computer.

My first 3 computers, a Sinclair ZX81, Apple ][e then Apple ][gs all had to be controlled through the keyboard in one way or another ...... I always thought it was stupid, why have a computer if you have to struggle so hard to get it to do anything? The computer should be intelligent, not me !! (Which considering I was teaching myself 6502 Assembler, was pretty daft as well I guess).

My hate of the command-line was really reinforced when I did a short course in C programming at the then Polytechnic of Central London. None of us on the course learnt any C, we all struggled too much with the VaxVMS command-line and text editor to get anywhere with the language at all ...... anyway, I did not want to learn C, I wanted to learn Prolog (it sounded so much cooler) but I was the only person who elected to do the course that year :(

So then of course REAL computers came along!! I got a second-hand Mac IIci and thought: I am a confirmed GUI guy, I will never see the command-line again, and I was right for quite a long time ....... of course until MacOSX came along.

I use the command-line now of course, I suppose I grudgingly realise why it has survived all this time ...... I used to run MacHTTP on a Mac IIsi at Westminster University. I remember once an intense struggle in a hotel room in Melbourne on a slow modem and a long-distance call, trying to connect to it back in London via Timbuktu screen sharing, so I could click on a dialogue box which was blocking the OS.

So the other day I found myself doing a complete software download, compile, install and configure on a remote Mac via SSH of the Open Source CalDAV. Why? Because I was a bit bored and thought it might be interesting to play with.

Yup, I am a Sudo Masochist !!!!

On a whim this morning I grabbed the name on GMail :)
Much to my chagrin, the new account is immediately activated with IMAP available, and I am still waiting for it to be enabled on my main account :(

NB. For my non-geek readers, "sudo" is the command you use to pretend to be somebody else so you can issue a command on their behalf. Typically you pretend to be the 'root' user, the user who can do anything, even destructive things. Get a sudo command wrong and you can destroy your whole system.

Geek humour.

Wednesday, November 28, 2007

OMG !!

I just received this :

> Dear Jeremy Quinn,

> Thank you for your session proposal(s) for ApacheCon 2008/EU.

> You have been selected as a speaker for ApacheCon Europe 2008.
> The following session(s) has/have been accepted and scheduled:

> (2416) 'Break My Site'

Oh My Gosh !!
I did not expect this talk to be accepted at all.
I gave it once before, with any luck I may have another case-study to add.

Thank You ApacheCon Europe 2008 Selection Panel (I think)

Friday, November 23, 2007

Something Nice

At last, something nice to say about Leopard :)

Server Apache/2.2.6 (Unix) mod_ssl/2.2.6 OpenSSL/0.9.7l DAV/2

The Leopard Client has Apache 2 built in, hurray !!!!
Tiger had Apache 1.3.n which was not nearly so much fun :)

See : /etc/apache2/ for the configuration etc.

Ambiguous URLs

(Oh dear, he is complaining again)

Flickr have released a new section on their website called Places.
It is all about browsing photographs in a geographical context, something I am pretty keen on ....

Such a shame then that they have done it all wrong :)

OK, so maybe not ALL wrong, but look at this example and tell me they got the URL hierarchy correct for the UK.

The URLs appear in this form :

looks sensible enough right? Until you see how it is used :

OK, you say, so what is the problem?

Well in England there are at least two Brixtons that I know of, the one where I live in south London and one in Devon, near Plymouth. Do a search in the Places page and two Brixtons come up in the results, unfortunately they both have the same URL, and it points to the one in Devon.

I imagine this has happened to many places in Britain that share names.

IMHO it is the choice of regions in the UK that has caused this. Someone decided that the top-level regions in the UK are England, Scotland, Isle of Man, Channel Islands, Wales etc. Whereas I would say that from the point of view of wanting to disambiguate the URLs as much as possible, the names of counties should have been used.

Then we could have had :

While writing this and testing URLs I was playing with yesterday, I am seeing different results, so this indicates, I hope, that someone is tinkering, anyhow it was amusing yesterday to find that the place where I have lived for the last 30 years "does not exist on the planet".

As it is, the nearest I can drill down to my home is London, and this is a shame.

Thursday, November 22, 2007

Leopard Peeves

So, I just upgraded one machine to Leopard ...... here are my initial impressions.

The Stupid :

The translucent menu bar, bejebus what drugs were they on ?!?!?!?
It is so incredibly ugly !!!! Thankfully you can fix it easily, following these instructions.

The Broken :

The new Finder is OK I suppose, much too much emphasis on eye-candy for newbies IMHO (this is a general complaint I have against MacOSX).
What really pisses me off is that WebDAV Volumes on your local network, that broadcast their location using Bonjour "_webdav._tcp" do not show up in the 'Shared' section of the Finder's sidebar, until you manually mount it via the "Connect to Server" dialogue. I would call this a bug. I do not have a fix for this ATM.

The Crap :

Supposedly, Stacks were originally slated for Tiger, but withdrawn. I sincerely wish Apple had left them out of Leopard as well, specially as they have replaced perfectly good functionality with something far less capable. You used to be able to keep folders in the Dock, and have a menu of their contents popup, allowing you to navigate into nested folders. I used to keep my Home, Applications and the HD's root in the dock, allowing me to reach anywhere quickly. This was especially useful for quickly launching Applications you don't use often enough to keep in the Dock.
Stacks do not offer anything close. More fancy but useless eye-candy for people with like 20 documents. Totally unscalable with 100's of thousands of documents, specially as my Documents folder only contains folders at the top level. So now if I want something similar, I have more work to do, I have to manage folders full of aliases by hand, hmmm a great advance !!!!!

Spaces is interesting, but will take a while to get used to it's weirdness. What is badly needed IMHO is a contextual menu item for all windows, allowing you to move a window or all windows of a running application into a specific space. Dragging and dropping Exposé style miniature window proxies is too clunky. The officlal technique of "Move the pointer over the window, and hold down the mouse button while pressing the Control key and an arrow or number key." is totally bizarre !!! You'd need to be some kind of mutant contortionist! My hand is not big enough to hold down the control key and press arrows at the same time.

The Fix :
Oh joy, now I can finally type uninterrupted into Spotlight's search field!!! WOW!!!
You mean they could not fixed that in 11 updates of Tiger ????? GRRRR!

I sincerely hope that next time I write, I have something nice to say about Leopard !!!

Upgrading to Leopard

Ahhhh, my 100th post :)

I upgraded my MacBook to Leopard last night, here's what I did :

1. Wait until Leopard's first update.
2. Backup my Installer CD to a DMG file using Disk Utility, put the disc away in a safe place.
3. Set up an external HD with two partitions, one of about 8 GIG for the installer, the other large enough for a backup of my MacBook.
4. Restore the Installer DMG to the 8 GIG partition using Disk Utility and verify it.
5. Boot from the new Installer partition.
6. From the installer, switch to Disk Utility, repair the MacBook's disk.
7. Restore the MacBook's disk to the large partition on the external drive and verify it.
8. Check the backup boots OK. (Or, AT LEAST check it comes up in the Startup Disk panel!!)
9. Perform the actuall install, I chose to do an "Archive and Install". It worked fine !!

Sunday, November 11, 2007

Free Stuff

I gave to a stranger today, it went really well.

This old but good Denon tape deck had been stored under the bed for years.
I had never got around to selling it second-hand, it always seemed like too much hassle.

I found someone who wanted it through the Lambeth branch of FreeCycle.
FreeCycle exists to keep stuff out of landfill, our societies are so awash with redundant goods, but as even eBay has show, everything is useful to someone, if only you could find them.

I might have found someone willing to buy it on eBay, but then you probably have to ship it, you worry about the money exchange, yadda yadda, for what I was likely to get it did not seem worthwhile. FreeCycle's rules are simple: recipient collects, no one pays.

Through FreeCycle I got immediate response from about 6 people. I emailed the person who wrote first, they collected it in the morning. It even turned out they lived across the road! I could have just put it out in the street after all (like everyone else does, grrr!).

Next, there's that bloody scanner I got years ago, that never worked with SANE reliably, there's bound to be somebody local who could use it . . . . .

Friday, November 02, 2007

Hello Tiger

I had to replace my home server's broken Ubuntu. It is an ancient Mac Cube, so going back to MacOSX Tiger seemed like the easiest thing to do.

Using MacPorts, I installed Apache2, SVN, SSL etc.

With a WebDAV repository setup, I needed a way to broadcast it's URL over the local subnet using Bonjour, ironically for a Mac there did not seem to be a way to do it.

MacOS Client comes with a Bonjour Module for Apache 1.3, MacOSX Server comes with one for Apache2 (but I do not have it).
Linux can use mod_dnssd but as it is based on Avahi, I am pretty sure it won't work on MacOSX.

A bit of Googling and I found the dns-sd command. The man page says it is designed for testing only, but it seems to work fine, fired off once at startup.

I use this plist, placed in /Library/LaunchDaemons/

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "">
<plist version="1.0">
<string>Bonjour Shared</string>