Inbound routing via lookup

Anyone have any suggestions on how I can perform inbound routing based on a lookup.

Either the callerid is looked up in a list that determines the Inbound Route to follow…or can I have a list of callerids for a particular Inboud Route.

I have a list of about 100 extensions that I want to use a specific incoming route. Plus I want to give certain customers priority handling based on CID.


There are a few ways to do lookups. You can use the internal asterisk database. You can use ODBC connections to do lookups from within the dialplan. Or you can use an AGI script. If the logic is fairly complex, I’d suggest using an AGI in your preferred language.

Thanks, but do you know of a site that references how I can implement this?

If you’d like a good source of information I’d first suggest the book:

You can read more about AGI here

func_odbc here: … +func_odbc

and the asterisk DB here: