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
|
Hangup
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
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.