5

I have a couple of SIP phones and use callcentric. I get a lot of junk calls. I'd like to implement the following feature and would like some suggestions on how to do this:

Once I get a junk call, I typically hang up. I want to dial some number (like *23 or something) and I'd like the last number that was received to be put in a database. Any future call from that number will be directed to VM or a busy tone.

I'd appreciate some pointers on how I'd go about doing this.. I prefer an open source solution.

Trewq
  • 163
  • 5

2 Answers2

5

We use a phone system called Swyx (which is similar in functionality to Asterisk, but runs on Windows).

As a part of the call route scripts, we can execute external scripts. We just wrote a very small script on our shitlist extension that puts the phone number of the caller into a special table that gets scanned when a call comes in in our automatic call routing script. It then plays a pre-recorded announcement the caller.

I don't know if Asterisk has something similar, but I'm guessing that it should be able to execute an external script as a part of a call route.

Mark Henderson
  • 68,316
  • 31
  • 175
  • 255
  • Thanks for the info Mark. This is a for-home implementation, and would prefer to get an open source solution. Are you able to say how much this would cost for a 2-4 phone system? – Trewq Jul 04 '12 at 01:56
  • @Trewq - a lot. But like I said, I'm sure that similar concepts apply to Asterisk. I almost guarantee that it will have a way of triggering an external script as a part of a call route. And then you can do whatever you want in that external script. So you have one script on an extension to put them into your shitlist, and then a 2nd script that is run every time a call comes in to check if the phone number is on your shitlist. – Mark Henderson Jul 04 '12 at 02:13
  • @womble - there's never been any filtering, just one rule - "[be](https://encrypted.google.com/search?q=site%3Aserverfault.com+shit&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a) [polite](https://encrypted.google.com/search?q=site%3Aserverfault.com+fuck&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a)" – Mark Henderson Jul 04 '12 at 05:44
  • @MarkHenderson: http://meta.stackexchange.com/questions/22232/are-expletives-allowed-on-se-sites/22233#22233 would appear to disagree with you. I also recall (but cannot find right at this moment) a blog post or podcast saying that expletives of all kinds were forbidden because it would get the whole site dropped into braindead corporate firewalls that treat employees like children who cannot be exposed to naughty language. – womble Jul 04 '12 at 05:49
  • 1
    @womble ... well .... ok I hadn't ever read that post. Don't really go to meta.stackoverflow. So I shall consider myself schooled. – Mark Henderson Jul 04 '12 at 05:51
2

First hit for "asterisk blacklist" on the Googletubes sends me to http://www.voip-info.org/wiki/view/Asterisk+func+BLACKLIST, which suggests that functionality similar to what you're after is built-in. And, in fact, another few seconds of reading brings me to http://www.jackenhack.com/adding-blacklist-to-an-asteriskhome-pbx-voip-server/ -- which, while it's purportedly out-of-date with regards to current versions of Asterisk, should get you 90+% of the way to your solution.

womble
  • 95,029
  • 29
  • 173
  • 228