Re: [asterisk-users] Block Spam Calls

2019-12-14 Thread Alexander Perkins
Hi All.  Thank you so much for all the feedback; it is really helpful.  I
found a company out there that specializes in Asterisk solutions and has a
Robocall/SPAM call solution specifically for Asterisk.  We give it a spin
last week and it turned out great.  It's not free, but works very well and
I think it is worth passing it on.  Here's the site for the service -
https://www.tiltx.com/asterisk-robocall-blocker.

I thought I'd pass this along as it has taken me some time to find
something for Asterisk that actually works.

Hope this helps,
Alex
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Block Spam Calls

2019-12-14 Thread Julian Beach
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,
 Julianmailto:jb_s...@trink.co.uk 


-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   

Re: [asterisk-users] Block Spam Calls

2019-12-13 Thread Doug Lytle

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 => 517xxx,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()



-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Block Spam Calls

2019-12-13 Thread Jeff LaCoursiere
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:  *j...@stratustalk.com* 
Website:*https://www.stratustalk.com*
Address:*One Freedom Square
13th Floor
Reston, VA 20190*

 
 



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.

<>-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Block Spam Calls

2019-12-13 Thread Julian Beach
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,
 Julianmailto:jb_s...@trink.co.uk


-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Block Spam Calls

2019-12-13 Thread Doug Lytle

On 12/12/19 6:55 PM, Adam Goldberg 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.


Doug


-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Block Spam Calls

2019-12-12 Thread Greg Troxel
D'Arcy Cain  writes:

> Not bad.  I was toying with another idea.  I find that if I don't answer
> a robot fast enough it just hangs up.  How about ring two or three times
> before passing to the actual extension?

You could try that and let us know, but I suspect:

  some robocallers don't hang up so fast and will get through

  this will annoy the legit callers

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Block Spam Calls

2019-12-12 Thread D'Arcy Cain
On 12/12/19 5:33 PM, Greg Woods wrote:
> Most spam calls are robocalls these days. At my house, I can block
> pretty much all of the robocalls by requiring the caller to take some
> action before ringing the phones. In our case, the action is just to
> dial 1 for my wife or 2 for me. The only difference it makes in the end
> is which voice mailbox the caller gets transferred to if no one answers,
> but since asterisk so programmable, there are a lot of ways to
> accomplish the basic concept. I can see tons of calls in my log
> that never get through to bother us.

Not bad.  I was toying with another idea.  I find that if I don't answer
a robot fast enough it just hangs up.  How about ring two or three times
before passing to the actual extension?

-- 
D'Arcy J.M. Cain
Vybe Networks Inc.
A unit of Excelsior Solutions Corporation - Propelling Business Forward
http://www.VybeNetworks.com/
IM:da...@vex.net VoIP: sip:da...@vybenetworks.com

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Block Spam Calls

2019-12-12 Thread Adam Goldberg
This is exactly what I do - “press 1 for a human”
Works great


From: asterisk-users  on behalf of 
Greg Woods 
Sent: Thursday, December 12, 2019 6:34 PM
To: Asterisk Users Mailing List - Non-Commercial Discussion
Subject: Re: [asterisk-users] Block Spam Calls

Most spam calls are robocalls these days. At my house, I can block pretty much 
all of the robocalls by requiring the caller to take some action before ringing 
the phones. In our case, the action is just to dial 1 for my wife or 2 for me. 
The only difference it makes in the end is which voice mailbox the caller gets 
transferred to if no one answers, but since asterisk so programmable, there are 
a lot of ways to accomplish the basic concept. I can see tons of calls in my 
log that never get through to bother us.

--Greg


On Tue, Dec 10, 2019 at 8:58 AM Alexander Perkins 
mailto:alexanderhenryperk...@gmail.com>> wrote:
Hi All.  Does anybody know if Google/Android has an API I can sign up for that 
will allow us to query the caller ID and find out if it is spam or a 
robocaller?  I ask because we've had increase in spam calls and I'd like to 
simply play dead air or something really annoying.

Thanks all,
Alex
--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Block Spam Calls

