This is what I am wanting to accomplish: User dials my 800 numbers. Asterisk picks up. Looks up the number user is calling from in a database. If their number is authorized, it will automatically give them a dialtone and allow them to call out on a IAX line. I can write a php script to lookup the number in the database and return a yes or no. Any answers would be greatly appreciated!