Whitelist from phonebook

I don’t know if this is possible. I’d like to establish a call flow for incoming calls.

incoming call
In Blacklist? (Yes) -> hangup
In Asterisk Phonebook? (Yes) -> send to ring group
Go to IVR
Correct option taken -> send to ring group

Is that do-able?

I don’t know about is asterisk phonebook part but the rest is definitely doable.

if it is possible, it maybe call flow control option?

I know the rest is doable. It’s the phonebook whitelist that’s a bit iffy.

With a custom context, it is certainly doable. It seems to me that the Asterisk phonebook is maintained in the Asterisk real-time database, so it should be a simple enough matter to grab the record from dbget() and see what happens.

I don’t think there’s a simple way to do it from the GUI, though. I think you’re going to be delving into the deep magic that is custom context writing.

It is possible with custom dial plan, and the type of thing we do in paid support if you have the budget. You would need a block of code that checks for the existence of the database entry


and fork the call based on the result.


It’s for my home PBX, not worth the money.

… and he gave you the tough part for free.

Lorne’s (@lgaetz) is a cool guy.

1 Like

A free (as in beer) book on how to make magic happen…

Chapters 5 and 6

Lorne is a cool guy.

1 Like

Cool, thanks.

Now for some light reading…:grin:

I saw a blog post in my Twitter feed a few days ago that included something a bit similar to this. It was at http://tech.iprock.com/?p=17563

Look for the line that says “;Special CallerID name lookup; uses Asterisk Phonebook which also acts as whitelist”, I think that might be somewhat close to what you are trying to do.

Thanks all. Great stuff for me to ponder.