Hook FOR CID Text not Number

In looking over my call logs there is an obvious pattern in spammers and scammers in that they constantly change (spoof) their Caller ID number but not the text name attached to their spoofed numbers A recent prime example is “SENIORMEDCARE” <5551112223344>. Rare change of text with lots of different numbers.

I was looking over the Superfecta and cannot see a way to filter by text only by CID number.

Is there a way to hook or manipulate something somewhere to send calls with a specific text name to a custom destination? Seems like the text could or should be substituted for numeric CID but sure that’s not true.

Thanks for any thoughts, hints or answers.


Not without custom context code.

I did this some years ago, making a copy of [app-blacklist-check], modifying it and placing it in extensions_override_freepbx.conf:

exten => s,1,GotoIf($["${CALLERID(name)}"="SURVEY "]?blacklisted)
exten => s,n,GotoIf($["${CALLERID(name)}"="VOIP CALLER"]?blacklisted)
exten => s,n,NoOp(${CALLERID(name)}/${CALLERID(num)} has valid caller-id.check blacklist now.)
exten => s,n(check),GotoIf($["${BLACKLIST()}"="1"]?blacklisted)
exten => s,n,Set(CALLED_BLACKLIST=1)
exten => s,n,Return()
exten => s,n(blacklisted),Answer
exten => s,n,Wait(1)
exten => s,n,Zapateller()
exten => s,n,Playback(ss-noservice)
exten => s,n,Hangup

However, I’ve since concluded that blacklisting of any kind is a colossal waste of time and have implemented a better spam filter, based on an automatically-maintained whitelist, an IVR challenge for callers not whitelisted, and a caller reputation service to choose between voicemail and hangup for callers failing the IVR test.

Thanks Stewart! I am anxious to play with your script.

Ya know, only a couple out of a hundred actually push 1, 2 or 3 to speak with someone but I am hoping that the more they get the SIT tone the fewer will keep my number or share it. As over time, all these calls coming in for even a few seconds costs me money.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.