2019-12-12 Thread Greg Woods
Most spam calls are robocalls these days. At my house, I can block pretty
much all of the robocalls by requiring the caller to take some action
before ringing the phones. In our case, the action is just to dial 1 for my
wife or 2 for me. The only difference it makes in the end is which
voice mailbox the caller gets transferred to if no one answers, but since
asterisk so programmable, there are a lot of ways to accomplish the basic
concept. I can see tons of calls in my log that never get through to bother
us.

--Greg


On Tue, Dec 10, 2019 at 8:58 AM Alexander Perkins <
alexanderhenryperk...@gmail.com> wrote:

> Hi All.  Does anybody know if Google/Android has an API I can sign up for
> that will allow us to query the caller ID and find out if it is spam or a
> robocaller?  I ask because we've had increase in spam calls and I'd like to
> simply play dead air or something really annoying.
>
> Thanks all,
> Alex
> --
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> Check out the new Asterisk community forum at:
> https://community.asterisk.org/
>
> New to Asterisk? Start here:
>   https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Block Spam Calls

2019-12-12 Thread Ira
Title: Re: [asterisk-users] Block Spam Calls


Hello Alexander,

Tuesday, December 10, 2019, 7:57:54 AM, you wrote:





Hi All.  Does anybody know if Google/Android has an API I can sign up for that will allow us to query the caller ID and find out if it is spam or a robocaller?  I ask because we've had increase in spam calls and I'd like to simply play dead air or something really annoying.



I've had reasonable luck making a list of suspect Caller IDs though they seem to be slowing down the use of those as time goes by.  In my experience, calls with these caller IDs are never valid calls. Depending on who's calling you may also have good luck blocking all calls with the same area code and 3 digit prefix. I store all this in the Asterisk database and wrote my own blacklist and whitelist functions to handle it in the dial plan. If you do this you'll need a whitelist to let the people who end up here because they've not published their caller ID to the lookup lists and one of get the default "800 Service" tags.

Ira


000                                
                              
0                              
00                            
000                            
800 SERVICE                            
800 Service                            
800_SERVICE                            
800_Service                            
ASSIST                                
CLIENT SUPPORT                        
COMMERCIAL RECO                        
CUST SERVICE                          
CUST SRVC                              
CUSTOMER SERVI                        
CUSTOMER SERVIC                        
CUSTOMER SERVICE                      
CUSTOMER SRV                          
CUSTOMER-SERVI                        
CUSTOMER-SERVIC                        
CUSTOMER-SERVICE                      
CUSTOMER_SERVI                        
CUSTOMER_SERVIC                        
CUSTOMER_SERVICE                      
INS SRVCS                              
INSURANCE                              
INSURANCE SRVC                        
LOCAL RANKING                          
PRIORITY MARKET                        
PRIVATE NAME                          
RENEWAL DEPT                          
RESEARCH CENTER                        
TELEMARKETER                          
TOLL FREE                              
TOLL FREE CALL                        
TOLL-FREE                              
TOLL-FREE  -                          
TOLL-FREE -                            
TOLL-FREE-                            
TOLL_FREE                              
TV RESEARCH                            
TV RESEARCH CO                        
VOIP CALLER                            





-- Ira


-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Block Spam Calls

2019-12-10 Thread Hermann Wecke
On Tue, Dec 10, 2019 at 11:01 AM Alexander Perkins
 wrote:
> Hi All.  Does anybody know if Google/Android has an API I can sign up for 
> that will allow us to query the caller ID and find out if it is spam or a 
> robocaller?

I don't think that there is a public (free) API. All robocall
protection services are paid ones. You can find several on Twilio from
US$ 0.003 up to US$ 0.06 per query, depending on what you are looking
for.

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

[asterisk-users] Block Spam Calls

2019-12-10 Thread Alexander Perkins
Hi All.  Does anybody know if Google/Android has an API I can sign up for
that will allow us to query the caller ID and find out if it is spam or a
robocaller?  I ask because we've had increase in spam calls and I'd like to
simply play dead air or something really annoying.

Thanks all,
Alex
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users