I am trying to implement a change to our Dialplan that will thwart tele-spammers that are calling us with blanked out caller ID. The caller IDs seem to vary between originating callers when they block caller ID. I've seen the following: "anonymous" "" So I'm checking for these. However recently one company seems to be bypassing this, so what I wanted to do was implement some logic that checks for actual numbers in the caller ID. We have a couple of different SIP providers for incoming calls. Some prefix numbers with a + and others don't. But I'm logging incoming calls that are getting through our tele-spam filter and it seems that they are blank, but I suspect they contain empty spaces which is why our matches don't work. Does anyone have some sample DialPlan code that they are using to thwart incoming calls with no caller ID? I was thinking of maybe converting the caller ID num to a numeric value and testing for 'not equal to 0' but that won't work with the + prefix. All suggestions greatly appreciated. Myles -- ----------------------------- Myles Wakeham Director of Engineering Tech Solutions USA, Inc. www.techsolusa.com Phone +1-480-451-7440
On May 20, 2010, at 12:43 PM, Myles Wakeham wrote:> I am trying to implement a change to our Dialplan that will thwart > tele-spammers that are calling us with blanked out caller ID. > > The caller IDs seem to vary between originating callers when they block > caller ID. I've seen the following: > > "anonymous" > "" > > So I'm checking for these. However recently one company seems to be > bypassing this, so what I wanted to do was implement some logic that > checks for actual numbers in the caller ID. > > We have a couple of different SIP providers for incoming calls. Some > prefix numbers with a + and others don't. But I'm logging incoming > calls that are getting through our tele-spam filter and it seems that > they are blank, but I suspect they contain empty spaces which is why our > matches don't work. > > Does anyone have some sample DialPlan code that they are using to thwart > incoming calls with no caller ID? I was thinking of maybe converting > the caller ID num to a numeric value and testing for 'not equal to 0' > but that won't work with the + prefix. > > All suggestions greatly appreciated. > > MylesIn my opinion this is one of the greatest aspects of Asterisk... it's ability to do custom things just as this. Much like anything IT, there are many ways of approaching this. Different people have different solutions. One can be an API lookup to something such as whocalled.us (which has an AGI for asterisk). Another can be a localized black list. An yet another can be a localized white list. (If the number doesn't match a known, "approved" number, then give it some sort of IVR or screening) I don't get hit that much anymore, so I'm still with the modified blacklist approach. Unknown callers (0000000000, 0123., Anonymous, Unknown, etc.) get screened and known telemarketers go to the torture I talked about at http://bit.ly/bbhho ---fred http://qxork.com
This is a drawn-out, but efficient way to "fix" this problem. Create two programs. Program 1 reads Master.csv (or whatever you use to store your CDR in). Reads through CDR and creates a "blacklist" of numbers and ID's. write blacklist to a text file or database. Program 2 runs from dialplan as AGI. Returns "Blacklist" or "OK" to dialplan as local variable. I'm a "Perl Weenie", so I would do this with text files, but C code and a database would be more efficient (actually, unless the list got quite cumbersome, C code and text file would be most efficient). Dialplan Exten => s,1,answer Exten => s,n,AGI(check_bl.agi,${CALLERID(num)},${CALLERID(name)}) Exten => s,n,Gotoif($[${BLACKVAL} = "OK"]?6] Exten => s,n,playback(nice-goodbye) Exten => s,n,hangup Exten => s,n,noop(caller is "ok", continue) -----Original Message----- From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Myles Wakeham Sent: Thursday, May 20, 2010 11:43 AM To: asterisk-users at lists.digium.com Subject: [asterisk-users] Checking blank CallerID in Dialplan I am trying to implement a change to our Dialplan that will thwart tele-spammers that are calling us with blanked out caller ID. The caller IDs seem to vary between originating callers when they block caller ID. I've seen the following: "anonymous" "" So I'm checking for these. However recently one company seems to be bypassing this, so what I wanted to do was implement some logic that checks for actual numbers in the caller ID. We have a couple of different SIP providers for incoming calls. Some prefix numbers with a + and others don't. But I'm logging incoming calls that are getting through our tele-spam filter and it seems that they are blank, but I suspect they contain empty spaces which is why our matches don't work. Does anyone have some sample DialPlan code that they are using to thwart incoming calls with no caller ID? I was thinking of maybe converting the caller ID num to a numeric value and testing for 'not equal to 0' but that won't work with the + prefix. All suggestions greatly appreciated. Myles -- ----------------------------- Myles Wakeham Director of Engineering Tech Solutions USA, Inc. www.techsolusa.com Phone +1-480-451-7440 -- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
You will find there are an infinite number of bogus CLID's that these scumbags use to thwart screening. Such things as invalid NPA, invalid office code are common. Blank is seldom used any more. Here in the US at least, even with the do not call list ( federal ) and various state do not call lists, they still squeek through. Part of the stupidity of the DNC list ( federal ) is that there is a charge to USE the list so the bottom feeders don't bother, and with some providers allowing phony CLID there is little hope. What we do is screen for the private, blocked, etc, then capture the number and name into a MySQL database. A php script then can display that, and allow for setting a field to block if it ever comes through again. In the dialplan, if the number comes through but NO name, they go to a VM box that allow legit callers to leave a message, the rest simply hang up. Even valid numbers of callers we want no conversation with can be blocked as well. The script also allows entry of known undesirables to be entered. Once a number is blocked, they are routed to an intercept recording that APPEARS to be authentic, and often that is enough to discourage further calling. Also be prepared for the infrequent call that is missing any CLID. You are only limited by your imagination, and the undesirable callers tenacity to outfox your scripts. Be prepared to continue to change and improve your efforts. John Novack Myles Wakeham wrote:> I am trying to implement a change to our Dialplan that will thwart > tele-spammers that are calling us with blanked out caller ID. > > The caller IDs seem to vary between originating callers when they block > caller ID. I've seen the following: > > "anonymous" > "" > > So I'm checking for these. However recently one company seems to be > bypassing this, so what I wanted to do was implement some logic that > checks for actual numbers in the caller ID. > > We have a couple of different SIP providers for incoming calls. Some > prefix numbers with a + and others don't. But I'm logging incoming > calls that are getting through our tele-spam filter and it seems that > they are blank, but I suspect they contain empty spaces which is why our > matches don't work. > > Does anyone have some sample DialPlan code that they are using to thwart > incoming calls with no caller ID? I was thinking of maybe converting > the caller ID num to a numeric value and testing for 'not equal to 0' > but that won't work with the + prefix. > > All suggestions greatly appreciated. > > Myles > > ------------------------------------------------------------------------ > > > > Checked by AVG - www.avg.com > Version: 9.0.819 / Virus Database: 271.1.1/2884 - Release Date: 05/19/10 14:26:00 > >-- Dog is my co-pilot