I first heard about Lenny from an episode of The Snow Plow Show at phonelosers.org. And I realized I had to have Lenny on my asterisk server. I followed a howto at crosstalksolutions.com however it wasn’t as complete as I liked, I still had to figure some stuff out. Setting Lenny up is relatively easy. Just follow the instructions below and it will get you going. 🙂

Step 1

Create the Lenny custom context in Asterisk

SSH into freepbx and edit extensions_custom.conf with your favorite text editor

Then add the following lines of code.

[Lenny] exten => talk,1,Set(i=${IF($["0${i}"="016"]?7:$[0${i}+1])}) same => n,ExecIf($[${i}=1]?MixMonitor(${UNIQUEID}.wav)) same => n,Playback(Lenny/Lenny${i}) same => n,BackgroundDetect(Lenny/backgroundnoise,1500) Save and exit the extensions_custom.conf file

Step 2

Use your favorite SCP client to SCP the Lenny sound files into /var/lib/asterisk/sounds/Lenny

Note: If you are using FreePBX 13, the sound directory is /var/lib/asterisk/sounds/en/Lenny.

You can download the sound files here Lenny Sound Files

Step 3

Now youll need to create a custom destination.

Under the FreePBX interface choose Admin-> Custom Destinations.

Add a new Custom Destination with these settings.

Custom Destination: Lenny,talk,1

Description: Lenny

Click Submit Changes followed by the apply changes button.

Lenny is set up at this point.

Step 4.

Create a new virtual extension and give it the extension number of your choice.

Then click Advanced and look for optional destinations and set it just like this.

Save and Apply Settings. And you are done. Now you can dial the extension you assigned and talk to Lenny.