Routing Matrix

I want to build a PBX switch to be used with a routing matrix we have.

So what I need it to do is when a call comes in the caller is directed to an IVR and prompted to enter a zip code, once they enter the zip code the IVR refers
to a MSSQL database for the appropriate number for said zip code and rings it down, should the user fail to enter a zip code or enters one not listed in the database is rings down a general customer service number.

Now we currently have 2 PRI’s, but may be moving to just one for the routing martix.

Would it be thesible to build an Asterisk PBX switch with a PRI card installed and have it talk back to our routing matrix?

And pointers in the right direction would be great!!

Yes, it’s possible, just build an ivr that collects the digits from the user, then through an agi script it looks for the number in the mssql db using odbc and then it calls the found number or a default one if nothing was found.

Regards.

Marco Bruni