Lenny Not Working

I have downloaded the files for lenny and configure it but is not working when I place a call to the DID I have pre selected I get busy tone. below is a log for a failed call

[2017-12-08 15:00:47] VERBOSE[9277][C-0000193c] netsock2.c:   == Using SIP RTP TOS bits 184
[2017-12-08 15:00:47] VERBOSE[9277][C-0000193c] netsock2.c:   == Using SIP RTP CoS mark 5
[2017-12-08 15:00:47] VERBOSE[26888][C-0000193c] pbx.c:     -- Executing [[email protected]:1] Set("SIP/54.172.60.1-00001e77", "GROUP()=OUT_6") in new stack
[2017-12-08 15:00:47] VERBOSE[26888][C-0000193c] pbx.c:     -- Executing [[email protected]:2] Goto("SIP/54.172.60.1-00001e77", "from-trunk,+16023624449,1") in new stack
[2017-12-08 15:00:47] VERBOSE[26888][C-0000193c] pbx.c:     -- Goto (from-trunk,+16023624449,1)
[2017-12-08 15:00:47] VERBOSE[26888][C-0000193c] pbx.c:     -- Executing [[email protected]:1] Set("SIP/54.172.60.1-00001e77", "__DIRECTION=INBOUND") in new stack
[2017-12-08 15:00:47] VERBOSE[26888][C-0000193c] pbx.c:     -- Executing [[email protected]:2] Gosub("SIP/54.172.60.1-00001e77", "sub-record-check,s,1(in,+16023624449,dontcare)") in new stack
[2017-12-08 15:00:47] VERBOSE[26888][C-0000193c] pbx.c:     -- Executing [[email protected]:1] GotoIf("SIP/54.172.60.1-00001e77", "0?initialized") in new stack
[2017-12-08 15:00:47] VERBOSE[26888][C-0000193c] pbx.c:     -- Executing [[email protected]:2] Set("SIP/54.172.60.1-00001e77", "__REC_STATUS=INITIALIZED") in new stack
[2017-12-08 15:00:47] VERBOSE[26888][C-0000193c] pbx.c:     -- Executing [[email protected]:3] Set("SIP/54.172.60.1-00001e77", "NOW=1512770447") in new stack
[2017-12-08 15:00:47] VERBOSE[26888][C-0000193c] pbx.c:     -- Executing [[email protected]:4] Set("SIP/54.172.60.1-00001e77", "__DAY=08") in new stack
[2017-12-08 15:00:47] VERBOSE[26888][C-0000193c] pbx.c:     -- Executing [[email protected]:5] Set("SIP/54.172.60.1-00001e77", "__MONTH=12") in new stack
[2017-12-08 15:00:47] VERBOSE[26888][C-0000193c] pbx.c:     -- Executing [[email protected]:6] Set("SIP/54.172.60.1-00001e77", "__YEAR=2017") in new stack
[2017-12-08 15:00:47] VERBOSE[26888][C-0000193c] pbx.c:     -- Executing [[email protected]:7] Set("SIP/54.172.60.1-00001e77", "__TIMESTR=20171208-150047") in new stack
[2017-12-08 15:00:47] VERBOSE[26888][C-0000193c] pbx.c:     -- Executing [[email protected]:8] Set("SIP/54.172.60.1-00001e77", "__FROMEXTEN=unknown") in new stack
[2017-12-08 15:00:47] VERBOSE[26888][C-0000193c] pbx.c:     -- Executing [[email protected]:9] Set("SIP/54.172.60.1-00001e77", "__MON_FMT=wav") in new stack
[2017-12-08 15:00:47] VERBOSE[26888][C-0000193c] pbx.c:     -- Executing [[email protected]:10] NoOp("SIP/54.172.60.1-00001e77", "Recordings initialized") in new stack
[2017-12-08 15:00:47] VERBOSE[26888][C-0000193c] pbx.c:     -- Executing [[email protected]:11] ExecIf("SIP/54.172.60.1-00001e77", "0?Set(ARG3=dontcare)") in new stack
[2017-12-08 15:00:47] VERBOSE[26888][C-0000193c] pbx.c:     -- Executing [[email protected]:12] Set("SIP/54.172.60.1-00001e77", "REC_POLICY_MODE_SAVE=") in new stack
[2017-12-08 15:00:47] VERBOSE[26888][C-0000193c] pbx.c:     -- Executing [[email protected]:13] ExecIf("SIP/54.172.60.1-00001e77", "0?Set(REC_STATUS=NO)") in new stack
[2017-12-08 15:00:47] VERBOSE[26888][C-0000193c] pbx.c:     -- Executing [[email protected]:14] GotoIf("SIP/54.172.60.1-00001e77", "2?checkaction") in new stack
[2017-12-08 15:00:47] VERBOSE[26888][C-0000193c] pbx.c:     -- Goto (sub-record-check,s,17)
[2017-12-08 15:00:47] VERBOSE[26888][C-0000193c] pbx.c:     -- Executing [[email protected]:17] GotoIf("SIP/54.172.60.1-00001e77", "1?sub-record-check,in,1") in new stack
[2017-12-08 15:00:47] VERBOSE[26888][C-0000193c] pbx.c:     -- Goto (sub-record-check,in,1)
[2017-12-08 15:00:47] VERBOSE[26888][C-0000193c] pbx.c:     -- Executing [[email protected]:1] NoOp("SIP/54.172.60.1-00001e77", "Inbound Recording Check to +16023624449") in new stack
[2017-12-08 15:00:47] VERBOSE[26888][C-0000193c] pbx.c:     -- Executing [[email protected]:2] Set("SIP/54.172.60.1-00001e77", "FROMEXTEN=unknown") in new stack
[2017-12-08 15:00:47] VERBOSE[26888][C-0000193c] pbx.c:     -- Executing [[email protected]:3] ExecIf("SIP/54.172.60.1-00001e77", "12?Set(FROMEXTEN=+14808622782)") in new stack
[2017-12-08 15:00:47] VERBOSE[26888][C-0000193c] pbx.c:     -- Executing [[email protected]:4] Gosub("SIP/54.172.60.1-00001e77", "recordcheck,1(dontcare,in,+16023624449)") in new stack
[2017-12-08 15:00:47] VERBOSE[26888][C-0000193c] pbx.c:     -- Executing [[email protected]:1] NoOp("SIP/54.172.60.1-00001e77", "Starting recording check against dontcare") in new stack
[2017-12-08 15:00:47] VERBOSE[26888][C-0000193c] pbx.c:     -- Executing [[email protected]:2] Goto("SIP/54.172.60.1-00001e77", "dontcare") in new stack
[2017-12-08 15:00:47] VERBOSE[26888][C-0000193c] pbx.c:     -- Goto (sub-record-check,recordcheck,3)
[2017-12-08 15:00:47] VERBOSE[26888][C-0000193c] pbx.c:     -- Executing [[email protected]:3] Return("SIP/54.172.60.1-00001e77", "") in new stack
[2017-12-08 15:00:47] VERBOSE[26888][C-0000193c] pbx.c:     -- Executing [[email protected]:5] Return("SIP/54.172.60.1-00001e77", "") in new stack
[2017-12-08 15:00:47] VERBOSE[26888][C-0000193c] pbx.c:     -- Executing [[email protected]:3] Gosub("SIP/54.172.60.1-00001e77", "app-blacklist-check,s,1()") in new stack
[2017-12-08 15:00:47] VERBOSE[26888][C-0000193c] pbx.c:     -- Executing [[email protected]:1] GotoIf("SIP/54.172.60.1-00001e77", "0?blacklisted") in new stack
[2017-12-08 15:00:47] VERBOSE[26888][C-0000193c] pbx.c:     -- Executing [[email protected]:2] Set("SIP/54.172.60.1-00001e77", "CALLED_BLACKLIST=1") in new stack
[2017-12-08 15:00:47] VERBOSE[26888][C-0000193c] pbx.c:     -- Executing [[email protected]:3] Return("SIP/54.172.60.1-00001e77", "") in new stack
[2017-12-08 15:00:47] VERBOSE[26888][C-0000193c] pbx.c:     -- Executing [[email protected]:4] Set("SIP/54.172.60.1-00001e77", "__FROM_DID=+16023624449") in new stack
[2017-12-08 15:00:47] VERBOSE[26888][C-0000193c] pbx.c:     -- Executing [[email protected]:5] Set("SIP/54.172.60.1-00001e77", "CDR(did)=+16023624449") in new stack
[2017-12-08 15:00:47] VERBOSE[26888][C-0000193c] pbx.c:     -- Executing [[email protected]:6] ExecIf("SIP/54.172.60.1-00001e77", "1 ?Set(CALLERID(name)=+14808622782)") in new stack
[2017-12-08 15:00:47] VERBOSE[26888][C-0000193c] pbx.c:     -- Executing [[email protected]:7] Set("SIP/54.172.60.1-00001e77", "__MOHCLASS=") in new stack
[2017-12-08 15:00:47] VERBOSE[26888][C-0000193c] pbx.c:     -- Executing [[email protected]:8] Set("SIP/54.172.60.1-00001e77", "__REVERSAL_REJECT=FALSE") in new stack
[2017-12-08 15:00:47] VERBOSE[26888][C-0000193c] pbx.c:     -- Executing [[email protected]:9] GotoIf("SIP/54.172.60.1-00001e77", "1?post-reverse-charge") in new stack
[2017-12-08 15:00:47] VERBOSE[26888][C-0000193c] pbx.c:     -- Goto (from-trunk,+16023624449,11)
[2017-12-08 15:00:47] VERBOSE[26888][C-0000193c] pbx.c:     -- Executing [[email protected]:11] NoOp("SIP/54.172.60.1-00001e77", "") in new stack
[2017-12-08 15:00:47] VERBOSE[26888][C-0000193c] pbx.c:     -- Executing [[email protected]:12] Set("SIP/54.172.60.1-00001e77", "__CALLINGNAMEPRES_SV=allowed_not_screened") in new stack
[2017-12-08 15:00:47] VERBOSE[26888][C-0000193c] pbx.c:     -- Executing [[email protected]:13] Set("SIP/54.172.60.1-00001e77", "__CALLINGNUMPRES_SV=allowed_not_screened") in new stack
[2017-12-08 15:00:47] VERBOSE[26888][C-0000193c] pbx.c:     -- Executing [[email protected]:14] Set("SIP/54.172.60.1-00001e77", "CALLERID(name-pres)=allowed_not_screened") in new stack
[2017-12-08 15:00:47] VERBOSE[26888][C-0000193c] pbx.c:     -- Executing [[email protected]:15] Set("SIP/54.172.60.1-00001e77", "CALLERID(num-pres)=allowed_not_screened") in new stack
[2017-12-08 15:00:47] VERBOSE[26888][C-0000193c] pbx.c:     -- Executing [[email protected]:16] NoOp("SIP/54.172.60.1-00001e77", "CallerID Entry Point") in new stack
[2017-12-08 15:00:47] VERBOSE[26888][C-0000193c] pbx.c:     -- Executing [[email protected]:17] Set("SIP/54.172.60.1-00001e77", "__CRM_DIRECTION=INBOUND") in new stack
[2017-12-08 15:00:47] VERBOSE[26888][C-0000193c] pbx.c:     -- Executing [[email protected]:18] Set("SIP/54.172.60.1-00001e77", "__CRM_SOURCE=+14808622782") in new stack
[2017-12-08 15:00:47] VERBOSE[26888][C-0000193c] pbx.c:     -- Executing [[email protected]:19] Set("SIP/54.172.60.1-00001e77", "__CRM_LINKEDID=1512770447.7799") in new stack
[2017-12-08 15:00:47] VERBOSE[26888][C-0000193c] pbx.c:     -- Executing [[email protected]:20] ExecIf("SIP/54.172.60.1-00001e77", "1?Set(CHANNEL(hangup_handler_push)=crm-hangup,s,1)") in new stack
[2017-12-08 15:00:47] VERBOSE[26888][C-0000193c] pbx.c:     -- Executing [[email protected]:21] Goto("SIP/54.172.60.1-00001e77", "Lenny,Talk,1") in new stack
[2017-12-08 15:00:47] VERBOSE[26888][C-0000193c] pbx.c:     -- Goto (Lenny,Talk,1)
[2017-12-08 15:00:47] WARNING[26888][C-0000193c] pbx.c: Channel 'SIP/54.172.60.1-00001e77' sent to invalid extension but no invalid handler: context,exten,priority=Lenny,Talk,1
[2017-12-08 15:00:47] VERBOSE[26888][C-0000193c] app_stack.c:     -- SIP/54.172.60.1-00001e77 Internal Gosub(crm-hangup,s,1) start
[2017-12-08 15:00:47] VERBOSE[26888][C-0000193c] pbx.c:     -- Executing [[email protected]:1] NoOp("SIP/54.172.60.1-00001e77", "Sending Hangup to CRM") in new stack
[2017-12-08 15:00:47] VERBOSE[26888][C-0000193c] pbx.c:     -- Executing [[email protected]:2] NoOp("SIP/54.172.60.1-00001e77", "HANGUP CAUSE: 0") in new stack
[2017-12-08 15:00:47] VERBOSE[26888][C-0000193c] pbx.c:     -- Executing [[email protected]:3] ExecIf("SIP/54.172.60.1-00001e77", "0?Set(__CRM_VOICEMAIL=)") in new stack
[2017-12-08 15:00:47] VERBOSE[26888][C-0000193c] pbx.c:     -- Executing [[email protected]:4] NoOp("SIP/54.172.60.1-00001e77", "MASTER CHANNEL: 1512770447.7799 = 1512770447.7799") in new stack
[2017-12-08 15:00:47] VERBOSE[26888][C-0000193c] pbx.c:     -- Executing [[email protected]:5] GotoIf("SIP/54.172.60.1-00001e77", "0?return") in new stack
[2017-12-08 15:00:47] VERBOSE[26888][C-0000193c] pbx.c:     -- Executing [[email protected]:6] Set("SIP/54.172.60.1-00001e77", "__CRM_HANGUP=1") in new stack
[2017-12-08 15:00:47] VERBOSE[26888][C-0000193c] pbx.c:     -- Executing [[email protected]:7] AGI("SIP/54.172.60.1-00001e77", "sangomacrm.agi") in new stack
[2017-12-08 15:00:47] VERBOSE[26888][C-0000193c] res_agi.c:     -- Launched AGI Script /var/lib/asterisk/agi-bin/sangomacrm.agi
[2017-12-08 15:00:47] VERBOSE[26888][C-0000193c] res_agi.c:     -- <SIP/54.172.60.1-00001e77>AGI Script sangomacrm.agi completed, returning 0
[2017-12-08 15:00:47] VERBOSE[26888][C-0000193c] pbx.c:     -- Executing [[email protected]:8] Return("SIP/54.172.60.1-00001e77", "") in new stack
[2017-12-08 15:00:47] VERBOSE[26888][C-0000193c] app_stack.c:   == Spawn extension (Lenny, Talk, 1) exited non-zero on 'SIP/54.172.60.1-00001e77'
[2017-12-08 15:00:47] VERBOSE[26888][C-0000193c] app_stack.c:     -- SIP/54.172.60.1-00001e77 Internal Gosub(crm-hangup,s,1) complete GOSUB_RETVAL=

