Home
Complaint phone numbers by issue type from FTC phone spam complaint list

Download and Format the FTC Robocall Complaint List for NCID

While researching how to set up multiple modems on an single NCID server, I stumbled across a forum entry describing the new robo call complaint list that the FTC began posting in October 2015. I immediately investigated and downloaded the complaint list to load it onto my Raspberry Pi NCID server. In no time, I wrote an R script to automate downloading the file and updating my ncidd.alias file with the new definitions–the FTC is updating the file on a monthly basis.

Since I will now know what numbers have been reported to the FTC, it will be easy to identify and report any new robo call phone numbers to the FTC.

R Code to Download FTC Robo Call Complaint List

To automate the process of downloading the complaint list and creating a new file to append to the complaintList, I wrote an R script to simplify the process. I took an approach of adding the complaint phone numbers to the ncidd.alias file to replace the NAME with “FTC Complaint List” as suggested by a discussion on the NCID forum. The first segment sets up some filenames and downloads the FTC complaint file:

#
# Set up file name and URL arguments
#
outFn <- "../../data/ftc_weekly_complaintList.csv"
ftccomplaintListURL <- "https://consumercomplaints.fcc.gov/hc/theme_assets/513073/200051444/Telemarketing_RoboCall_Weekly_Data.csv"
aliasFn <- "../../data/ncidd.alias.ftc"
complaintListFn <- "../../data/ncidd.blacklist.ftc"
#
# The FTC website uses a self-signed certificate for some reason, thus --no-check-certificate
#
wgetCmdStr <- paste("wget --no-check-certificate -O ",outFn,ftccomplaintListURL)
system(wgetCmdStr)
ftccomplaintListDf <- read.csv(outFn,header=TRUE)
summary(ftccomplaintListDf)
##                                              Phone.Issues  
##  Robocalls                                         :18909  
##  Telemarketing (including do not call and spoofing):38930  
##                                                            
##                                                            
##                                                            
##                                                            
##                                                            
##   Time.of.Issue       Caller.ID.Number Advertiser.Business.Phone.Number
##  -       : 2573   -           :13782   -           :44466              
##  1:00 PM :  841   248-215-0437:  187   844-279-7423:   72              
##  10:00 AM:  768   267-233-6724:  131   844-226-8637:   66              
##  11:00 AM:  688   213-217-9999:  110   281-702-8593:   53              
##  9:00 AM :  583   863-777-2311:  107   202-864-1122:   37              
##  2:00 PM :  537   609-270-0113:  103   844-279-7431:   32              
##  (Other) :51849   (Other)     :43419   (Other)     :13113              
##          Type.of.Call.or.Message..Robocalls.
##                            :38893           
##  Abandoned Call            : 3746           
##  Autodialed Live Voice Call:  997           
##  Prerecorded Voice         :14034           
##  Text Message              :  169           
##                                             
##                                             
##  Type.of.Call.or.Message..Telemarketing.          State      
##                   :19213                 California  : 7692  
##  Abandoned Calls  : 7749                 Texas       : 4133  
##  Email            :   64                 Florida     : 4118  
##  Live Voice       :16771                 New York    : 3369  
##  Prerecorded Voice:13060                 Pennsylvania: 2413  
##  Text Messaage    :  880                 Virginia    : 2111  
##  Text Message     :  102                 (Other)     :34003  
##  Date..Ticket.Date.of.Issue. Date..Ticket.Created.
##  10/14/2015:  783            10/14/2015:  788     
##  10/1/2015 :  738            10/15/2015:  778     
##  10/7/2015 :  738            10/7/2015 :  770     
##  10/6/2015 :  733            10/6/2015 :  745     
##  10/27/2015:  722            10/27/2015:  741     
##  10/15/2015:  710            10/28/2015:  726     
##  (Other)   :53415            (Other)   :53291

The next segment uses the dplyr and magrittr packages to select the two columns with phone numbers, merge them into one column and then de-dup the numbers:

#
# Load required packages
#
require(dplyr)
require(magrittr)
#
# Combine the phone numbers in Caller.ID.Number column and Advertiser.Business.Phone.Number column into a single column to handle nulls in either
# of the columns
#
callerIDDf <- ftccomplaintListDf %>% select(Caller.ID.Number)
phoneNbrDf <- ftccomplaintListDf %>% select(Advertiser.Business.Phone.Number) %>% rename(Caller.ID.Number=Advertiser.Business.Phone.Number)
complaintListDf <- rbind(callerIDDf,phoneNbrDf)
#
# De-dup the list and generate the text that will go in the ncidd.alias file
#
complaintListDf <- complaintListDf %>%
  group_by(Caller.ID.Number) %>%
  summarise(count=n()) %>%
  mutate(ncidFormatPhone=gsub("-","",Caller.ID.Number)) %>%
  mutate(aliasLine=paste("alias NAME * = \"FTC Complaint List\" if ",ncidFormatPhone))
summary(complaintListDf)
##      Caller.ID.Number     count          ncidFormatPhone   
##  -           :    1   Min.   :    1.00   Length:25747      
##  000-000-0000:    1   1st Qu.:    1.00   Class :character  
##  000-000-0001:    1   Median :    1.00   Mode  :character  
##  000-000-0106:    1   Mean   :    4.49                     
##  000-000-0911:    1   3rd Qu.:    2.00                     
##  000-000-2019:    1   Max.   :58248.00                     
##  (Other)     :25741                                        
##   aliasLine        
##  Length:25747      
##  Class :character  
##  Mode  :character  
##                    
##                    
##                    
## 

The final segment writes the two files in the format that NCID can read:

#
# Write the file to be appended to 
#
write(complaintListDf$aliasLine,file=aliasFn)
write("\"FTC Complaint List\"",file=complaintListFn)

To append the files to the existing lists of alias and blacklist definitions, a slightly different form of sudo is required: cd /etc/ncid sudo cp ncidd.alias ncidd.alias.personal sudo cp ncidd.blacklist ncidd.blacklist.personal sudo sh -c "cat ncidd.alias.ftc >> ncidd.alias" sudo sh -c "cat ncidd.blacklist.ftc >> ncidd.blacklist"

In future months, I will concatenate the .personal and .ftc files.

Analysis on the FTC Complaint List

It is probably useful to look at the complaint data to find out more about how spammers go about causing problems. Figure 1 shows the proportion of robo calls vs. spoofing, do not call list violations and other hostile telemarketing practices. Robo calls are only about 1/3 of the complaints.

Figure 1. Complaint Phone Numbers by issue type.
plot of chunk ncidComplaintType1

Figure 2. Complaint Phone Numbers by issue type.
plot of chunk ncidComplaintType2
Figure 3. Complaint Phone Numbers by issue type for telemarketing calls.
plot of chunk ncidComplaintType3
Figure 4. Histogram showing Number of Types per phone number.
plot of chunk ncidComplaintType4

Print the T-shirt

You can download and print the FTC’s Zap Rachel contest and T-shirt design from the DEF CON contest in 2014.

Related Articles

For additional information, you may be interested in other articles on NCID and stopping phone spam:

We use cookies to ensure you get the best experience on our website.