My version of torture
I've hacked together my own version of torture for telemarketers. One of my goals was to be able to automatically route calls to the torture sequence based on callerid number and substrings of callerid name like 'debt' or 'mortgage' or 'call center' or 'lawn' (got some really annoying lawn care providers around here).
I'm posting my notes here to share and get ideas. It isn't PIAF ready (yet) (the server I run this on is strictly a 'vi' managed box at the moment).
The current extension steps are geared to 'listen' to these rash of auto warranty and debt relief pre-recorded calls and after about 30 seconds send a DTMF 1 to get a live operator and continue on with some entertainment.
You can activate this by calling my test number: 530-231-8000
[next-fun]
exten => s,1,Set(CALLFILENAME=fun-${CALLERID(num)}-${STRFTIME(${EPOCH},,%Y%m%d%H%M%S)})
exten => s,2,Monitor(wav,${CALLFILENAME})
exten => s,3,Playback(silence/2)
exten => s,4,Playback(att/hello-world)
exten => s,5,Playback(silence/1)
exten => s,6,Playback(att/this-call-may-be-monitored-or-recorded)
exten => s,7,Playback(silence/10)
exten => s,8,Playback(silence/10)
exten => s,9,Playback(att/hello-world)
exten => s,10,SendDTMF(1)
exten => s,11,Playback(silence/5)
exten => s,12,SendDTMF(1)
exten => s,13,Playback(not-next)
exten => s,14,SendDTMF(1)
exten => s,15,Playback(silence/1)
exten => s,16,SendDTMF(1)
exten => s,17,Playback(silence/5)
exten => s,18,Playback(not-next)
exten => s,19,Playback(silence/10)
exten => s,20,Playback(silence/10)
exten => s,21,Playback(silence/10)
exten => s,22,Hangup
Since I'm more of a Perl hacker, my quick cobbled together script to search callerid strings for numbers and words is:
exten => s,1,AGI(callscreen.agi|${CALLERID(all)}|2)
exten => s,2,Goto(${GGG},s,1)
and the Perl:
#!/usr/bin/perl -w
use Asterisk::AGI;
our $AGI = new Asterisk::AGI;
our %input = $AGI->ReadParse();
$_ = $ARGV[0];
$_ =~ tr/[A-Z]/[a-z]/;
if (/warra/) {
$AGI->exec('Set', 'GGG=next-fun');
exit 0;
}
if (/call center/) {
$AGI->exec('Set', 'GGG=next-fun');
exit 0;
}
if (/mortgage/) {
$AGI->exec('Set', 'GGG=next-fun');
exit 0;
}
if (/6262738255/)
(...)
the GGG variable causes the next extension line to either allow the call through or send it to the torture path. It isn't pretty but it is very effective.
Since it is based on callerid name or number matches, the house phone will ring just once and the script gets called. If the house phone rings again, we know it might not be a telemarketer
The "joke" around the house is that if I put my wife's maiden name in the script, all calls from the in-laws would be sent to the torture path. (Do this at your own risk)
I'm not advocating recording the calls and I don't know if my recording/monitoring warning is sufficient but ...
In any case, would love ideas and suggestions to improve this.
Any good blacklists out there what could be used to block caller-id numbers? These pre-recorded warranty and debt relief calls are using spoofed and undialabled callerids.