PIONEERS Lenny Is Back!

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,201
Reaction score
5,219
With regard to licensing, folks have an absolute right to give away their work without restriction. Even GPL2 imposes restrictions. You can't do better than free to use.

The bugs in the original code have been addressed in the 6 p.m. update of the Nerd Vittles article which also explains how to make the changes for those that previously installed the components. Our apologies.

:shit: happens.
 

sukasem

Guru
Joined
Sep 13, 2008
Messages
142
Reaction score
26
Hi Ward,
With new script, If I don't say anything, Lenny will keep talking to the end. I think some have to be repeated if silent. But BackGroundDetect cause problem sometime.

Thank you, I have so much fun ;)

BTW, Can I get the old script?
 

randy7376

Defnyddiwr Gweithredol
Joined
Sep 29, 2010
Messages
865
Reaction score
144
The changes made to the Lenny dialplan work just fine for me - same as lgaetz. Currently running this in a virtual machine under VirtualBox.

Is there some bug in BackgroundDetect that prevents the code originally written from working? More curious than anything...
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,201
Reaction score
5,219
There's a new version and new approach that's ready for testing this morning. To load it, just run through the upgrade drill again:
Code:
cd /tmp
wget http://pbxinaflash.com/lsupport.tgz
tar zxvf lsupport.tgz
rm lsupport.tgz
sed -i '\:// BEGIN Lenny Remake:,\:// END Lenny Remake:d' /etc/asterisk/extensions_custom.conf
sed -i '/\[from-internal-custom\]/r /tmp/lenny.txt' /etc/asterisk/extensions_custom.conf
rm lenny.txt
rm 3.gsm
asterisk -rx "dialplan reload"

If it gives you problems, load lsupport.last.tgz which will restore yesterday's 6 p.m. edition:
Code:
cd /tmp
wget http://pbxinaflash.com/lsupport.last.tgz
tar zxvf lsupport.last.tgz
rm lsupport.last.tgz
sed -i '\:// BEGIN Lenny Remake:,\:// END Lenny Remake:d' /etc/asterisk/extensions_custom.conf
sed -i '/\[from-internal-custom\]/r /tmp/lenny.txt' /etc/asterisk/extensions_custom.conf
rm lenny.txt
rm 3.gsm
asterisk -rx "dialplan reload"
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,201
Reaction score
5,219
Can a few folks also test the demo site and see if you get past the 30 second mark with sip2sip.info? We're in the mountains, and I suspect the Cisco router here (over which we have no control) is misconfigured for SIP, but who knows.

Just use the following SIP URI: [email protected].
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,201
Reaction score
5,219
Machine/Human determination doesn't really matter. It's Lenny's timing on responses that I'm trying to improve. :)
 

mbellot

Active Member
Joined
Dec 15, 2008
Messages
406
Reaction score
187
I've tried setting this up locally on an old system (Piaf 1.7.5.5, FreePBX 2.6.0.5, Asterisk 1.4.21.2) and I'm getting immediate hang-ups when calling 53669 from an internal extension.

The odd thing is it (sort of) worked with the first setup Ward that pulled yesterday.

It would ring, answer and I would get Lenny but it didn't seem to "hear" the other end and hang up after ~ 8 seconds. With the latest setup I don't even get the initial Lenny greeting, it just hangs up.

Code:
<------------>
    -- Executing [53669@from-internal:2] Set("SIP/190-08ff9670", "MACHINE=0") in new stack
    -- Executing [53669@from-internal:3] Set("SIP/190-08ff9670", "OPTION=5") in new stack
    -- Executing [53669@from-internal:4] Set("SIP/190-08ff9670", "TALK_DETECTED=0") in new stack
    -- Executing [53669@from-internal:5] Set("SIP/190-08ff9670", "RECORDING=1376417756.11611") in new stack
    -- Executing [53669@from-internal:6] Gosub("SIP/190-08ff9670", "playitonce(Lenny01)") in new stack
  == Spawn extension (from-internal, 53669, 6) exited non-zero on 'SIP/190-08ff9670'
    -- Executing [h@from-internal:1] Macro("SIP/190-08ff9670", "hangupcall") in new stack
    -- Executing [s@macro-hangupcall:1] GotoIf("SIP/190-08ff9670", "1?skiprg") in new stack
    -- Goto (macro-hangupcall,s,4)
    -- Executing [s@macro-hangupcall:4] GotoIf("SIP/190-08ff9670", "1?skipblkvm") in new stack
    -- Goto (macro-hangupcall,s,7)
    -- Executing [s@macro-hangupcall:7] GotoIf("SIP/190-08ff9670", "1?theend") in new stack
    -- Goto (macro-hangupcall,s,9)
    -- Executing [s@macro-hangupcall:9] Hangup("SIP/190-08ff9670", "") in new stack
  == Spawn extension (macro-hangupcall, s, 9) exited non-zero on 'SIP/190-08ff9670' in macro 'hangupcall'
  == Spawn extension (macro-hangupcall, s, 9) exited non-zero on 'SIP/190-08ff9670'
