PIONEERS Lenny Is Back!

Discussion in 'PIAF 3 Add-Ons' started by wardmundy, Aug 9, 2013.

  1. Robert-BCC

    Robert-BCC Guru

    Joined:
    Jul 21, 2014
    Messages:
    58
    Likes Received:
    12
    Nice car! Is it a John Cooper Works?
     
  2. wardmundy

    wardmundy Nerd Uno

    Joined:
    Oct 12, 2007
    Messages:
    14,708
    Likes Received:
    2,515

    We wish. :driving:
     
  3. wardmundy

    wardmundy Nerd Uno

    Joined:
    Oct 12, 2007
    Messages:
    14,708
    Likes Received:
    2,515
    Great list of places to route telemarketers on DSL Reports this week.
     
  4. lthown

    lthown New Member

    Joined:
    Nov 15, 2007
    Messages:
    16
    Likes Received:
    8

    So provided we dug up the file somewhere, how would I go about integrating lenny with the Gotcha-Free PBXIAF on RaspberryPi2 that I just set up? I've been using freePBX for years, this is my first exposure to AsteriskGUI and I'm still figuring out where everything is.
     
  5. dandy_don

    dandy_don Member

    Joined:
    Sep 27, 2010
    Messages:
    171
    Likes Received:
    10
    Hi Ithown.

    Lenny appears to be working fine right out the box on my Gotcha-Free Raspberry Pi 2 pbx. I have not tried this yet, but I'm sure I could transfer a caller to Lenny (extension 53669). Hes a real hoot! Just waiting for Larissa to make it through Grad School!
     
  6. lakecoder

    lakecoder Guru

    Joined:
    Jan 13, 2010
    Messages:
    52
    Likes Received:
    3
    Can anyone confirm if IncrediblePBX12 (Ubuntu) Lenny is working for them? As a test I routed a DID to Lenny's extension but just get "congestion" tones.

    Lenny's ext is set to dial: SIP/[email protected]
     
  7. wardmundy

    wardmundy Nerd Uno

    Joined:
    Oct 12, 2007
    Messages:
    14,708
    Likes Received:
    2,515

    Try: SIP/[email protected]
     
  8. lakecoder

    lakecoder Guru

    Joined:
    Jan 13, 2010
    Messages:
    52
    Likes Received:
    3
    Hmmm. No dice. Just rings about 5 times before giving up....

    -- Executing [[email protected]:43] Macro("SIP/9200 Home-00000017", "dialout-one-predial-hook,") in new stack
    -- Executing [[email protected]:1] MacroExit("SIP/9200 Home-00000017", "") in new stack

    -- Executing [[email protected]:44] Dial("SIP/9200 Home-00000017", "SIP/[email protected],,Ttr") in new stack
    -- Called SIP/[email protected]
    > 0x25db420 -- Probation passed - setting RTP source address to 208.100.39.53:10704

    [2015-03-27 11:29:58] WARNING[2173]: chan_sip.c:4103 retrans_pkt: Retransmission timeout reached on transmission [email protected]:5061 for seqno 102 (Critical Request) -- See https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions
    Packet timed out after 32000ms with no response
    [2015-03-27 11:29:58] WARNING[2173]: chan_sip.c:4132 retrans_pkt: Hanging up call [email protected]:5061 - no reply to our critical packet (see https://wiki.asterisk.org/wiki/display/AST/SIP+Retransmissions).
    -- SIP/sip2sip.info-00000018 is circuit-busy
    == Everyone is busy/congested at this time (1:0/1/0)
     
  9. RPi-Fan

    RPi-Fan Member

    Joined:
    Jun 8, 2014
    Messages:
    85
    Likes Received:
    13
    Set:

    Settings -> Asterisk SIP Settings -> SRV Lookup

    to Enabled.
     
    lakecoder and wardmundy like this.
  10. lakecoder

    lakecoder Guru

    Joined:
    Jan 13, 2010
    Messages:
    52
    Likes Received:
    3
  11. lthown

    lthown New Member

    Joined:
    Nov 15, 2007
    Messages:
    16
    Likes Received:
    8
    So I was able to integrate Lenny back in to the Gotcha Free pbx for Raspberry PI. I used the instructions for the first page with some slight modifications.
    1. the lenny.tgz is now gone, I was able to find Lenny.zip on DSL reports
    2. Files 1-9 need to be renamed, Lenny1.ulaw needs to be named Lenny01.ulaw 02, 03 etc...
    3. The instructions assume the extensions_custom.conf has a "BEGIN Lenny Remake" section, well it doesn't anymore. Instead there's a [CallingRule_SIP_URI] section that has the SIP dialplan for Lenny. You can use that and bag the whole endevor... unless you want the recordings of Lenny, then you need to put the contents of lenny.txt into that section, replacing the SIP stuff that's there
    4. So skip the two lines in the instructions that start with "sed" since you did the same thing manually in #3
    5. If you want the recordings emailed to you, you're going to need to "apt-get install mime-construct" because it's missing, also it gets installed to /usr/local/sbin/mime-construct
     
    wardmundy likes this.
  12. Mango

    Mango www.toao.net

    Joined:
    Aug 10, 2013
    Messages:
    46
    Likes Received:
    13
    Here's a 26-minute conversation between Lenny and an astonishingly unkind telemarketer:

     
    arpawocky likes this.
  13. Aurock

    Aurock New Member

    Joined:
    Jul 15, 2015
    Messages:
    1
    Likes Received:
    0
    I came across Lenny recently on Reddit, and immediately began searching for a way to set up an instance of my own. With the help of this post, the Incredible PBX for raspberry Pi 2 guide, and simonics GV gateway, I have gotten close, but not quite all the way. I've got a running instance of incredible PBX, which if I connect to it with Yate Client and dial 53669 I can converse with Lenny. I've also got it connected to google voice and the auto attendent answers when I call my GV number. I'd like to get incoming calls to be answered directly by lenny though. I've been fiddling with the incoming call rules and such, but Lenny is stubborn and no matter what I do he won't answer the main line, only calls directly to his number.

    What do I need to change to make lenny answer calls that go to my GV number?

    Thanks!
     
  14. tycho

    tycho Guru (not...)

    Joined:
    Aug 9, 2011
    Messages:
    589
    Likes Received:
    227
    The reboot of this thread prompted me to add "Native Lenny" to one of my PBXs, rather than a "referral" to someone else's SIP URI. I got it working seemingly pretty easily by generally following the script on the very first page of this thread, substituting in the ULAW files from the .zip file found on DSLReports. Works flawlessly when I call the Lenny extension from my main 701 extension on the same box.

    But, for the life of me, I can't route incoming, external calls to Lenny. I'm probably doing something very noobish with regard to inbound routes...

    This is on an Incredible PBX 12.7.1 for Ubuntu 14 box with Asterisk 12.7.1 and FreePBX 12.0.12 (although the admin splash page indicates FreePBX 12.0.38) running on Ubuntu 14.04.1 LTS.

    I have a DID registered to the box. If I use a general Inbound Route, all calls, any DID/CID, and set the destination as Extension 701, calls to that DID reach ext. 701 if it is registered with the PBX, and go to VM if the extension is not registered. So, all of that is working.

    However, if I instead set the destination of the general Inbound Route, all calls, any DID/CID to 53669 -- the Lenny extension -- the call rings and rings and rings ... it goes nowhere.

    Can't make it work either by creating a separate inbound route based on CID or DID with a destination set to 53669. Calls just ring.

    If I take the easy route and make the Lenny extension nothing more than a SIP URI call to, for example, SIP/[email protected], that works just fine.

    I've looked at logs comparing an inbound route directed to the lenny extension, and an inbound route directed to 701 registered but not answering. It looks like the logic can't find a dialstring for poor Lenny, and sets DIALSTATUS: NOANSWER:

    Code:
    Working inbound call with inbound route set to extension 701:
     
    [2015-07-20 18:38:45] VERBOSE[29105][C-0000011b] pbx.c:    -- Executing [[email protected]:10] NoOp("SIP/IPComms1-in-0000010d", "Debug: Found PJSIP Destination PJSIP/701, updaing with PJSIP_DIAL_CONTACTS") in new stack
    [2015-07-20 18:38:45] VERBOSE[29105][C-0000011b] pbx.c:    -- Executing [[email protected]:11] Set("SIP/IPComms1-in-0000010d", "THISDIAL=PJSIP/701/sip:[email protected][MY IP ADDY]:52389;rinstance=[STRING THAT LOOKS LIKE A MAC ADDY]") in new stack
    [2015-07-20 18:38:45] VERBOSE[29105][C-0000011b] pbx.c:    -- Executing [[email protected]:12] Set("SIP/IPComms1-in-0000010d", "DSTRING=PJSIP/701/sip:[email protected][MY IP ADDY]:52389;rinstance=[STRING THAT LOOKS LIKE A MAC ADDY]&") in new stack
    [2015-07-20 18:38:45] VERBOSE[29105][C-0000011b] pbx.c:    -- Executing [[email protected]:13] Set("SIP/IPComms1-in-0000010d", "ITER=2") in new stack
    [2015-07-20 18:38:45] VERBOSE[29105][C-0000011b] pbx.c:    -- Executing [[email protected]:14] GotoIf("SIP/IPComms1-in-0000010d", "0?begin") in new stack
    [2015-07-20 18:38:45] VERBOSE[29105][C-0000011b] pbx.c:    -- Executing [[email protected]:15] Set("SIP/IPComms1-in-0000010d", "DSTRING=PJSIP/701/sip:[email protected][MY IP ADDY]:52389;rinstance=[STRING THAT LOOKS LIKE A MAC ADDY]") in new stack
     
    Broken inbound call with inbound route set to Lenny extension:
     
    [2015-07-20 18:06:08] VERBOSE[26606][C-00000118] pbx.c:    -- Executing [[email protected]:10] NoOp("SIP/IPComms1-in-0000010a", "Debug: Found PJSIP Destination PJSIP/53669, updaing with PJSIP_DIAL_CONTACTS") in new stack
    [2015-07-20 18:06:08] VERBOSE[26606][C-00000118] pbx.c:    -- Executing [[email protected]:11] Set("SIP/IPComms1-in-0000010a", "THISDIAL=") in new stack
    [2015-07-20 18:06:08] VERBOSE[26606][C-00000118] pbx.c:    -- Executing [[email protected]:12] Set("SIP/IPComms1-in-0000010a", "DSTRING=&") in new stack
    [2015-07-20 18:06:08] VERBOSE[26606][C-00000118] pbx.c:    -- Executing [[email protected]:13] Set("SIP/IPComms1-in-0000010a", "ITER=2") in new stack
    [2015-07-20 18:06:08] VERBOSE[26606][C-00000118] pbx.c:    -- Executing [[email protected]:14] GotoIf("SIP/IPComms1-in-0000010a", "0?begin") in new stack
    [2015-07-20 18:06:08] VERBOSE[26606][C-00000118] pbx.c:    -- Executing [[email protected]:15] Set("SIP/IPComms1-in-0000010a", "DSTRING=") in new stack
    [2015-07-20 18:06:08] VERBOSE[26606][C-00000118] pbx.c:    -- Executing [[email protected]:16] Return("SIP/IPComms1-in-0000010a", "") in new stack
    [2015-07-20 18:06:08] VERBOSE[26606][C-00000118] pbx.c:    -- Executing [[email protected]:27] GotoIf("SIP/IPComms1-in-0000010a", "1?nodial") in new stack
    [2015-07-20 18:06:08] VERBOSE[26606][C-00000118] pbx.c:    -- Goto (macro-dial-one,s,49)
    [2015-07-20 18:06:08] VERBOSE[26606][C-00000118] pbx.c:    -- Executing [[email protected]:49] ExecIf("SIP/IPComms1-in-0000010a", "1?Set(DIALSTATUS=NOANSWER)") in new stack
    [2015-07-20 18:06:08] VERBOSE[26606][C-00000118] pbx.c:    -- Executing [[email protected]:50] NoOp("SIP/IPComms1-in-0000010a", "Returned from dial-one with nothing to call and DIALSTATUS: NOANSWER") in new stack
    
    Anything jump out at anyone?
     
  15. petez69

    petez69 New Member

    Joined:
    Jan 25, 2014
    Messages:
    17
    Likes Received:
    3
    Hi Tycho

    I have Lenny working on a previous version with unattended transfer I cant find the installer to test on the latest raspberrypi. Could I get a copy of the tgz/zip file, I'd like to get it working myself and then we can compare notes :)

    Thanks..Pete
     
  16. tycho

    tycho Guru (not...)

    Joined:
    Aug 9, 2011
    Messages:
    589
    Likes Received:
    227
    Are you looking for the Lenny audio files? I do indeed have them. How can I get them to you? they are small enough to email so perhaps PM me with an address.

    Other than that I have no "installer" file. I followed the script posted by wardmundy in the very first post in this thread. That script downloads, and then deletes, "Lenny.tgz":

    Code:
    wget http://pbxinaflash.com/Lenny.tgz
    tar zxvf Lenny.tgz
    rm Lenny.tgz
     
  17. petez69

    petez69 New Member

    Joined:
    Jan 25, 2014
    Messages:
    17
    Likes Received:
    3
    Hi Tycho

    Ok I found that script on my box though I'm not sure it was the one I used to get mine working. In looking at the script, there are a large number of entries in extensions_custom.conf that you wont have.....

    [from-internal-custom]
    ;# // BEGIN Lenny Remake
    ; version 0.3.2 copyright: none claimed. Enjoy!
    exten => 53669,1,Answer
    exten => 53669,n,Set(TIMEOUT(absolute)=600)
    exten => 53669,n,Set(MACHINE=0)
    exten => 53669,n,Set(OPTION=5)
    exten => 53669,n,Set(TALK_DETECTED=0)
    exten => 53669,n,Set(RECORDING=${UNIQUEID})

    exten => 53669,n,MixMonitor(/tmp/Lenny/${RECORDING}.wav)
    exten => 53669,n,NoOp(Recording will be available: /tmp/Lenny/${RECORDING}.wav)
    ;exten => 53669,n,Playback(en/this-call-may-be-monitored-or-recorded)

    exten => 53669,n,Gosub(playit(Lenny01))
    exten => 53669,n,Gosub(playit(Lenny02))
    exten => 53669,n,Gosub(playitonce(Lenny03))
    exten => 53669,n,Gosub(playitonce(Lenny04))
    exten => 53669,n,Gosub(playitonce(Lenny05))
    exten => 53669,n,Gosub(playitonce(Lenny06))
    exten => 53669,n,Gosub(playitonce(Lenny07))
    exten => 53669,n,Gosub(playitonce(Lenny08))
    exten => 53669,n,Gosub(playitonce(Lenny09))
    exten => 53669,n,Gosub(playitonce(Lenny10))
    exten => 53669,n,Gosub(playitonce(Lenny11))
    exten => 53669,n,Gosub(playitonce(Lenny12))
    exten => 53669,n,Gosub(playitonce(Lenny13))
    exten => 53669,n,Gosub(playitonce(Lenny14))
    exten => 53669,n,Gosub(playitonce(Lenny15))
    exten => 53669,n,Gosub(playitonce(Lenny02))
    exten => 53669,n,Gosub(playitonce(Lenny03))
    exten => 53669,n,Gosub(playitonce(Lenny06))
    exten => 53669,n,Gosub(playitonce(Lenny08))
    exten => 53669,n,Gosub(playitonce(Lenny09))
    exten => 53669,n,Gosub(playitonce(Lenny10))
    exten => 53669,n,Gosub(playitonce(Lenny14))
    exten => 53669,n,Playback(en/tt-monkeys)
    exten => 53669,n,Hangup

    exten => 53669,n(playit),NoOp(Lenny speaks and repeats until reponse)
    exten => 53669,n,Set(LOCAL(lennyclip)=${ARG1})
    exten => 53669,n(oncemo),Set(TALK_DETECTED=0)
    exten => 53669,n,Background(lenny/${lennyclip})
    exten => 53669,n,AMD(2500,1500,800,5000,100,50,3,256)
    exten => 53669,n,NoOp(${AMDCAUSE})
    exten => 53669,n,GotoIf($["${AMDCAUSE:0:17}"="INITIALSILENCE-25"]?reststop)
    exten => 53669,n(mach),WaitForSilence(700,3)
    exten => 53669,n,Goto(humn)

    exten => 53669,n(reststop),WaitForSilence(800,2)
    exten => 53669,n,Goto(oncemo)
    exten => 53669,n(humn),Return

    exten => 53669,n(playitonce),NoOp(Lenny speaks once)
    exten => 53669,n,Set(LOCAL(lennyclip)=${ARG1})
    exten => 53669,n(noresponse),Background(lenny/${lennyclip})
    exten => 53669,n,AMD(2500,1500,800,5000,100,50,3,256)
    exten => 53669,n,NoOp(${AMDCAUSE})
    ;exten => 53669,n,GotoIf($["${AMDCAUSE}"="INITIALSILENCE-2500-2500"]?noresponse)
    ;exten => 53669,n,GotoIf($[${AMDSTATUS}=HUMAN]?humn2:mach2)
    ;exten => 53669,n(mach2),WaitForSilence(2000,1)
    exten => 53669,n(mach2),WaitForSilence(1000,1)
    exten => 53669,n(humn2),Return


    Think we will have to ping Ward to see if we can get a copy of the tarball....as the install script removes it :)

    Pete
     
  18. wardmundy

    wardmundy Nerd Uno

    Joined:
    Oct 12, 2007
    Messages:
    14,708
    Likes Received:
    2,515
    All of the stuff in the page 1 script appears to be correct. The script tries to first remove the existing dialplan code in extensions_custom.conf, and then it puts back the new stuff. The only thing you'll be missing are the recordings.
     
  19. tycho

    tycho Guru (not...)

    Joined:
    Aug 9, 2011
    Messages:
    589
    Likes Received:
    227
    You've left me confused.

    See my earlier post. I =did= get Lenny working and to do so I used the script posted at the very beginning of this looong thread. I do indeed have all of those entries in my extensions_custom.conf. That's not the issue that I raised.

    What I pointed out was my inability to forward incoming external calls to the Lenny extension. I can call the Lenny from a local extension just fine, but if I try to terminate an incoming call from a specific DID, CID, or -- heck -- =ANY= incoming trunk to the Lenny extension it fails. I posted the verbose listings of those call flows in my earlier missive.

    So, that's the problem that -I- am trying to fix. No suggestions have been offered.

    Regarding -your- problem you said (I think...) that you needed the audio files. I have them, and I offered to get them to you if you get me an email address or somesuch via PM. That offer still stands but I haven't heard from you in that regard...
     
  20. MGD4me

    MGD4me Guru

    Joined:
    Feb 3, 2009
    Messages:
    428
    Likes Received:
    56
    I'm certainly no expert with PJSIP, but I noticed in your log capture that THISDIAL and DSTRING do not contain the necessary data.

    Can you re-run the incoming call again, and show the complete call details leading up to what you have shown in post #158. Are there any other clues that may have been inadvertently snipped off before the call reached that first "Debug:" statement?