How does your custom dial plan look like, that you are directing the did to?

I only have the custom destination and my inbound sip trunk pointed to the custom destination

Your custom destination points to a context, extension, priority in a custom dial plan in extensions_custom.conf.
You have nothing defined in there?

This is a dial plan script that should work for Lenny. Put that into extensions_custom.conf.
There are some copyright uncertainties for the Lenny audio files though.

[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)

oh yes I did this. and uplopaded the files to the directory

Have you reloaded after editing the conf file:

fwconsole r

I get difrent result, sometime it rings and goes to fast busy but sometime it just hungs up… below is an example were it just hungs up

[2017-12-09 09:15:37] VERBOSE[9277][C-00001a1c] netsock2.c:   == Using SIP RTP TOS bits 184
[2017-12-09 09:15:37] VERBOSE[9277][C-00001a1c] netsock2.c:   == Using SIP RTP CoS mark 5
[2017-12-09 09:15:37] VERBOSE[1298][C-00001a1c] pbx.c:     -- Executing [[email protected]:1] Set("SIP/54.244.51.2-00001e7f", "GROUP()=OUT_11") in new stack
[2017-12-09 09:15:37] VERBOSE[1298][C-00001a1c] pbx.c:     -- Executing [[email protected]:2] Goto("SIP/54.244.51.2-00001e7f", "from-trunk,+16023624449,1") in new stack
[2017-12-09 09:15:37] VERBOSE[1298][C-00001a1c] pbx.c:     -- Goto (from-trunk,+16023624449,1)
[2017-12-09 09:15:37] VERBOSE[1298][C-00001a1c] pbx.c:     -- Executing [[email protected]:1] Set("SIP/54.244.51.2-00001e7f", "__DIRECTION=INBOUND") in new stack
[2017-12-09 09:15:37] VERBOSE[1298][C-00001a1c] pbx.c:     -- Executing [[email protected]:2] Gosub("SIP/54.244.51.2-00001e7f", "sub-record-check,s,1(in,+16023624449,dontcare)") in new stack
[2017-12-09 09:15:37] VERBOSE[1298][C-00001a1c] pbx.c:     -- Executing [[email protected]:1] GotoIf("SIP/54.244.51.2-00001e7f", "0?initialized") in new stack
[2017-12-09 09:15:37] VERBOSE[1298][C-00001a1c] pbx.c:     -- Executing [[email protected]:2] Set("SIP/54.244.51.2-00001e7f", "__REC_STATUS=INITIALIZED") in new stack
[2017-12-09 09:15:37] VERBOSE[1298][C-00001a1c] pbx.c:     -- Executing [[email protected]:3] Set("SIP/54.244.51.2-00001e7f", "NOW=1512836137") in new stack
[2017-12-09 09:15:37] VERBOSE[1298][C-00001a1c] pbx.c:     -- Executing [[email protected]:4] Set("SIP/54.244.51.2-00001e7f", "__DAY=09") in new stack
[2017-12-09 09:15:37] VERBOSE[1298][C-00001a1c] pbx.c:     -- Executing [[email protected]:5] Set("SIP/54.244.51.2-00001e7f", "__MONTH=12") in new stack
[2017-12-09 09:15:37] VERBOSE[1298][C-00001a1c] pbx.c:     -- Executing [[email protected]:6] Set("SIP/54.244.51.2-00001e7f", "__YEAR=2017") in new stack
[2017-12-09 09:15:37] VERBOSE[1298][C-00001a1c] pbx.c:     -- Executing [[email protected]:7] Set("SIP/54.244.51.2-00001e7f", "__TIMESTR=20171209-091537") in new stack
[2017-12-09 09:15:37] VERBOSE[1298][C-00001a1c] pbx.c:     -- Executing [[email protected]:8] Set("SIP/54.244.51.2-00001e7f", "__FROMEXTEN=unknown") in new stack
[2017-12-09 09:15:37] VERBOSE[1298][C-00001a1c] pbx.c:     -- Executing [[email protected]:9] Set("SIP/54.244.51.2-00001e7f", "__MON_FMT=wav") in new stack
[2017-12-09 09:15:37] VERBOSE[1298][C-00001a1c] pbx.c:     -- Executing [[email protected]:10] NoOp("SIP/54.244.51.2-00001e7f", "Recordings initialized") in new stack
[2017-12-09 09:15:37] VERBOSE[1298][C-00001a1c] pbx.c:     -- Executing [[email protected]:11] ExecIf("SIP/54.244.51.2-00001e7f", "0?Set(ARG3=dontcare)") in new stack
[2017-12-09 09:15:37] VERBOSE[1298][C-00001a1c] pbx.c:     -- Executing [[email protected]:12] Set("SIP/54.244.51.2-00001e7f", "REC_POLICY_MODE_SAVE=") in new stack
[2017-12-09 09:15:37] VERBOSE[1298][C-00001a1c] pbx.c:     -- Executing [[email protected]:13] ExecIf("SIP/54.244.51.2-00001e7f", "0?Set(REC_STATUS=NO)") in new stack
[2017-12-09 09:15:37] VERBOSE[1298][C-00001a1c] pbx.c:     -- Executing [[email protected]:14] GotoIf("SIP/54.244.51.2-00001e7f", "2?checkaction") in new stack
[2017-12-09 09:15:37] VERBOSE[1298][C-00001a1c] pbx.c:     -- Goto (sub-record-check,s,17)
[2017-12-09 09:15:37] VERBOSE[1298][C-00001a1c] pbx.c:     -- Executing [[email protected]:17] GotoIf("SIP/54.244.51.2-00001e7f", "1?sub-record-check,in,1") in new stack
[2017-12-09 09:15:37] VERBOSE[1298][C-00001a1c] pbx.c:     -- Goto (sub-record-check,in,1)
[2017-12-09 09:15:37] VERBOSE[1298][C-00001a1c] pbx.c:     -- Executing [[email protected]:1] NoOp("SIP/54.244.51.2-00001e7f", "Inbound Recording Check to +16023624449") in new stack
[2017-12-09 09:15:37] VERBOSE[1298][C-00001a1c] pbx.c:     -- Executing [[email protected]:2] Set("SIP/54.244.51.2-00001e7f", "FROMEXTEN=unknown") in new stack
[2017-12-09 09:15:37] VERBOSE[1298][C-00001a1c] pbx.c:     -- Executing [[email protected]:3] ExecIf("SIP/54.244.51.2-00001e7f", "12?Set(FROMEXTEN=+14808622782)") in new stack
[2017-12-09 09:15:37] VERBOSE[1298][C-00001a1c] pbx.c:     -- Executing [[email protected]:4] Gosub("SIP/54.244.51.2-00001e7f", "recordcheck,1(dontcare,in,+16023624449)") in new stack
[2017-12-09 09:15:37] VERBOSE[1298][C-00001a1c] pbx.c:     -- Executing [[email protected]:1] NoOp("SIP/54.244.51.2-00001e7f", "Starting recording check against dontcare") in new stack
[2017-12-09 09:15:37] VERBOSE[1298][C-00001a1c] pbx.c:     -- Executing [[email protected]:2] Goto("SIP/54.244.51.2-00001e7f", "dontcare") in new stack
[2017-12-09 09:15:37] VERBOSE[1298][C-00001a1c] pbx.c:     -- Goto (sub-record-check,recordcheck,3)
[2017-12-09 09:15:37] VERBOSE[1298][C-00001a1c] pbx.c:     -- Executing [[email protected]:3] Return("SIP/54.244.51.2-00001e7f", "") in new stack
[2017-12-09 09:15:37] VERBOSE[1298][C-00001a1c] pbx.c:     -- Executing [[email protected]:5] Return("SIP/54.244.51.2-00001e7f", "") in new stack
[2017-12-09 09:15:37] VERBOSE[1298][C-00001a1c] pbx.c:     -- Executing [[email protected]:3] Gosub("SIP/54.244.51.2-00001e7f", "app-blacklist-check,s,1()") in new stack
[2017-12-09 09:15:37] VERBOSE[1298][C-00001a1c] pbx.c:     -- Executing [[email protected]:1] GotoIf("SIP/54.244.51.2-00001e7f", "0?blacklisted") in new stack
[2017-12-09 09:15:37] VERBOSE[1298][C-00001a1c] pbx.c:     -- Executing [[email protected]:2] Set("SIP/54.244.51.2-00001e7f", "CALLED_BLACKLIST=1") in new stack
[2017-12-09 09:15:37] VERBOSE[1298][C-00001a1c] pbx.c:     -- Executing [[email protected]:3] Return("SIP/54.244.51.2-00001e7f", "") in new stack
[2017-12-09 09:15:37] VERBOSE[1298][C-00001a1c] pbx.c:     -- Executing [[email protected]:4] Set("SIP/54.244.51.2-00001e7f", "__FROM_DID=+16023624449") in new stack
[2017-12-09 09:15:37] VERBOSE[1298][C-00001a1c] pbx.c:     -- Executing [[email protected]:5] Set("SIP/54.244.51.2-00001e7f", "CDR(did)=+16023624449") in new stack
[2017-12-09 09:15:37] VERBOSE[1298][C-00001a1c] pbx.c:     -- Executing [[email protected]:6] ExecIf("SIP/54.244.51.2-00001e7f", "1 ?Set(CALLERID(name)=+14808622782)") in new stack
[2017-12-09 09:15:37] VERBOSE[1298][C-00001a1c] pbx.c:     -- Executing [[email protected]:7] Set("SIP/54.244.51.2-00001e7f", "__MOHCLASS=") in new stack
[2017-12-09 09:15:37] VERBOSE[1298][C-00001a1c] pbx.c:     -- Executing [[email protected]:8] Set("SIP/54.244.51.2-00001e7f", "__REVERSAL_REJECT=FALSE") in new stack
[2017-12-09 09:15:37] VERBOSE[1298][C-00001a1c] pbx.c:     -- Executing [[email protected]:9] GotoIf("SIP/54.244.51.2-00001e7f", "1?post-reverse-charge") in new stack
[2017-12-09 09:15:37] VERBOSE[1298][C-00001a1c] pbx.c:     -- Goto (from-trunk,+16023624449,11)
[2017-12-09 09:15:37] VERBOSE[1298][C-00001a1c] pbx.c:     -- Executing [[email protected]:11] NoOp("SIP/54.244.51.2-00001e7f", "") in new stack
[2017-12-09 09:15:37] VERBOSE[1298][C-00001a1c] pbx.c:     -- Executing [[email protected]:12] Set("SIP/54.244.51.2-00001e7f", "__CALLINGNAMEPRES_SV=allowed_not_screened") in new stack
[2017-12-09 09:15:37] VERBOSE[1298][C-00001a1c] pbx.c:     -- Executing [[email protected]:13] Set("SIP/54.244.51.2-00001e7f", "__CALLINGNUMPRES_SV=allowed_not_screened") in new stack
[2017-12-09 09:15:37] VERBOSE[1298][C-00001a1c] pbx.c:     -- Executing [[email protected]:14] Set("SIP/54.244.51.2-00001e7f", "CALLERID(name-pres)=allowed_not_screened") in new stack
[2017-12-09 09:15:37] VERBOSE[1298][C-00001a1c] pbx.c:     -- Executing [[email protected]:15] Set("SIP/54.244.51.2-00001e7f", "CALLERID(num-pres)=allowed_not_screened") in new stack
[2017-12-09 09:15:37] VERBOSE[1298][C-00001a1c] pbx.c:     -- Executing [[email protected]:16] NoOp("SIP/54.244.51.2-00001e7f", "CallerID Entry Point") in new stack
[2017-12-09 09:15:37] VERBOSE[1298][C-00001a1c] pbx.c:     -- Executing [[email protected]:17] Set("SIP/54.244.51.2-00001e7f", "__CRM_DIRECTION=INBOUND") in new stack
[2017-12-09 09:15:37] VERBOSE[1298][C-00001a1c] pbx.c:     -- Executing [[email protected]:18] Set("SIP/54.244.51.2-00001e7f", "__CRM_SOURCE=+14808622782") in new stack
[2017-12-09 09:15:37] VERBOSE[1298][C-00001a1c] pbx.c:     -- Executing [[email protected]:19] Set("SIP/54.244.51.2-00001e7f", "__CRM_LINKEDID=1512836137.7807") in new stack
[2017-12-09 09:15:37] VERBOSE[1298][C-00001a1c] pbx.c:     -- Executing [[email protected]:20] ExecIf("SIP/54.244.51.2-00001e7f", "1?Set(CHANNEL(hangup_handler_push)=crm-hangup,s,1)") in new stack
[2017-12-09 09:15:37] VERBOSE[1298][C-00001a1c] pbx.c:     -- Executing [[email protected]:21] Goto("SIP/54.244.51.2-00001e7f", "Lenny,Talk,1") in new stack
[2017-12-09 09:15:37] VERBOSE[1298][C-00001a1c] pbx.c:     -- Goto (Lenny,Talk,1)
[2017-12-09 09:15:37] WARNING[1298][C-00001a1c] pbx.c: Channel 'SIP/54.244.51.2-00001e7f' sent to invalid extension but no invalid handler: context,exten,priority=Lenny,Talk,1
[2017-12-09 09:15:37] VERBOSE[1298][C-00001a1c] app_stack.c:     -- SIP/54.244.51.2-00001e7f Internal Gosub(crm-hangup,s,1) start
[2017-12-09 09:15:37] VERBOSE[1298][C-00001a1c] pbx.c:     -- Executing [[email protected]:1] NoOp("SIP/54.244.51.2-00001e7f", "Sending Hangup to CRM") in new stack
[2017-12-09 09:15:37] VERBOSE[1298][C-00001a1c] pbx.c:     -- Executing [[email protected]:2] NoOp("SIP/54.244.51.2-00001e7f", "HANGUP CAUSE: 0") in new stack
[2017-12-09 09:15:37] VERBOSE[1298][C-00001a1c] pbx.c:     -- Executing [[email protected]:3] ExecIf("SIP/54.244.51.2-00001e7f", "0?Set(__CRM_VOICEMAIL=)") in new stack
[2017-12-09 09:15:37] VERBOSE[1298][C-00001a1c] pbx.c:     -- Executing [[email protected]:4] NoOp("SIP/54.244.51.2-00001e7f", "MASTER CHANNEL: 1512836137.7807 = 1512836137.7807") in new stack
[2017-12-09 09:15:37] VERBOSE[1298][C-00001a1c] pbx.c:     -- Executing [[email protected]:5] GotoIf("SIP/54.244.51.2-00001e7f", "0?return") in new stack
[2017-12-09 09:15:37] VERBOSE[1298][C-00001a1c] pbx.c:     -- Executing [[email protected]:6] Set("SIP/54.244.51.2-00001e7f", "__CRM_HANGUP=1") in new stack
[2017-12-09 09:15:37] VERBOSE[1298][C-00001a1c] pbx.c:     -- Executing [[email protected]:7] AGI("SIP/54.244.51.2-00001e7f", "sangomacrm.agi") in new stack
[2017-12-09 09:15:37] VERBOSE[1298][C-00001a1c] res_agi.c:     -- Launched AGI Script /var/lib/asterisk/agi-bin/sangomacrm.agi
[2017-12-09 09:15:37] VERBOSE[1298][C-00001a1c] res_agi.c:     -- <SIP/54.244.51.2-00001e7f>AGI Script sangomacrm.agi completed, returning 0
[2017-12-09 09:15:37] VERBOSE[1298][C-00001a1c] pbx.c:     -- Executing [[email protected]:8] Return("SIP/54.244.51.2-00001e7f", "") in new stack
[2017-12-09 09:15:37] VERBOSE[1298][C-00001a1c] app_stack.c:   == Spawn extension (Lenny, Talk, 1) exited non-zero on 'SIP/54.244.51.2-00001e7f'
[2017-12-09 09:15:37] VERBOSE[1298][C-00001a1c] app_stack.c:     -- SIP/54.244.51.2-00001e7f Internal Gosub(crm-hangup,s,1) complete GOSUB_RETVAL=
[2017-12-09 09:15:51] WARNING[9277] chan_sip.c: Timeout on BMjTAYRQc9wDNZ0AUyANk7.. on non-critical invite transaction.

