Authentication ANI

I want to do an application with asterisk. When a register ANI call into the asterisk , asterisk will do an authentication with the ANI 1st , if the ANI is valid and registered inside my system , then Asterisk will prormpt a message and let the user to make call. Asterisk will capture the destination number and terminate the call.Is it possible to do this with asterisk and any tips to do this ?

It’s possible and asteriskguru.com/tutorials/ has a lot of info for you.

Plus, theres a2billing, trixbox for an instant call service.

Regards,

For ANI/caller-id you can refer to
voip-info.org/wiki/view/Asterisk+variables

ANI is valid and registered inside my system , then Asterisk will prormpt
a message and let the user to make call.
Asterisk AGI scripting for db access and buisness rules over asterisk.
voip-info.org/wiki-Asterisk+AGI

A good example in this regard is a2billing application.
asterisk2billing.org/