Sunday 22 May 2016

Jolly Roger and Lenny

Jolly Roger and Lenny are bots. But not just any bots - they're bots aimed at telemarketers. They give just enough encouragement to the telemarketer for them to persist for anything up to half an hour.

You know the kind? "You had an accident in the last three years which was not your fault". Or "You're owed compensation for PPI." Or even "This is Microsoft technical department, we've detected a virus on your computer"

They ignore "Do not call" lists. If you report them to the Information Commissioner's office, nothing happens. And the calls keep coming in. If you ask them to stop, maybe they will, but the next caller still calls. The problem is, it's so cheap for them to do this; the answer is to make it more expensive, by adding to their costs. And their main cost is the cost of the time they spend in calling.

So I got to thinking, wouldn't it be rather fun if I had a bot like this? I'll call it "Rupert". But how to do it? The implementation of Lenny needs you to have a PBX, and you use Jolly Roger by redirecting your call. But the thing is, I'd like to make something like this, and base it on a Raspberry Pi, so I had a think - what do I need?

Suppose I Blu-tack a microphone and speaker to my phone handset. That eliminates all the problems of interfacing with the phone system, which isn't something I know anything about. It means that I can't auto-answer the phone, but that's not an issue. And when the call is over, I can hang up.

The Pi has sound output, but not input. But I can get a USB dongle that gives me that interface. That means I can get input and output to the Pi.

The way Lenny works, is it has a series of pre-recorded responses, which it plays in order. For this to work well, you need three kinds of responses. The first kind is "Yes", which you say in various ways. The second kind is a request to repeat, "Could you say that again, please?" also said in various ways. And the third kind is a lengthy response, with some detail and some encouragement. Jolly Roger is similar.

I think I'll do my own series of responses.

Lenny plays a response, waits for a reply, waits for silence, then plays the next response.
I can use sox to detect that there's some sound, and to detect silence. And I can keep a file of the whole conversation, for posting on this blog.

I'll use an ordinary Raspberry Pi, but if it works, then it occurs to me that other people might like one. It will probably work on a Pi Zero. In that case, the cost of the whole thing will be £4 for the Pi, £1 for the USB thing, £2 for the mike and speaker, £1.70 for the power supply, £2 for the 8gb SD card = £11.

In operation, I'll answer the phone as normal, but as soon as I realise it's a telemarketer, I'll start up Rupert, and let Rupert take care of the telemarketer.

So I've ordered the USB thing (which lets me attach a speaker and a mike to the USB port). I've already got everything else I need to set this up.

"Hello, it's Rupert ..."

1 comment:

  1. This sounds as if it could be amusing and even profitable (I'm sure many would pay for a solution). I have learned today that the reason I get silent calls followed by a recorded "goodbye" is as follows: a firm in India is making scam calls and is robo-dialling up to 50 at a time. If an agent becomes free shortly after a person answers a connection is made, if not the call is dropped. Much cheaper to waste the time of the people called than the agent.