Friday, May 22, 2009

My Latest Hint

I just had this hint posted on MacOSXHints.com.

On my last project, I was collaborating with people in the States via iChat, using audio, video screen and document sharing.
We had such wide-ranging and complex discussions, I kept wishing I could record them.

Ironically, it was not until after the work ended that I found the iChat / Video / Record menu item (aarrgghh!!).

Well anyway, I thought it would be useful to automate the recording feature and wrote the script featured in MacOSX Hints.

You can attach this script to specific buddies, or to everyone. When an AV Chat starts, recording is automatically started ..... well actually the other party is first asked if they mind and can choose to reject the request.

It seems that only the person who initiates, records, so if both parties want a recording they both have to start it.

Many thanks to Ross and Dave for help testing :-)

Wednesday, May 20, 2009

Logging to GTalk

I was reading yesterday that Apple is thought to be using XMPP the Jabber protocol for their new iPhone Push Notification technology.

That's funny I thought, I had just started using XMPP for logging!!!

I am experimenting with Asterisk at the moment. Asterisk for those that do not know is an Open Source PBX (Private Branch Exchange) a phone system in software. I have it running on my ancient 500 Mhz Mac Cube, it has been extremely reliable. My home office now has a ridiculously sophisticated phone system ;-)

IMHO most of the monitoring tools for Asterisk suck. They are written in nasty languages like PHP, Perl, Flash etc. that not only do I not want on my system, they are overkill.

What I wanted was to receive simple messages about the run-time status of the system. I wanted to be able to receive these messages securely, from wherever I was (because I can use my phone system from wherever I am, but more on that another time).

Asterisk has a Jabber module, so this was an easy way to go.

So, I have two GMail Accounts, one for personal email, one for mailing lists.
I have iChat on my desktop/laptop/iPhone already subscribed to GTalk on my personal GMail account.

