Create Simple Inbound Routes Based on CallerID for Junk Call Blocker

I have created a simple/cheap call blocker using an OBI110 and a Raspberry Pi based on someone’s clever tutorial at:

It basically intercepts all calls and asks them to press a key, and then will allow the home phone to ring once the key is pressed. All other called are played a disconnect message. The problem I am having is that I want to “whitelist” calls based on their incoming caller ID. Very similar to the BLACKLIST module, but with a destination other than a disconnect message.

For example, my son’s school uses a robo caller to tell me details about tardiness and school closures but those won’t get through. Also, my mom is getting older and is slow about pushing the correct key, so she also gets dumped. I would like to enter a phone number or caller ID name, and just start the phone in my house ringing without any challenge.

I see someone wrote a topic “Route Calls Based on Caller ID” but it seems to get a bit technical and I was hoping there is an easier way to do this with a point and click (I don’t have many numbers to add). I also saw a topic about “Dynamic Routing Module Installation” but it involved installing someone’s independent module from somewhere in Italy and I don’t know if that is a good idea or if it will even help me if I did.

I tried adding new Inbound Call Routes but that didn’t do anything. It also looks like there might be a solution using the Custom Destination module and the phonebook, but I am either not understanding something there or it just isn’t the approach to use for this problem.

If anyone could offer me a step in the right direction I would really appreciate it. I am sure this has a simple solution but I just am not seeing it.


I use inbound call routes all the time, they work fine if set up correctly.

I go on call once every two months for a week, I also have number that are allowed to call anytime, they all use inbound routes to do this. After 9:00pm my phone system will not allow any calls in but the ones I allow.

So, on to the fun stuff…

This is how one of my many routes are set up, Enter a description > The number of the expected DID, if you only have one you may either enter the full 10 digit number or leave it blank > the Caller ID number is the number of the inbound call, you must prefix it with an underscore like this _5551112233 or it will fail to work.

Everything else can be left as is, but you must set the destination at the bottom. If you have a ring group, send it to the ring group you need, if you have time conditions in place, use that, if you want it to ring a certain extension then send it to that extension.

Inbound routes are a wonderful resource, I use it a lot for all sorts of different calls types. Play with it and see how it can be of use to you, I could not live without it and I do believe it is one of the best features of FreePBX.

I hope this helps you out.



You are Awesome! I needed the ‘_’ in the front of the ‘Whitelisted’ 10 digit number in < CallerID Number > as your post showed. I left my < DID Number > blank. I also had to check the < CID Priority Route > box for any new inbound routes that I created as part of a ‘Whitelist’. My original inbound route had blanks for the < DID Number > and < CallerID Number > so I think it was superseding my ‘Whitelist’ routes.

Thanks so much for your help.


You’re welcome Steve, glad I could help you out… enjoy your new function…