Here’s my work

copy

[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)

to extensions_customs.conf

uploaded files to Lenny files to /var/lib/asterisk/sounds to a directory i creaded called Lenny

creaded custom destination (See screenshot)

reloaded console fwconsole r

can tell is doing something because I can see at the end of the logs that is reaching the script

could it be perhaps permissions on the folder?

The failure is the same for both traces, there was no need for the second one:

[2017-12-09 09:15:37] VERBOSE[1298][C-00001a1c] pbx.c:     -- Goto (Lenny,Talk,1)
[2017-12-09 09:15:37] WARNING[1298][C-00001a1c] pbx.c: Channel 'SIP/54.244.51.2-00001e7f' sent to invalid extension but no invalid handler: context,exten,priority=Lenny,Talk,1

it is clearly telling you the extension is invalid, and then tells you the invalid extension is Talk. If you note the context you created, you have the extension set to talk, an obvious mismatch.

edit - Unless there is more to your dialplan than you’ve shared in this thread, it won’t accomplish anything.

Sorry I am new to this. so what do I need to do to fix it. I have the sip trunk pointing to and inbound rout and then then the inbound route to the custom destination. Where does the extension comes in to play?

Go to the custom destination you created and change the target from Lenny,Talk,1 to Lenny,talk,1

under custom destination target I only have Lenny,Talk,1. delete it and tried recreating it. where those the target name comes from?

But change the word “Talk” to talk.
That letter “t” must be small caps. This is the reason why it wasn’t working.

That’s where the call enters the custom dial plan in the [Lenny] context.

I still don’t see. there is a drop down and is with caps. Talk, I cannot enter anything. and on the script is with lower case.

[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)

Not sure if that is what you are referring to

Then change the dial plan script to upper case.
[Lenny]
exten => Talk,1,…

made the change on the script still no go…what can I be missing? Is there a way to test it internally?

What’s the error now?

same fast busy…

Show the error please.
Doesn’t have to be the full dial plan debug, just the error.

ok I just changed it to point to an internal extension just for testing and the result is the same fast busy

[2017-12-09 18:43:08] VERBOSE[4925][C-000000a2] pbx.c: – Goto (Lenny,talk,1)
[2017-12-09 18:43:08] WARNING[4925][C-000000a2] pbx.c: Channel ‘SIP/Trunk to cucm-0000008b’ sent to invalid extension but no invalid handler: context,exten,priority=Lenny,talk,1

I deted the script and repasted it and created the custom destination… This is driving me crazy and I know is gonna be something really strupid that I am missing