Hello Doug, Friday, December 13, 2019, 11:03:37 AM, you wrote:>> This is exactly what I do - “press 1 for a human” >> Works great> I do this as well, but I also do a database lookup to see if the number > is on our speeddial list and if so, pass the call directly on without > the IVR prompts.I do something similar for calls without caller ID, but I was still getting robocalls with spoofed caller ID. I have now changed the dialplan slightly so that the first time people call they are asked to dial 1. After the first call, they are added to a known caller list and get straight through, and any robocalls at that point are blacklisted manually. I have found that most robocallers spoof the Caller ID so rarely call from the same number twice. It means that legitimate callers who cannot dial 1 just have to dial again to get through to the phones - there is a recorded message telling them to dial 1 or call back. I haven't had a robocall since! The hardest thing about this was extracting all the numbers of previous callers from the CDR and adding it to the Previous_Callers AstDB for the lookup. I didn't want to make existing callers go through the initial learning process. -- Best regards, Julian mailto:jb_soft at trink.co.uk
Mind posting your dialplan code? I was thinking the same thing - very much like an old spam control program I used to use whose name now escapes me. First time senders would have to respond to an auto-reply, then were added to a whitelist. This would be a great FreeBSD module... Cheers, *Jeff LaCoursiere* STRATUSTALK, INC. / CTO Phone: *+1 703.496.4990 x108* Mobile: *+1 815.546.6599* Email: *jeff at stratustalk.com* <mailto:jeff at stratustalk.com> Website: *https://www.stratustalk.com* Address: *One Freedom Square 13th Floor Reston, VA 20190* <https://www.facebook.com/jeff.lacoursiere> <https://linkedin.com/in/jeff-lacoursiere-884361> <https://www.twitter.com/stratustalk> On 12/13/19 10:48 AM, Julian Beach wrote:> Hello Doug, > > Friday, December 13, 2019, 11:03:37 AM, you wrote: > >>> This is exactly what I do - “press 1 for a human” >>> Works great >> I do this as well, but I also do a database lookup to see if the number >> is on our speeddial list and if so, pass the call directly on without >> the IVR prompts. > I do something similar for calls without caller ID, but I was still > getting robocalls with spoofed caller ID. I have now changed the dialplan > slightly so that the first time people call they are asked to dial 1. > After the first call, they are added to a known caller list and get > straight through, and any robocalls at that point are blacklisted > manually. I have found that most robocallers spoof the Caller ID so > rarely call from the same number twice. It means that legitimate > callers who cannot dial 1 just have to dial again to get through to > the phones - there is a recorded message telling them to dial 1 or > call back. I haven't had a robocall since! > > The hardest thing about this was extracting all the numbers of > previous callers from the CDR and adding it to the Previous_Callers > AstDB for the lookup. I didn't want to make existing callers go through > the initial learning process. >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20191213/7f8e6f05/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: jeff.vcf Type: text/x-vcard Size: 321 bytes Desc: not available URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20191213/7f8e6f05/attachment.vcf>
On 12/13/19 11:48 AM, Julian Beach wrote:> Hello Doug, > > Friday, December 13, 2019, 11:03:37 AM, you wrote: > >>> This is exactly what I do - “press 1 for a human” >>> Works great >> I do this as well, but I also do a database lookup to see if the number >> is on our speeddial list and if so, pass the call directly on without >> the IVR prompts.For those that would like to see my code: exten => 517xxxxxxx,1,Answer() same => n,Gosub(check_blacklist,s,1) same => n,Gosub(get_callerid,s,1) same => n,Gosub(check_for_direct,s,1) same => n,Set(CHANNEL(musicclass)=music) same => n,Gosub(extension_timeouts,s,1) same => n,Dial(SIP/3501,${timeout.timeout},TtKk) same => n,NoOP(Dial Status: ${DIALSTATUS}) same => n,NoOP(Hangup Cause: ${HANGUPCAUSE}) same => n,Gosub(s-${DIALSTATUS},s,1) [check_for_direct] ;********************************************************************** ;* Check if there is a match of the inbound call to the speed dial list ;* If not, make then go through the IVR menu ;******************************************* exten => s,1,Set(ARRAY(speed.phone,speed.name)=${ODBC_MENU_DIRECT(drdos,${CALLERID(number)})}) ;******************************************************** ;* If the contents of speed.phone is blank, assume that it ;* is not programmed and force the call to use the IVR to ;* prove they are not an automated call. ;******************************************************** same => n,GotoIf($["${speed.phone}" != "" ]?3:ivr_menu,s,1) same => n,NoOP(${speed.name} is on the approved list) same => n,Return() same => n,Hangup() -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20191213/a1f7c86d/attachment.html>
Hello Jeff, Friday, December 13, 2019, 7:42:38 PM, you wrote:> Mind posting your dialplan code? I was thinking the same thing - very > much like an old spam control program I used to use whose name now > escapes me. First time senders would have to respond to an auto-reply, > then were added to a whitelist.This is not the neatest of code segments, as there are a few checks I make before I let calls through to the phones: (1) It checks for blacklisted callers, and sends them off to a go-away message (2) It checks whether there is Caller ID information, and sends sends anon calls to another handler (again asking callers to press 1 or leave a message) but there is also a switch to just send them to voicemail: I had a problem with 1 anon caller phoning repeatedly a few years ago, and that was the solution! (3) For calls with a CID number, it checks whether these have called before and if not, adds them to the previous caller db then sends them to an IVR to play them a message and ask them to press a key (this means that if they call again, they will always go through to the phones, as a number of genuine callers cannot, or won't, dial 1 - if they turn out to be a robocall, they are blacklisted) (4) Calls that pass all the tests go through to the phones I am sure that I could make the code much more efficient, but it has not been a priority and I have been adding features as I need them, rather than re-writing! [from-pstn] (initial handler for PSTN calls) exten => s,1,Log(NOTICE, Incoming PSTN Call from CDR ${CDR(src)} and CID ${CALLERID(name)}) exten => s,n,GotoIf(${DB_EXISTS(blacklist/${CDR(src)})}?block) ; Check whether caller blacklisted exten => s,n,Set(DB(callers/lastcall)=${CDR(src)}) exten => s,n,Set(GLOBAL(CALLEDLINE)=L1-) exten => s,n,GotoIf($["${CDR(src)}" != ""]?toincoming) ; if there is valid CID go to IncomingHome exten => s,n,GotoIf($["${CALLERID(name)}" = "WITHHELD"]?nocid) ; if anon call... exten => s,n,GotoIf($["${CALLERID(name)}" = "INTERNATIONAL"]?nocid) exten => s,n,GotoIf($["${CALLERID(name)}" = "UNAVAILABLE"]?nocid) exten => s,n,GotoIf($["${CALLERID(name)}" = "PAYPHONE"]?nocid) exten => s,n,GotoIf($["${CDR(src)}" = ""]?drop) exten => s,n(toincoming),GotoIf(${DB_EXISTS(previous/${CDR(src)})}?:unknown) ; Check whether caller has rung before exten => s,n,GoSub(IncomingHome,s,1) ; answer the call in the macro exten => s,n(nocid),GotoIf($[ $[ "${DB(variables/ANONTOVM)}" = "1" ] ]?vm) ; ...check whether anon goes straight to vm exten => s,n,GoSub(IncomingHome,s,1) ; answer the call in the macro exten => s,n(block),GoSub(Handler-MarketingCall,s,1) ; deal with blacklisted callers exten => s,n(vm),Log(NOTICE, No CID data or AnontoVM set) ; send anon callers to AnonCall IVR exten => s,n,Goto(AnonCall-menu,s,1) exten => s,n(unknown),Log(NOTICE, Unknown caller to IVR) ; send unknown callers to UnknownCaller IVR exten => s,n,Set(DB(previous/${CDR(src)})=1) ; add number to previous caller DB exten => s,n,GoSub(UnknownCaller-menu,s,1,(${CDR(src)})) exten => s,n(drop),Log(NOTICE, No CID data, call dropped) ; drop calls with no CID info exten => s,n,Wait(15) exten => s,n,Hangup() [UnknownCaller-menu] ; The Unknown caller IVR - with some logging of call volumes exten => s,1,Log(NOTICE,Unknown Caller ${ARG1} - Caller to IVR) exten => s,n,Verbose(2,Anon Calls = ${DB(unknown/total)} Total, ${DB(unknown/valid)} Valid, ${DB(unknown/invalid)} Invalid) exten => s,n,Set(unknown=$[${DB(unknown/total)} + 1]) exten => s,n,Set(DB(unknown/total)=${unknown}) exten => s,n,Verbose(2,Unknown Calls set to ${DB(unknown/total)}) exten => s,n,Answer(500) exten => s,n(loop),Background(unknown) exten => s,n,WaitExten() ; 1 - Call to incoming call handler exten => 1,1,NoOp(Real caller progressing) exten => 1,n,Log(NOTICE,Unknown Call - Caller dialled to continue to phones) exten => 1,n,Set(valid=$[${DB(unknown/valid)} + 1]) exten => 1,n,GoSub(IncomingHome,s,1) exten => 1,n,Hangup() ; 2 - invalid entry exten => i,1,Playback(invalid) exten => i,n,Log(NOTICE,Unknown Call - Caller dialled invalid number) exten => i,n,Set(invalids=$[${DB(unknown/invalid)} + 1]) exten => i,n,Set(DB(unknown/invalid)=${invalids}) exten => i,n,Goto(s,loop) ; 3 - timeout exten => t,1,Playback(invalid) exten => t,n,Log(NOTICE,Unknown Call - Caller timed out) exten => t,n,Set(invalids=$[${DB(unknown/invalid)} + 1]) exten => t,n,Set(DB(unknown/invalid)=${invalids}) exten => t,n,GoSub(subMessaging,s,1,(${ARG1}),("Unknown")) exten => t,n,Hangup() -- Best regards, Julian mailto:jb_soft at trink.co.uk