Adding blacklist to an Asterisk PBX Server

Update: The code below does not work in Asterisk 2.0b4 or newer. I will update with instructions on how to get it to work in those versions. Thanks to Dan for pointing this out. Update: I have changed the code to the removed part. It now requires a key press to accept the number to delete. I have added a blacklist function to my Asterisk@Home server and thought that I’d share it here if someone is interested. There are two ways to add a number to the blacklist. The easiest is to dial *32. Then you get a voice telling you the number of the last incoming call. To add it to the blacklist, press 1. Great use against pesky telemarketers and If you want to add it manually, press *30. Then you can enter the phone number directly on your telephone. To remove an entry from the blacklist, press *31 and enter the phone number. If you don’t like the codes I use, change them. ...

September 26, 2005

Adding ENUM support in Asterisk@Home

There’s a system called ENUM that enables VoIP servers like Asterisk to check the number your dialing to see if there is a possibility to connect directly to your server instead of going over PSTN land lines. So I registered at E164.org and added my phone number. I tried to figure out how to add this functionality to Asterisk@Home, but couldn’t find anything on how to do it. But I finally managed to get it to work, and it’s really simple. Here’s how I did it. ...

September 13, 2005

Screaming monkeys

Today I finally got to see a tele-marketer getting caught in my Asterisk server. I’ve made a blacklist system, so I can blacklist callers. As soon as they call, they get transfered to a voice saying “There is no one to take your call, they’ve all been carried away by monkeys” and then a lot of monkeys screaming. And the dumb fuck called back three times before giving up. One down, three million to go…

September 13, 2005

More Asterisk AGI

I have finally finished my first AGI program for my Asterisk server. So time for my next program. I have installed Nagios network monitoring program on one of my machines. I want Nagios to call my mobile phone when one of my servers go down and using Festival, giving me a voice message of what server and the type of problem.

September 9, 2005

Linux is taking over my home!

I’ve had performance problems with my firewall so I thought it was time to upgrade to a better firewall. After looking around I found a lot of articles about the Linksys WRT54G, a wireless router that’s easily patched with new firmware. Because it uses the linux operating system, Linksys have to publish source code under the GPL license. This makes it easy for others to improve and implement new features. So I got an image from Sveasoft called Talisman and installed it. And it works great! I can now have QoS so my VoIP telephone stuff always gets priority. ...

September 4, 2005

Continued adventures with Asterisk

As usual when I find something new, it goes a bit overboard. I always wanted to delve into learning the Perl programming language. So I took this opportunity to use it to write a small plug-in for my Asterisk server. As soon as somebody calls, my script goes to a Swedish directory service and looks up the name. It then puts it in the callerID information so the name shows up on my phones. It also connects to my satellite receiver and displays a message on my tv so I know who is calling. Pretty nifty. Naturally I found that someone already written this in php, and that they’ve used the wap version of the lookup page to find the name. That preserves a lot of bandwidth so I’ll probably rewrite my program to use that instead. Anyway, Perl is an amazing language. ...

August 20, 2005

Asterisk PBX

So I’ve been busy for the last five days setting up my Asterisk PBX. I’ve connected two different VoIP lines to it. I have the X-Lite VoIP softphones installed on all the computers and an FSX device so I can use my regular wireless phone. And it’s enjoyable learning something new. First, my wife thought that I was crazy, “Who needs a telephone switchboard at home!?” But I think she’s coming around. Now she can sit at her computer using a headset and talk to her friends without holding the line. And it’s easy to transfer calls between all the phones in the apartment. It’s also nice to have a digital answering machine and get the messages mailed to you. The added benefit of multiple lines on the same phone number and that it doesn’t cost anything to dial a phone in Sweden is a bonus. ...

August 14, 2005