From today’s National Post comes the following clip, from a story titled “Maid to order” by Deirdre McMurdy:
Is this true? Maybe Catherine and I are missing out on something!
From today’s National Post comes the following clip, from a story titled “Maid to order” by Deirdre McMurdy:
Is this true? Maybe Catherine and I are missing out on something!
I’ve begun a series of reviews of books about expeditions over in the Reinvented World weblog. I’ve started off with Offbeat in Asia and will quickly follow with others.
In 1958, Michael Alexander and his partner Diana (pictured here) journeyed from Istanbul, across Turkey and Iran and into Afghanistan. Alexander published the tale of their journey in the book Offbeat in Asia: An Excursion in 1960.
Although there is precious little practical information in the book — none of the detailed information about motivations, vehicle, sponsors, gear, etc. that one finds in other expedition accounts — the nature of the tale suggests they took a rather casual approach to the trip, viewing it more as a “jaunt” than an “expedition.”
Their vehicle was a 1951 Land Rover, purchased “in the upper reaches of the King’s Road for £265,” and appears to have been quite reliable but for the need to repair tires at regular intervals (in contrast to the Oxford-Cambridge Expedition Land Rover which, if memory serves, used only one set from London to Burma).
The book starts where the expedition does, at the Istanbul Hilton. Alexander calls this “the best hotel in Europe,” and the first chapter goes on at some length about its wonders:
All this and more inside was heady stuff to two ingenuous travellers just in from the dusty. bumpy road through Yugoslavia and Salonika, an eight-day journey from England that might have been accomplished in six had we not lingered by the blue Agean. Finally installed at the Hilton we were tempted to surrender body and soul to so comfortable a cathedral of materialism…”
From Istanbul, they travel to Ankara, Tabriz, Teheran, Babul, Meshed, Herat, Kabul, Bamyan, then back to Herat, through Teheran, and back to Istanbul:
The tale finishes as it started, at the Istanbul Hilton, and closes with a note about the trusty Land Rover:
The only thing that failed to recover was the car, owing to its being driven from Greece with a holed radiator and a broken fan. It was a total wreck by the time it reached Dover, where it was ignominiously pushed off the boat and sold to a scrap dealer for £50.
While perhaps not as useful as other books for those looking for practical expeditioning advice, the book’s casual, breezy style does allow a interesting look at everyday Iran and Afghanistan; on arrival in Kabul, for example:
The social life of the town seemed to be centred on, or rather in, the rapidly drying-up river that ran through the middle: it was lido, lavatory and laundry — women washed, boys bathed, animals drank and performed their natural functions in its festering shadows. Behind was the bazaar, hiding as if ashamed behind the more pretentious buildings that line the three main streets.
I purchased Offbeat in Asia used at The Travel Bookshop in London in May of 2003. It is out of print, but copies are readily available from abebooks.com.
This may qualify as the single most complicated way to dial the phone ever created. However the end result — click on number in the Mac OS X Address Book and have it dialed for me — is quite neat.
Here’s what happens when I select the “Dial” mouseover for a telephone number: an AppleScript is called that sends an XML-RPC request to a PHP-based XML-RPC server that then, in turn, places the call by connecting, over TCP/IP, with the Asterisk Manager API, to my Asterisk PBX.
The end result is that the phone on my desk rings, I pick up, and my call is connected with the number I selected.
Here are the pieces.
Using this burger locator script as a starting point, I created an AppleScript called
AddressBook2Asterisk [hint: on a Mac, simply click on that link to open the script in Script Editor] that looks like this:
using terms from application “Address Book”
on action property
return “phone”
end action property
on action title for p with e
return “Dial”
end action title
on should enable action for p with e
if value of e is missing value then
return false
else
return true
end if
end should enable action
on perform action for p with e
set telephone to value of e
set resultList to DialOut(“peter”, “secret”, telephone)
return true
end perform action
end using terms from
on DialOut(username, password, telephone)
tell application
“http://www.serverurl.com/directory/asterisk-dial-xmlrpc.php”
return call xmlrpc {method name:”asterisk.dial”,
parameters:{username, password, telephone}}
end tell
end DialOut
This AppleScript calls an XML-RPC server called asterisk-dial-xmlrpc.php, written in PHP, using the Useful Inc. XML-RPC in PHP code running on my webserver.
The XML-RPC server accepts three parameters from the XML-RPC client called from AppleScript: username, password and telephone number. The username and password are the same as in /etc/asterisk/manager.conf. This affords some measure of security, as it means that without the username and password, arbitrary calls to Timbuktu can’t be made by others (note, however, that the password is sent cleartext, so you should take precautions if your client and your server aren’t local to each other and behind a firewall).
Assuming the username and password are correct, the PHP script then, using a snippet of code found here, connects directly with the Asterisk Manager API via TCP/IP on port 5038, and originates the call.
And that’s it: select “Dial” and the phone rings and the call connects.
You may wonder why I complicate things by using XML-RPC to communicate from AppleScript to Asterisk rather than simply connecting directly to the Asterisk Manager API from AppleScript. Simple answer is “I couldn’t figure out how to do that.” More subtle answer is “creating the XML-RPC server means I can dial the phone from anything in the world that can talk XML-RPC.”
I’m not a master, or even a journeyman, at AppleScript, XML-RPC or Asterisk, so I welcome commments on improving the code.
One of the perils of running your own open source PBX is that a lot of the things that you can “just assume” about running a phone system you have to remember to think about with Asterisk. For example, today I was experimenting with the Asterisk Manager API and used it to open a channel to my outside POTS line. I then got distracted, and forgot to “hang up” the channel, so the line stayed “in use” for 3 or 4 minutes until I realized the error of my ways.
BTW, the solution to the immediate problems was to connect to the Asterisk CLI, and issue the command “soft hangup Zap/1-1”.
My friend, and Zap Your PRAM speaker, Art Rhyno has been named Academic Librarian of the Year by the Ontario College and University Library Association. In Art’s field, this is like winning the Oscar for Best Director. Congratulations, Art!
Please note that in the introductory minutes to yesterday’s keynote at MacWorld, there was strong reinvented presence:
Daniel Burka did some high-quality investigative journalism and got the real story of the new Formosa location.
The RSS feed for the Drive Around the World just got converted to a full feed (i.e. the full text of posts, including photos, rather than frustrating excerpts). This is great, and makes it far easier to follow the expedition. Thanks!