Scheduling destruction of SIP dialog 'MDJiMDQyMDk2ZWExNzUwYmQwMDMwMWM5Zjg1NzE5YTI.' in 32000 ms (Method: INVITE)

It looks (to my very untrained eye) that there is a problem playing the audio file, but those haven't changed since I did the initial install yesterday that partially worked.

Any help is greatly appreciated, I really would like to get Lenny up and running.
 

klingon888

Guru
Joined
Nov 23, 2007
Messages
90
Reaction score
4
My testing confirms. Neither of my Asterisk 11 systems reliably detect non-silence, the TALK_DETECTED variable always stays at zero, so Lenny repeats himself forever.

I recall a post from lzaf on this forum about silence detection. IIRC Asterisk stumbles a bit with silence detection. I can't recall the thread or the finer points.

I too had this problem with the initial code posted. I then replaced the 3.gsm file with the backgroundnoise.ulaw file from the "other forum" and its working great. Lenny will prompt with hello once, then caller responds, then Lenny will do the "I cannot hear you" (not sure if this was intended), which to me is great as it adds to annoy the caller :) I checked my logs and I no longer get TALK_DETECTED = 0.
 

sukasem

Guru
Joined
Sep 13, 2008
Messages
142
Reaction score
26
Hi Ward,
Isn't AMDSTATUS suppose to be "HUMAN" instead of "AMD_PERSON"?
I think that is why lgaetz said he always get Machine.

And also in sub PlayIt, Is Goto(PlayItOnce) suppose to be GoTo(oncemo)?

exten => 53669,n,AMD
exten => 53669,n,GotoIf($["${AMDSTATUS}"="HUMAN"]?humn:mach)
exten => 53669,n(mach),WaitForSilence(1500)
exten => 53669,n,Goto(oncemo)
exten => 53669,n(humn),Return

Thanks,
 

mbellot

Active Member
Joined
Dec 15, 2008
Messages
406
Reaction score
187
Asterisk 1.4 not supported. Sorry.

Story of my life. :(

Guess I need to look at upgrading, huh?

I'm going to guess there is no easy way to move all my configuration info from the current setup into a freshly built PIAF Purple system. It's going to be a marathon of manual input, right?

EDIT:

Out of curiosity, what about the basic setup isn't supported by Asterisk 1.4? I understand the modules are for newer systems, but the basic 53669 custom extension seems like it should work...
 

mbellot

Active Member
Joined
Dec 15, 2008
Messages
406
Reaction score
187
OK, I'll look at Green instead. DL'ing the ISO now, SF seems slow today.

I tried converting the ulaw files to gsm with sox, moved the ulaw files to a holding directory and I'm still getting immediate hang-ups.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,201
Reaction score
5,219
Hi Ward,
Isn't AMDSTATUS suppose to be "HUMAN" instead of "AMD_PERSON"?
I think that is why lgaetz said he always get Machine.

And also in sub PlayIt, Is Goto(PlayItOnce) suppose to be GoTo(oncemo)?


Fixed the HUMAN issue. The jump to PlayItOnce was intentional. Two iterations seemed like enough to me.
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,201
Reaction score
5,219
OK. Figured out a way to accurately detect both voice and silence with AMD. Keep in mind that AMD was actually designed to detect answering machines when you placed robocalls. It's quite accurate actually. But complete silence was rarely an issue. People and machines don't usually answer a call and then sit there in total silence.

Here we are using AMD to detect a person at the other end when they call us. And sometimes they will sit there quietly for a bit... especially after hearing Lenny. So whether the person talks a little (HUMAN) or a lot (ANSWERING MACHINE) in AMD-speak really doesn't matter. What we really want to detect is complete silence so we know when to repeat a Lenny clip. The magic number (I think) is 2.5 seconds of silence followed immediately by 2.5 more seconds of silence with no voice detected at all. Does that make sense? :detective:

Try out the demo and let me know if it works for you. The first two clips play once regardless of whether there is complete silence. But you should never get by the third clip by remaining completely silent. You can upgrade in the usual way if you like.
 

randy7376

Defnyddiwr Gweithredol
Joined
Sep 29, 2010
Messages
865
Reaction score
144
Oh, how I wish I had had Lenny about three or four years ago when I still had a land-line! Those could have been some very good times indeed! After I get through with "Patch Tuesday" updates (thanks, Micro$oft!) today, maybe I can come back and revisit Lenny...
 

wardmundy

Nerd Uno
Joined
Oct 12, 2007
Messages
19,201
Reaction score
5,219
lgaetz: Give it another update. All of your suggestions are in place. Seems to be fine. Lenny is getting close to Prime Time Ready. :flowers:
 

Members online

No members online now.

Forum statistics

Threads
25,810
Messages
167,754
Members
19,240
Latest member
nikko
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top