First I added my spare GTalk account as a buddy to my personal account (requires some fiddling around, but if you know your IM client, it's pretty easy).

Then I configured Asterisk (beware, she's a complex beast, BTW a semi-colon marks a comment).

First configure /etc/asterisk/jabber.conf :
[general]
debug=yes ;Turn on debugging by default.
autoprune=no ;Auto remove users from buddy list.
autoregister=no ;do not auto register users from buddy list.

[gtalk-logger] ;label
type=client ;Client or Component connection
serverhost=talk.google.com
username=MY_SPARE_GTALK_USERNAME@gmail.com/asterisk ;Username with optional roster.
secret=************** ;Password for MY_SPARE_GTALK_USERNAME
port=5222 ;Port to use defaults to 5222
usetls=yes ;Use tls or not
usesasl=yes ;Use sasl or not
buddy=MY_MAIN_GTALK_USERNAME@gmail.com ;Manual addition of buddy to list.
statusmessage=Up and Running ;custom status message for Asterisk.
timeout=100 ;Timeout on the message stack.


This allows Asterisk to connect to GTalk to send messages.

The next thing to do is to emit messages from the appropriate parts of your dialplan.

First I defined a Macro, that can be used from anywhere in the dialplan, this goes in /etc/asterisk/extensions.conf :

[macro-logger]
; log message - to Jabber
; @param ${ARG1} - the message to send
exten => s,,Jabbersend(gtalk-logger,MY_MAIN_GTALK_USERNAME@gmail.com,${STRFTIME(${EPOCH},GMT,%C%y-%m-%d %H:%M%n)} ${ARG1})


This sends the message in $ARG1 with a timestamp.

Next is to use the macro from the dialplan. Here is an example of an outbound route to go via SipBroker, matching dialed numbers beginning with * :
[via-sipbroker]
exten => _*X.,1,Macro(logger,Outbound call to ${EXTEN} via SipBroker) ; log the call
exten => _*X.,2,Set(CALLERID(all)=${JQNAME} <${JQOFFICE}>) ; Set outbound CallerID
exten => _*X.,3,ChanIsAvail(SIP/${EXTEN}@sipbroker,j) ; Check to see if available (jumps to priority + 101 on fail)
exten => _*X.,4,Dial(SIP/${EXTEN}@sipbroker,,tTW) ; Dial, allowing transferring and recording
exten => _*X.,5,Macro(dial-result) ; Check result
exten => _*X.,104,Playback(all-circuits-busy-now) ; if ChanIsAvail fails, say message


I know, it looks really weird !!!! :-)

I left out a few details like, looking up the phone number in my AddressBook.app to show the recipient's name and using Growl.app to splash these messages received by iChat. I plan to cover these in a subsequent post.

I have found this to be a really simple and reliable solution.

There are XMPP libraries for many systems, I may start using this technique elsewhere as well.

Wednesday, May 06, 2009

Nested Screen Sharing

I am starting a new spare-time project (more on this later).

I am using Maven, Spring etc. etc. within IntelliJ.
While I have worked on projects started by other people using this tech, this is the first time I have started a new project using this stuff myself, so I reckoned I needed someone to review what I was doing.

So I contacted my good friend "M" (all names redacted).

We both fired up iChat and had a video conference for a while, M became interested.

Then we switched to an iChat screen sharing session to look through my code and show him what worked, this included me launching Screen Sharing.app to open a session to my server (so now we have one level of nested screen sharing).

M became even more interested.

M wanted to check out the code, so I fired up a Terminal and let him type in his own password into the htdigest command.

M then suggested that a mutual friend "G" would be really interested in this. iChat would not let me add G to it's screen sharing session, so M shared his screen with G via Skype. Now we have 2 levels of nested screen sharing.

G cannot type into my machine, but we can all talk to each other.

G wanted to check out the code, but as he could not type, I made a password for him using the Password Assistant in KeyChain.app, then pasted it into our iChat text session.

G could not read the text easily, so I used Control-ScrollWheel to zoom into the stuff we were discussing.

M had compiled the project and wanted to run it, but could not set up the complex server the project connects to, so we reversed the screen sharing session, so I could set up his machine to connect through my VPN.

M and G make their first commit, adding their names to the project's pom.

It was an incredibly constructive few hours.

And a very warm welcome to my two new collaborators !!!!

Saturday, March 21, 2009

Street View Celeb

Google Street View is out in the UK and what fun it is!!

My younger brother is now a Street View Celebrity, but he's not sure if he likes the idea or not.

Monday, March 16, 2009

Radio Uncompromising

I used to listen to the John Peel show.
Unfortunately he died a while ago, I still miss him.

Most of you have probably never heard of him, but I listened to his show for something like 30 years, I managed to record the last few years of his show and still enjoy listening to them.

Apart from being an incredibly nice guy, he was considered by some the most influential DJ in the history of the BBC.

He would play whatever he liked, which included a lot of stuff that would never otherwise get a chance to get on the radio, always surprising, always eclectic.

I recently found a kind of substitute, a radio show that streams over the net called Dandelion Radio. “The Internet Radio Station Inspired by John Peel. Independent. Original. Uncompromising”.

I use this stream URL in iTunes.

The same with John's shows, I cannot say I like everything that is played, some of it is pretty challenging, but if you have as deranged and confused a taste as me and you crave your “new music hit”, maybe you'll like it, give it a go!!

Thursday, March 12, 2009

My New Tripod

I have been yearning for a new tripod, ever since I found the old one was not sturdy enough for a DSLR.

I did a lot of research, some of it probably useful but in the end there is no substitute for actually getting your hands on something like this ...... and there lay the first problem, actually finding somewhere that keeps stuff in stock at a shop, where you can go ...... you'd think, living in London that this would be easy but even professional suppliers would have everything in their online catalogues but next to nothing in their physical shops.

In the last few months I watched different photographers use tripods in different situations, doing astonishing things with them, easily ..... they were all Gitzos, so that began to narrow the field, except Gitzo seem to have a ludicrously huge range.

I eventually found one in a shop in Tottenham Court Road, it had a broken leg, so I could not buy it but I had a chance to play.
It was one of their levelling range, there is a gimbal holding the centre column, which has a spirit level at the bottom, so you can adjust the level of the camera after setting up the legs. This interested me, I like low light panoramas.

You can do a lot with it. It's light and strong. No catches to catch my fingers. The legs are easy to use, they can lock at different angles so you don't just have to use the floor. I can place the camera anywhere from taller then me, to ground level.

I found this one, end-of-line, big discount.

So, it finally arrived. The first thing I tried was to get it really level, level enough so that when you rotate the camera, it stays level.

No way.

Maybe my eyesight is not as good as it was, maybe the spirit level is too small, maybe it's the slight nudge it gives as you clamp the gimbal, so far I have been unable to get it level enough for a panorama that did not drift.

The leveling is really useful for fine tuning your framing, but my expectations were too high regards panoramas.

So I went out on my first night shoot with it.

I was very pleased. It was a very windy night and I was doing long exposures, not a good combination but I could do what I needed and work quickly with it.

The unexpected problem was the law.

I got moved on by renta-cops from the South Bank. Later I heard Lambeth Council requires anyone using a tripod in the street to have a permit and pay by the hour, because if you use a tripod you must be (a) professional and (b) causing a potential public liability insurance issue.

Paranoia Britain, don't you love it.

Wednesday, March 04, 2009

Do Something About It

http://www.dosomethingaboutit.org.uk has just issued it's first vote to members, to choose the issues it will attempt to tackle in the next few months.

Their boilerplate text :

I've just cast my vote to decide DoSomethingAboutIt.org.uk's campaign priorities for the coming months. We can either wait for political parties to tell us what the next election is about, or we can take the initiative and tell them what matters to us. By logging on to www.DoSomethingAboutIt.org.uk, you can let politicians know what you want to see happen- and if they don't listen, then you can get rid of them by using DoSomethingAboutIt.org.uk to link up with thousands of other progressives across the country. Check out the website yourself, and cast your vote today!


Hopefully a worthwhile attempt at grassroots democratic lobbying.